The key HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion , and all its subkeys, contains some of the most interesting settings in HKLM . First, this key has a number of REG_SZ and REG_EXPAND_SZ values that are interesting:
The default value for App Paths\ filename, where filename is the program file's name including the .exe file extension, contains the command that executes the program. For example, the default value of App Paths\Wordpad.exe contains %ProgramFiles% \Windows NT\Accessories\WORDPAD.EXE . You can add other programs to the App Paths subkey so that you can run them without typing their paths. The value Path is optional, and it specifies the working path for the program, which is the path where the program finds additional program files. This path is usually to the folder containing the program file.
subkey contains per-computer settings for Windows accessories. By default, you find a single subkey,
, but other accessories store per-computer settings here after you run them. The more interesting
The key Explorer contains Windows Explorer settings. These are per-computer settings, and they're not as interesting to customize as the same subkey in HKCU . The subkey Advanced defines the settings you see in Explorer's Folder Options dialog box. There's not a lot to customize here because they're templates, but it's interesting to see how Windows Explorer defines and collects these settings.
is the key where you find associations between different types of media and the applications that handle them. When Windows detects that you've inserted a CD, DVD, or removable disk, it automatically runs the program that it
The subkey Desktop\Namespace defines the objects you see on the Windows desktop. It contains one subkey for each object, and the name is the class ID of the object's class registration in HKCR . Appendix A, “File Associations,” contains more information about HKCR . Don't remove subkeys to hide desktop icons, though. The best way is to use HideDesktopIcons , which you learn about later in this appendix.
The subkey FindExtensions defines the different extensions that you can use to search. The subkey Static contains three subkeys: ShellSearch , WabFind , and WebSearch . The subkey ShellSearch defines the extensions that enable you to search for files, computers, and printers. The subkey WabFind defines the extensions that enable you to search address books. Last, the subkey WebSearch defines the extensions that enable you to search the Internet.
specifies which icons to show or hide on the desktop. You see two subkeys below the key
. The first is
. It affects the classic Start menu. This subkey contains
The subkey HideMyComputerIcons specifies which icons to show or hide in the My Computer folder. This subkey contains REG_DWORD values. The names of these values are the GUID of the object's class registration. The value is either 0x01 , which indicates that Windows should hide the icon, or 0x00 , which indicates that Windows shouldn't hide the icon.
The MyComputer subkey specifies the path and file name of the special tools you see when you right-click a drive in My Computer and then click Properties. The following subkeys define these paths:
The subkey MyComputer\NameSpace also serves a similar purpose to the subkey Desktop\NameSpace . It defines the objects you see in My Computer. By default, this subkey doesn't contain any GUIDs. You can add subkeys to this subkey named for the object's GUID to add objects to My Computer, though.
The subkey NetworkNeighborhood\Namespace defines the objects you see in the My Network Places folder. It contains one subkey for each object, and the name is the class ID of the object's class registration in HKCR . By default, you see icons for Network Setup Wizard and Add Network Place.
defines the objects you see when you browse remote computers in the My Network Places folder. It contains one subkey for each object, and the name is the class ID of the object's class registration in
. You see icons for the Printers and Scheduled
defines templates for the settings you see in the Taskbar And Start Menu Properties dialog box. Because these are templates, they aren't often useful to customize. Their
Explorer\User Shell Folders
Windows maintains a set of shared folders in the All Users profile folder, which is in % SystemRoot %\Documents and Settings. The operating system specifies the paths of these folders in User Shell Folders under HKLM . Table D-3 describes each value you find in User Shell Folders and the default path. The first column is the folder's internal name, and the second is the default path. You can redirect these folders to different locations by changing the path in User Shell Folders .
The values in Table D-3 are
values, so you can use environment variables in them. Use %AllUsersProfile% in a path to direct the folder somewhere inside the All Users profile folder. To redirect the Common Favorites folder to the network, set the value
The subkey VisualEffects contains templates for the settings you see in the Performance Options dialog box. They aren't useful for customizing Windows, but they are handy to map specific settings to their corresponding registry settings.
The key HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies is the policy branch that Windows inherits from earlier versions of Windows. Windows still stores many policies in this branch, although the new, preferred policy branch is HKLM \SOFTWARE\Policies . Often, the settings you find in this key are leftovers from old-style policy files that have tattooed the registry.
Windows runs the commands in the subkey Run for every user who logs on to the computer every time they log on. The name of each value in this subkey is arbitrary. The operating system runs the command in each REG_SZ value, though. So if you don't want to use the Start Up group in the Program Files menu to run programs when you log on to the computer, you can add the command to the Run subkey. Although this subkey affects all users because it's in HKLM , the commands in HKCU\Software \Microsoft\Windows\CurrentVersion\Run are per-user commands. Chapter 18, “Fixing Common IT Problems,” describes a useful workaround using this subkey.
subkey is similar to the
subkey. The difference is that Windows
The Uninstall key describes how to remove applications using the Add Or Remove Programs dialog box. Each subkey, Uninstall\ Name, describes how to remove the program. For example, the Add Or Remove Programs dialog box uses the REG_SZ value DisplayName to display the program's name in the list, and the REG_SZ value UninstallString contains the command that it uses to uninstall the program.
Some programs store more information in the Uninstall key. For example, in Uninstall\SnagIt5 , TechSmith SnagIt stores the location in which you installed the program so that it can find the program files to remove. Some programs store the location of any shortcuts they create in Uninstall\ Name so that they can remove those when you remove the program.