Microsoft Windows Registry Guide, Second Edition
Controlling Just-in-Time Setup
Every IT professional I've spoken with, particularly desktop-deployment types, have the same problem: they want to know how to prevent Windows from creating icons for Outlook Express on the Quick Launch toolbar and Start menu when users log on to the computer the first time. More specifically, Windows creates these icons when it creates user profiles for new users. These icons aren't in the default user profile, which you learned about in Chapter 12, “Deploying User Profiles,” so you can't just remove them from it to avoid creating them.
At this point, you might be asking why you can't just remove those components from Windows. Well, the operating system doesn't provide a user interface for doing that. However, in the section “Removing Components,” later in this chapter, I show you how to limit which components the setup program installs. Still, other components are required for the operating system to work properly. For example, Windows requires access to Microsoft Internet Explorer. If you're deploying Microsoft Outlook 2002, you must install Outlook Express, because Outlook 2002 depends on many of the components in Outlook Express. The best you can do is not advertise these programs so users don't get sidetracked while using their computers.
Windows actually creates these icons as part of its just-in-time setup process for user profiles. The operating system creates a user profile for a new user, and then runs this just-in-time setup process to finish configuring it. Another way to think of the process is that the setup program defers configuring per-user settings until Windows creates user profiles, when decisions about those settings are better made. This just-in-time setup process is what you need to control to prevent the pesky Outlook Express icons from showing up on the desktop.
The key HKLM\SOFTWARE\Microsoft\ActiveSetup\Installed Components drives the just-in-time setup process. Each subkey is a component. For example, the subkey {2179C5D3-EBFF-11CF-B6FD-00AA00B4E220} is for NetShow. Within each subkey, you might see the REG_EXPAND_SZ value StubPath. If this value exists, Windows executes the command that it contains when the operating system creates a new user profile. If you don't see this value or the value is empty, Windows does nothing. So, to keep Windows from running a component's just-in-time setup process, remove the value StubPath from that component's subkey under Installed Components. The next several sections describe how to use this hack to control different components. You should include changes to Installed Components on disk images. Chapter 15, “Cloning Disks with Sysprep,” describes how to deploy settings on your disk images.
NOTE
Why should you care if Outlook Express has an icon on the Quick Launch toolbar? It's distracting and keeps users from their work. Specifically, your enterprise isn't likely to use Outlook Express as its mail client; you probably deployed a full-featured client such as Microsoft Office Outlook 2003 or a similar program. If you advertise Outlook Express on the desktop, users are going to have two mail clients. If that doesn't confuse them and cause problems, it'll certainly tease them into playing with Outlook Express. This applies to many of the other programs that come with Windows, including Windows Media Player, NetMeeting, and so on.
Outlook Express
When Windows creates a new user profile, it executes the command in the REG_EXPAND_SZ value HKLM\SOFTWARE\Microsoft\Active Setup\InstalledComponents\{44BBA840-CC51-11CF-AAFA-00AA00B6015C}\StubPath to create the Outlook Express icon in the Start menu and on the Quick Launch toolbar. This command is “%ProgramFiles%\OutlookExpress\setup50.exe" /APP:OE /CALLER:WINNT /user/install. To prevent this command from running, remove the StubPath value or, alternatively, change its name to HideStubPath, as shown in Figure 18-1.
Figure 18-1 Prevent Windows from creating Outlook Express shortcuts by hiding StubPath.
This customization is common on disk images, so I'm providing you with a script to do it. Save the script shown in Listing 18-1 to a text file with the .inf extension. Right-click it, and then click Install. Keep this script handy as a disk-image customization tool.
Listing 18-1 Outlook.inf
[Version] Signature=$CHICAGO$ [DefaultInstall] DelReg=Reg.Settings [Reg.Settings] HKLM,SOFTWARE\Microsoft\Active Setup\Installed Components\{44BBA840-\ CC51-11CF-AAFA-00AA00B6015C},StubPath
TIP
An alternative to hiding the Outlook Express icon is making Outlook Express a newsreader client only. Add the option /outnews to the target of each icon (placing this command-line option outside of the quotation marks). When users choose the shortcut, Outlook Express opens with all its news-client features working, but its mail-client features don't work. This is useful in scenarios when you must provide newsgroup access to users, such as developers, who usually require access to Microsoft and developer newsgroups. To easily deploy this customized Outlook Express shortcut, add it to the default user profile. Alternatively, because this hack usually accompanies an Outlook 2002 deployment, you can add this shortcut to your Microsoft Office 2003 Editions transform.
Windows Media Player
Windows Media Player has two subkeys in HKLM\SOFTWARE\Microsoft\ Active Setup\Installed Components:
{22d6f312-b0f6-11d0-94ab-0080c74c7e95} is for version 6.4 and the value StubPath is rundll32.exe advpack.dll,LaunchINFSection C:\WINDOWS\INF\mplayer2.inf,PerUserStub.NT.
{6BF52A52-394A-11d3-B153-00C04F79FAA6} is for version 8 and the value StubPath is rundll32.exe advpack.dll,LaunchINFSection C:\WINDOWS\INF\wmp.inf,PerUserStub
These values are responsible for the numerous Windows Media Player shortcuts. Remove both StubPath values to prevent Windows from adding the Windows Media Player shortcut to the Quick Launch toolbar. Also, if you want to keep the Windows Media Player shortcut off the top of the Start menu, remove it from the default user profile. (See Chapter 12, “Deploying User Profiles,” for more information.) You also find Windows Media Player shortcuts in the All Users profile folder in %SystemDrive%\Documents and Settings\All Users\Start Menu\Programs\Accessories\Entertainment. Ideally, remove the shortcut from your network-based Default User profile, and then remove the shortcut from the All Users profile folder on your disk images.
Desktop Themes
Preventing Windows from configuring desktop themes when it creates a user profile is an easy way to revert to the classic user interface. (See Figure 18-2.) Remove or hide the REG_EXPAND_SZ value StubPath from the key HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\{2C7339CF-2B09-4501-B3F3-F3508C9228ED}. The command that this value contains is %SystemRoot%\system32\regsvr32.exe/s /n /i:/UserInstall%SystemRoot%\system32\themeui.dll.
Figure 18-2 Removing the value StubPath from the subkey {2C7339CF-2B09-4501-B3F3-F3508C9228ED} prevents Windows from configuring the new user interface.
Other Shortcuts
The key HKLM\SOFTWARE\Microsoft\ActiveSetup\Installed Components contains many other components with StubPath values that I haven't mentioned yet. You can prevent Windows from configuring any of the components when the operating system creates a user profile by removing or hiding the StubPath value in the corresponding subkey. Table 18-1 lists all the components that I've already described plus some of the ones that I haven't.
Component | Subkey | StubPath |
Address Book 6 | {7790769C-0471-11d2-AF11-00C04FA35D02} | "%ProgramFiles%\OutlookExpress\setup50.exe" /APP:WAB /CALLER:WINNT /user /install |
Internet Explorer 6 | {89820200-ECBD-11cf-8B85-00AA005B4383} | %SystemRoot%\system32\ie4uinit.exe |
Internet Explorer Access | {ACC563BC-4266-43f0-B6ED-9D38C4202C7E} | rundll32 iesetup.dll,IEAccessUserInst |
Microsoft Outlook Express 6 | {44BBA840-CC51-11CF-AAFA-00AA00B6015C} | "%ProgramFiles%\OutlookExpress\setup50.exe" /APP:OE /CALLER:WINNT /user /install |
Microsoft Windows Media Player 6.4 | {22d6f312-b0f6-11d0-94ab-0080c74c7e95} | rundll32.exe advpack.dll,LaunchINFSection C:\WINDOWS\INF \mplayer2.inf,PerUserStub.NT |
Microsoft Windows Media Player 8 | {6BF52A52-394A-11d3-B153-00C04F79FAA6} | rundll32.exe advpack.dll, LaunchINFSection C:\WINDOWS\INF \wmp.inf,PerUserStub |
NetMeeting 3.01 | {44BBA842-CC51-11CF-AAFA-00AA00B6015B} | rundll32.exe advpack.dll,LaunchINFSection C:\WINDOWS\INF \msnetmtg.inf, NetMtg.Install.PerUser.NT |
Theme Component | {2C7339CF-2B09-4501-B3F3-F3508C9228ED} | %SystemRoot%\system32\regsvr32.exe /s /n /i: /UserInstall %SystemRoot%\system32 \themeui.dll |
Windows Desktop Update | {89820200-ECBD-11cf-8B85-00AA005B4340} | regsvr32.exe /s /n /i:U shell32.dll |
Windows Messenger 4.0 | {5945c046-1e7d-11d1-bc44-00c04fd912be} | rundll32.exe advpack.dll,LaunchINFSection C:\WINDOWS\INF \msmsgs.inf,BLC.Install.PerUser |
Keep in mind that even if you prevent Windows from configuring every component that I list in the preceding table, you might still have unwanted icons. These icons come from the Default User and All User profile folders. Remove the shortcuts that you don't want from any default user profile you've deployed. Remove the shortcuts that you don't want from the All Users folder on your disk images.
CAUTION
Be wary of preventing Windows from configuring the Windows Desktop Update component. This component is necessary to provide resiliency for Windows Installer–based applications. For example, when a user opens the shortcut of a Windows Installer–based application, the Windows Desktop Update component passes it on to Windows Installer so that Windows Installer can check and repair the application if necessary. If you prevent the operating system from configuring the Windows Desktop Update component, you remove Windows Installer from the process. Even though this prevents Windows Installer from repairing broken shortcuts, it doesn't prevent Windows Installer from repairing components within an application.