Geoff Chappell - Software Analyst
Windows XP brought a new look to the Start Menu. The previous style, which users can revert to, is now known as the Classic Start Menu. An apparent detraction of the latter is that finding a shortcut on the Start Menu is necessarily an exercise in navigating cascading menus, which can each be large enough to require scrolling. The new style of Start Menu lets users go through the cascading menus if they want, but it also tracks the most frequently used shortcuts and presents them separately for easy access, in a pane on the left of the menu:
This left pane is in three sections, separated by horizontal dividers. In the middle are shortcuts that come and go according to an assessment of how often and how recently they have been used. The context menu for any shortcut in this section provides an easy way to pin the shortcut to the list so that it remains handy even if it does not stay among the most frequently used. Such pinned shortcuts go to the top section. At the bottom of the pane is the means to work your way through the cascading menus of all the shortcuts from the Programs folder of the Start Menu.
As with the Classic Start Menu, the new style of Start Menu is highly configurable: at the menu itself; through the “Taskbar and Start Menu Properties” dialog; through the “Start Menu and Taskbar” administrative template in the Group Policy Object Editor; and, inevitably, through undocumented registry values.
For a new user, whether because Windows is newly installed or because the user is first logging on to a newly created account, the Start Menu typically already shows both pinned shortcuts and most frequently used shortcuts even though no shortcuts have yet been used. The picture above shows such a list for a new user of Windows Vista Ultimate.
Though these initial shortcuts may soon drop from the list and can easily be removed deliberately, the programs they refer to begin with a high profile: the Start Menu is among the main ways that new users find out what’s in Windows. These programs include some that are written by Microsoft but have competitors that are written by others. Some manufacturers, and users, of such competing programs object to Microsoft using its ownership of Windows to arrange so advantageous a promotion of Microsoft’s programs. They say this is unfair competition in a supposedly open market of all applications that run on Windows.
To help an informed assessment of such concerns, this article describes where the initial list of Start Menu shortcuts comes from. This information in turn tells how an Original Equipment Manufacturer (OEM) can configure the appearance of the initial list when a pre-installed Windows is first used and how an administrator can configure it for when a user first logs on to a newly created account. It also, of course, notes how limited is this configurability.
Filling the pinned list is the work of SHELL32 (or, more precisely, of whichever DLL implements the StartMenuPin class).
SHELL32 allows that the pinned list can be disabled by administrative policy. If the following registry value (in either of two keys, listed here in decreasing order of precedence) evaluates as non-zero, then SHELL32 treats the pinned list as empty:
The NoStartMenuPinnedList value has user-interface support through the Group Policy Object Editor, as “Remove pinned programs list from the Start Menu” in the “Start Menu and Taskbar” administrative template.
Ordinarily, the pinned list is not disabled and has been populated in an earlier session and remembered in the registry:
The data is a series of variably-sized entries. Each begins with a one-byte CSIDL, which represents a special folder location. For instance, 0x00 represents the desktop folder. Provided that the CSIDL is not 0xFF, the entry then continues as a dword and an ITEMIDLIST (commonly called a PIDL). The dword gives the size, in bytes, of the PIDL that comes after it.
If this Favorites value does not exist or its data is empty, as will be typical for a new user, SHELL32 seeds the list from defaults. The choice of defaults depends on the ServerAdminUI value:
EXPLORER sets this value when first executing as the shell for a new user. The data is 1 if the Windows installation is a server and the user has sufficient privilege, else 0. Most users, of course, are not administrators of server installations, and this value ordinarily starts as zero. (It may very usefully be changed as early as possible by a new user, but that is another story.) In this ordinary case, the pinned shortcuts are initialised from hard-coded defaults:
These unusual-looking things are paths in the shell namespace such as may be fed to the start command or the ShellExecute function. They identify shell objects that represent respectively the default web browser and the default e-mail client. Implementation details are given separately, with directions to Create a Desktop Icon for the Default Web Browser.
In the much less ordinary case where ServerAdminUI is initially non-zero, the defaults for the pinned shortcuts come from SHELL32 string resources else from hard-coding:
|Resource ID||Hard-Coded Default|
|31,168||%ProgramData%\Microsoft\Windows\Start Menu\Programs\Administrative Tools\Server Manager.lnk|
|31,169||%USERPROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Accessories\Command Prompt.lnk|
Whether EXPLORER even tries to pre-populate the MFU list for a new user is subject to administrative policy, expressed through the following registry value:
|Type:||REG_DWORD or REG_BINARY|
This setting has user-interface support through the Group Policy Object Editor, as “Clear the recent programs list for new users” in the “Start Menu and Taskbar” administrative template. The 4 bytes of data are evaluated as 0 for false and 1 for true. Anything else is an error and is defaulted to false.
Unless this registry setting evaluates as true, EXPLORER seeds the list of most frequently used shortcuts. This MFU list is maintained with help from BROWSEUI (or, more precisely, of whichever DLL implements the UserAssist class), most notably for persistent storage for assessing the frequency of use. Attention here is just with the records that EXPLORER enters into that persistent storage to get the MFU list started. Much more, including more registry configuration, is involved in how EXPLORER later draws from this storage to display the MFU list, but this is all left for another article.
EXPLORER seeds the MFU list with as many as eight shortcuts. These are chosen from two sources:
An additional factor in the choice is to avoid reproducing shortcuts that are anyway in the pinned list. No shortcut is accepted for the initial MFU list if its target is already the target of any of the first three shortcuts from the pinned list.
Positions 5 to 8 of the initial MFU list are configurable from the registry:
|Value:||OEM0 for 5th shortcut
OEM1 for 6th shortcut
OEM2 for 7th shortcut
OEM3 for 8th shortcut
Data for each value is interpreted as an indirect string in the sense of the undocumented function SHLoadRegUIString. Thus, the data may itself be a pathname for the shortcut, or it may specify a resource ID from which to load the pathname. Either way, the pathname is allowed environment variables. For the purpose of entering into the MFU list, this pathname can be anything in the shell namespace. In practice however, only pathnames to Start Menu shortcuts are later retrieved for display.
For the following snapshot, an administrator has installed the media player known as QuickTime before Windows is first started by the intended user. Alternatively, QuickTime has been pre-installed by an OEM. Either way, QuickTime has created a shortcut for the Start Menu. With this shortcut’s pathname as the data for the OEM0 value:
|Data:||%ProgramData%\Microsoft\Windows\Start Menu\Programs\QuickTime\QuickTime Player.lnk|
QuickTime appears on the Start Menu for all new users (at the highest position allowed by this method of configuration):
Positions that are not filled from the OEMn values are filled from lists that are hard-coded into EXPLORER.EXE. There are 27 such lists in the EXPLORER version 6.00 from the original Windows Vista. Mostly, there is one list for each supported type of Windows product (in the sense documented for the GetProductInfo function). The Home Premium and Ultimate product types each have two lists, for when touch-screen support is or is not available.
In the descriptions that follow, each shortcut is given by the name of the shortcut file. The display name in the Start Menu can be different, as with Windows Live Messenger Download for “Windows Live.lnk” and Windows Meeting Space for “Windows Collaboration.lnk”. The locations have placeholders for special folders. The following table shows a typical resolution using environment variables:
The product types that sell in by far the greatest numbers are Home Basic, Home Premium and Ultimate. The lists for these are broadly similar:
|Shortcut (.lnk)||Location||Applicable Products|
|Welcome Center||CommonPrograms\Accessories||Home Basic
|Internet Explorer||Programs||Home Basic
|Pen Training||CommonPrograms\Tablet PC||Home Premium with touch-screen support
Ultimate with touch-screen support
|Media Center||CommonPrograms||Home Premium without touch-screen support
Ultimate without touch-screen support
|Windows Ultimate Extras||CommonPrograms\Extras and Upgrades||Ultimate|
|Windows Media Player||Programs||Home Basic (but not Home Basic N)
|Windows Photo Gallery||CommonPrograms||Home Basic
|Windows Anytime Upgrade||CommonPrograms\Extras and Upgrades||Home Basic|
|Windows Live||CommonPrograms||Home Basic
|Windows DVD Maker||CommonPrograms||Home Premium
|Windows Calendar||CommonPrograms||Home Basic
|Windows Collaboration||CommonPrograms||Home Basic
|migwiz||CommonPrograms\Accessories\System Tools||Home Basic|
The EXPLORER from Windows Vista SP1 adds recognition of Home Premium N and Ultimate N but with the same lists as Home Premium and Ultimate respectively.
The Business edition is also encountered frequently, especially in corporate environments. Its initial list has many shortcuts in common with the Home Premium edition, but is not readily described in the table above since there is a change of order. Windows Collaboration is placed higher, above the Windows Photo Gallery though still beneath the Windows Media Player:
|Windows Media Player||Programs||not Business N|
|Small Business Resources||CommonPrograms\Extras and Upgrades|
|Windows Fax and Scan||CommonPrograms|
|Windows Photo Gallery||CommonPrograms|
|migwiz||CommonPrograms\Accessories\System Tools||Business N|
The initial list for the Enterprise edition (not to be confused with the Enterprise edition of Windows Server 2008) moves Windows Collaboration yet higher, so that it is now above “Windows Fax and Scan”, and places Windows Media Player near the bottom:
|Windows Fax and Scan||CommonPrograms|
|Windows Photo Gallery||CommonPrograms|
|Windows Media Player||Programs|
The EXPLORER from Windows Vista SP1 adds recognition of Enterprise N, but with the same list.
The Starter edition has a greatly reduced selection of bundled programs and a consequently very different pre-populated list:
|Windows Media Player||Programs|
The same EXPLORER.EXE is intended for both client and server editions. The EXPLORER from the original Windows Vista therefore has lists for server editions even though none are known ever to have been released. All server editions have the same initial list:
The server products that are known to the EXPLORER from the original Windows Vista are:
The EXPLORER from Windows Vista SP1 and Windows Server 2008 adds
Note that the initial lists for all client editions of Windows Vista have in common four shortcuts: Welcome Center, Internet Explorer, Windows Media Player and Windows Live. The Welcome Center is always first, as expected for a welcome.
Internet Explorer is always second, even in the server editions. If a different web browser is pre-installed by an OEM and configured to show in the MFU list through an OEMn value, Internet Explorer will be advertised to the new user more prominently than is the alternative. If the alternative is set as the default web browser for all users, it will show at the top of the pinned list for each new user, but Internet Explorer still gets advertised in the MFU list:
The Windows Media Player also is in the top four positions in all client editions except Ultimate (and Home Basic N, which does not have it), and therefore is advertised more prominently than any competing product can be if configured through an OEMn value. This is true also of the Windows Media Center in the two editions that have it.
It should perhaps not go unobserved that the two programs that are most subject to competitive concerns have their shortcuts generated afresh for each new user. See that their shortcuts are in the per-user Programs folder rather than the machine-wide CommonPrograms. It’s surely not without signficance, but a study of that must wait for another article.