oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button

Windows Server Hacks: Customizing Windows' Just-in-Time Setup

by Mitch Tulloch, author of Windows Server Hacks

When Windows XP is installed on a desktop machine and a person logs on for the first time, a user profile is created for him. This user profile contains per-user settings contained in a Registry hive called NTUSER.DAT and also folders like Desktop, Start Menu, and My Documents that are specific to the desktop environment for that user. These user profiles separate the desktop environment and personal data files for each user, which is an important consideration if more than one person will be using the machine. By default, all user profiles (plus special profiles like Default User and All Users) are found in the Documents and Settings folder on the system drive of the machine.

When somebody first logs on, her user profile is created through a process that involves several steps. First, a copy is made of the Default User profile, and the new folder is named after the name of the user account associated with the user. This is handy because it means that if you are performing an image-based deployment of Windows XP on your network, you can customize the Default User profile and its folders before you image your base system. Then when you deploy your images, users will log on to their machines and their own user profiles will be similarly customized.

In the next step of the profile creation process, any settings found in the All Users profile are merged into this copy. This is how shared Start menu items and shared documents folders are added to your profile when it is created.

The final step of the profile creation process is something called just-in-time setup. This process is run to finish the configuration of the user's profile by adding shortcuts to certain items like Outlook Express, Internet Explorer, and Windows Media Player.

Related Reading

Windows Server Hacks
100 Industrial-Strength Tips & Tools
By Mitch Tulloch

It's this final step in the process that can be annoying to administrators deploying desktop machines in the enterprise. That's because occasionally you don't want some of these shortcuts to appear on users' desktops. For example, say you have installed Microsoft Office on your base machine, customized the Default User and All Users profiles as needed, and imaged your system. Then you deploy it to 100 desktops. Pretty soon you start getting help-desk calls like "Why do I have two email programs?" The problem is that by default, the just-in-time setup process for user profile creation adds a shortcut to Outlook Express in the user's Start menu and also on the Quick Launch toolbar. And since users are curious creatures, their curiosity often gets the better of them and they try clicking on one of these shortcuts, and then Outlook Express launches as their mail client. This can be confusing if you intend for them to use Outlook as their email client instead of Outlook Express.

So ideally, as an administrator you'd like to either (a) remove Outlook Express from your deployment entirely, (b) render it innocuous, or alternatively, (c) hide it so the average user won't find it. Unfortunately, you get rid of these Outlook Express shortcuts simply by editing the Default User or All Users profiles, so how should you proceed?

The Solution

First of all, you can't remove Outlook Express from Windows XP. It may surprise you, but it seems OE is actually integrated into the operating system in much the same way Internet Explorer is. Not only that, but Microsoft Office also actually uses some of the components of OE to function properly. So the first possibility above isn't feasible.

You can, however, render OE innocuous to the average user. To do that, customize the Default User profile by adding an /outnews switch to the end of the Target field for the OE shortcut's properties:

Figure 1
Figure 1. Turning Outlook Express into a newsreader-only client

The result of doing this will be that when the user clicks on the OE shortcut, it will open OE in newsreader-only mode so the user won't be able to use it as a mail client. That will work, but if your company doesn't allow Usenet access or lacks a news server, then you're still going to get "What's this?" calls to the help desk.

A better solution is to customize the just-in-time setup process. This involves a bit more work. Begin by opening the Registry Editor and finding the following key:

HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components

Each subkey under Installed Components controls some portion of the JIT setup process for creating profiles. The subkey that controls Outlook Express is:


If you select this subkey in the left pane, you'll see a StubPath value in the right pane:

Figure 2
Figure 2. StubPath value under the {44BBA840-CC51-11CF-AAFA-00AA00B6015C} key

To prevent JIT setup from creating shortcuts for OE when a new user profile is created, change the name of this value from StubPath to HideStubPath:

Figure 3
Figure 3. Rename StubPath to HideStubPath

Now image your system and deploy it, and when a user logs on for the first time, there will be no shortcuts to Outlook Express visible. Of course, a really bored user might open up Windows Explorer and try clicking on every executable file he can find in the C:\Program Files directory and its subdirectories and thus eventually stumble upon Outlook Express, call the help desk, and ask, "Why are there two email programs?"

Mitch Tulloch is the author of Windows 2000 Administration in a Nutshell, Windows Server 2003 in a Nutshell, and Windows Server Hacks.

Return to the Windows DevCenter.