The itty-bitty key
contains a single
indicates how many
programs are running in the foreground. Each time you
By far, the most interesting subkey is Microsoft because it contains most of the Windows per-user settings. This
contains per-user file associations and class registrations. It's really a link to
, which you learned about in Chapter 1, “Learning the Basics.” File associations in
have precedence over file associations in
. Per-user file associations
Command-prompt windows support file and folder name completion, as well as a few other features. You can configure these features using Tweak UI, as described in Chapter 5, “Mapping Tweak UI,” or you can hack them directly in the registry. These are settings that I apply to just about every computer I use, so I keep them handy in a script. The following list describes the settings in the subkey Command Processor, which configure the
Microsoft\Internet Connection Wizard
HKCU\Software\Microsoft\Internet Connection Wizard
contains a single value that indicates whether users have run the wizard. Unlike earlier versions of Windows, the wizard doesn't run automatically when users first
The key HKCU\Software\Microsoft\Internet Explorer contains per-user settings for Internet Explorer. Many subkeys in Internet Explorer are difficult to understand or uninteresting. Many of the changes that Windows XP Service Pack 2 and Windows Server 2003 Service Pack 1 make to HKCU are in this branch, though. There are settings in this key that are very useful to customize:
contains two other subkeys that enable some pretty cool customizations. The first subkey is
. This subkey enables you to extend Internet Explorer's
Right-click a Web page, and Internet Explorer displays a shortcut menu. You can customize this shortcut menu by adding commands to it that you link to scripts in an HTML file. For example, you can add a command to the shortcut menu that opens the current Web page in a new window or highlights the selected text on it.
Internet Explorer looks for extensions in HKCU\Software\Microsoft\Internet Explorer\MenuExt . Add this key if it doesn't exist, and then add a subkey for each command that you want to add. Then set that subkey's default value to the path and name of the HTML file containing the script that carries out the command. For example, to add the command Magnify to the shortcut menu that runs the script in the HTML file C:\Windows\Web\Magnify.htm, add the subkey Magnify and set its default value to C:\Windows\Web\Magnify.htm . When you choose this command on Internet Explorer's shortcut menu, it executes the script that the file contains. Then you need to create Magnify.htm. Listing C-1 is Magnify.htm. The property external.menuArguments contains the window object in which you executed the command. Because you have access to the window object, you can do almost anything in that window, such as reformatting its contents, and so on.
Listing C-1 Magnify.htm
You can choose the shortcut menus to which Internet Explorer adds your command. In the subkey you created for the extension, add the REG_DWORD value Contexts, and apply the bit masks shown in Table C-3 to it. For example, to limit the previous example so that Internet Explorer displays it only for text selections, add the REG_DWORD value Contexts to Magnify , and set it to 0x10 .
Search URLs are a
is where you create search URLs. If you don't see this subkey, create it. Then add a subkey for each search prefix you want to use. To use the example I just gave you, create the subkey
. Set the default value of the prefix's subkey to the URL of the search engine. Use
as a placeholder for the search string. Internet Explorer
values shown in Table C-4 to the prefix key you created. These values describe what to substitute for special characters in your search string, including a space, percent sign (%), ampersand (&), and plus sign (+). These
Finding the URL to use is easy. Open the search engine that you want to add to Internet Explorer's search URLs, and then search for something. When the browser displays the results, copy the URL from the address bar to the default value of the search URL you're creating, replacing your search word with a %s . For example, after searching eBay for sample , the resulting URL is http://search.ebay.com/search/search.dll?MfcISAPICommand=GetResult&ht=1&SortProperty=MetaEndSort&query=sample . Replace sample with %s to get http://search.ebay.com/search/search.dll?MfcISAPICommand=GetResult&ht=1&SortProperty= MetaEndSort&query=%s .
The key HKCU\Software\Microsoft\MessengerService contains the settings for Windows Messenger:
This is where Office 2003 Editions stores its per-user settings. In reality, most IT professionals will use the tools outlined in Chapter 17, “Deploying Office 2003 Settings,” instead of customizing these settings for deployment. However, a brief tour of these settings is useful, and a handful of settings are important enough to explain a bit more about them here.
First I'll describe what's in HKCU\Software\Microsoft\Office . At the top of this key, you'll see one subkey for each version of Office that's installed on the computer. For example, you'll see the subkeys 11.0 , 10.0 , and 9.0 . Version 11.0 is Office 2003 Editions. Note that installing Office 2003 Editions creates the keys 8.0 , 9.0 , 10.0 , and 11.0 , even though you don't have Office XP or an earlier version of Office on the computer. You'll also see a subkey for the different programs in Office at the top of Office . Although user settings are in HKCU\Software\Microsoft\Office\ version , information about add-ins is in HKCU\Software\Microsoft\Office\ program , and all Office applications share this information.
The subkey 11.0 contains the majority of the Office 2003 Editions settings, whereas the remaining subkeys contain only a handful of settings. For example, in the key 10.0 , you see subkeys for each application—Excel, FrontPage, Outlook, Word, and so on. You also see the subkey Common , which contains settings that are common to all the programs in Office 2003 Editions. Some of these settings are important to know about for two reasons. First, the more you understand about them, the more successful you'll be at customizing Office 2003 Editions. Second, you can deploy some Office 2003 Editions settings only as registry values in Custom Installation Wizard. Simply put, the only way to customize a REG_BINARY value in Custom Installation Wizard is by using the Add/Remove Registry Entries screen. You can't customize these settings on the Change Office User Settings screen. Here's a description of these and other important settings:
The key HKCU\Software\Microsoft\Search Assistant contains the configuration for the Windows Explorer and Internet Explorer Search Assistant. The \CONSOLE value Actor contains the file name of the character that the assistant uses. The REG_DWORD value UseAdvancedSearchAlways is 0x01 if you've configured the assistant to always display its advanced search features. You don't see the REG_DWORD value SocialUI unless you've turned off the animated character. If this value is 0x01 , you'll see the animated character. If this value is 0x00 , you won't. Most folks don't like the new search interface, and they can restore it to a user interface more similar to the one in Windows 2000 by setting SocialUI to 0x00 and UseAdvancedSearchAlways to 0x01 . I admit that I like the little dog, so I usually leave SocialUI set to 0x01 but use the advanced search features.
Search Assistant's history list is in the subkey ACMru . This subkey contains a variety of subkeys, depending on the types of things for which you've searched. For example, if you search for files and folders, you'll see the subkey 5603 , and that subkey contains a list of the different search strings. If you search the Internet using Search Assistant, you'll see the subkey 5001 . You can remove each subkey individually to clear a specific type of query's history list, or you can remove the key ACMru to clear all of Search Assistant's history lists. Table C-5 contains a list of the subkeys that I've found in ACMru .
is an important subkey if you're deploying Office 2003 Editions. This is where Office 2003 Editions stores its list of trusted sources. When users open a document that contains signed code, enable those macros, and then add the source to the list of trusted sources, Office 2003 Editions stores those certificates in this key. The reason this key is important is that most businesses should lock the list of trusted sources so that users can't add to it, and then set the security level to high. This
The problem with this scenario is that only Office 2003 Editions provides a tool (the Custom Installation Wizard) to customize this list. With earlier versions of Office, no tool is available to distribute trusted sources. Users can't run
Windows stores policies in the key HKCU\Software\Policies , the preferred branch for registry-based policies. These are per-user policies, so they are in the HKCU branch of the registry. Restricted users don't have permission to change the Policies subkey, which prevents them from circumventing policies by editing the registry. Windows supports hundreds of policies that enable IT professionals to control users' experiences, lock down the desktop, and so on. Chapter 7, “Using Registry-Based Policy,” shows you how to customize policies by building custom administrative templates.
Very often, using policies is the best and most interesting way to customize Windows. For example, many customizations you learn about in Chapter 4, “Hacking the Registry,” rely on policy settings in the registry to change behaviors. Some of the most interesting policies you learn about in Chapter 4 change how the Start menu and taskbar look and feel. Still other policies enable you to obliterate annoying behavior. Ever wanted to prevent Windows Messenger from running? You can set a policy in this subkey that does that.
Although editing the registry directly is one way to customize these policies, there are better ways. The first way is to use Group Policy Editor to edit the local Group Policy Object (GPO). This provides a user interface for the policies, limiting your settings to valid choices. Chapter 7 describes how to create a local GPO. In short, type gpedit.msc in the Run dialog box, and then edit the policies under Computer Configuration and User Configuration in Administrative Templates. The second way is to write scripts that change policies. I use scripts when I want to repeat the same setting many times, such as when I'm configuring my user profile on multiple computers or when I reinstall Windows on computers repeatedly. Chapter 11, “Scripting Registry Changes,” shows you how to write scripts to edit the registry. Personally, my favorite method is writing INF files.