Chapter 15: Working Around IT Problems

IT professionals often have to struggle with getting configurations just right before and after deployment. They try to play by the rules, but they sometimes must bend them to get things to work well in their environments. Bending the rules often means using the registry to achieve a goal that's not usually possible. Chapter 4, "Hacking the Registry," showed good examples of bending the rules. If you want to use Folder Redirection without Active Directory, for example, you have to hack the registry. This chapter follows that example with many more.

I could fill an entire book (I'd sure like to try) with the dirty tricks that IT professionals use to get things to work the way they want. I've focused this chapter on the topics that I'm asked about most frequently, though. For example, I don't know many professionals who aren't frustrated with the Microsoft Outlook Express icons that keep popping up on users' desktops. This chapter shows you how to rid your business of them. I also know that many professionals want to permanently remove some components from Microsoft Windows XP, and of course, this chapter shows you how to do that as well. Last, this chapter shows you how to run processes with elevated privileges, something you must do if you want to distribute applications without the benefit of a software management infrastructure, and how to customize the logon process.

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 XP 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 XP 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 10, "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 XP. Well, the operating system doesn't provide a user interface for doing that. In the section "Removing Components," later in this chapter, I show you how to limit which components the setup program installs, though. Still, other components are required for the operating system to work properly. For example, Windows XP requires 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 XP 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 XP 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\Active Setup\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 XP executes the command it contains when the operating system creates a new user profile. If you don't see this value or the value is empty, it does nothing. So to keep Windows XP from running a component's just-in-time setup process, remove the value StubPath from that component's subkey in 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 13, "Cloning Disks with Sysprep," describes how to deploy settings on your disk images.

Note 

Why 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 like Outlook 2002 or similar. 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 goes for many of the other programs that come with Windows XP, including Windows Media Player, NetMeeting, and so on.

Outlook Express

When Windows XP creates a new user profile, it executes the command in the REG_EXPAND_SZ value HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\{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%\Outlook Express \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 15-1.

click to expand
Figure 15-1: Prevent Windows XP 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 15-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 15-1: Outlook.inf

start example

 [Version] Signature=$CHICAGO$ [DefaultInstall] DelReg=Reg.Settings [Reg.Settings] HKLM,SOFTWARE\Microsoft\Active Setup\Installed Components\{44BBA840-\ CC51-11CF-AAFA-00AA00B6015C},StubPath 

end example

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 (put this commandline 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, like 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 XP 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 XP 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 10, "Deploying User Profiles"). 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 XP from configuring desktop themes when it creates a user profile is an easy way to revert to the classic user interface (see Figure 15-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.

click to expand
Figure 15-2: Removing the value StubPath from the subkey {2C7339CF-2B09-4501-B3F3-F3508C9228ED} prevents Windows XP from configuring the new user interface.

Other Shortcuts

The key HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components contains other components with StubPath values that I haven't mentioned yet. You can prevent Windows XP 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 15-1 lists all the components I've already described plus the ones that I haven't.

Table 15-1: Components in Installed Components

Component

Subkey

StubPath

Address Book 6

{7790769C-0471-11d2- AF11-00C04FA35D02}

"%ProgramFiles%\Outlook Express\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%\Outlook Express\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 XP from configuring every component I show in the 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 you don't want from the All Users folder on your disk images.

Caution 

Be wary of preventing Windows XP from configuring the Windows Desktop Update. 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 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, 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.



Microsoft Windows XP Registry Guide
Microsoft Windows XP Registry Guide (Bpg-Other)
ISBN: 0735617880
EAN: 2147483647
Year: 2005
Pages: 185

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net