SOFTWARE\Microsoft\Windows\CurrentVersion
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:
This value contains the path of Windows common files. The default location is C:\Program Files\Common Files.
This value defines the locations where Windows finds device-driver INF files. %SystemRoot%\inf;%SystemDrive%\Windows\Drivers is the default for this value.
This value defines the default location for media files. The default value is C:\Windows\Media.
This value is the same as MediaPath, except that it's a REG_EXPAND_SZ value that includes environment variables.
This value defines the name of the Accessories group on the Program Files menu. The default value is Accessories.
This value contains the Windows product ID. This is not the product key that you typed when you registered Windows.
This value contains the location of profile files. The default value is C:\Program Files.
This value is the same as ProgramFilesDir, except that it uses environment variables. The default value is %ProgramFiles%.
This value contains the name of the Accessories group on the Start menu. The default value is Accessories.
This value contains the name of the Games group on the Start menu. The default value is Games.
This value contains the default location for Windows wallpaper. The default value is %SystemRoot%\Web\Wallpaper.
App Paths
The subkey App Paths specifies the paths of specific program files. It enables you to run a program from the Run dialog box or a command-prompt window without specifying its path. For example, you can type Wordpad.exe in the Run dialog box, and Windows looks up the program's path in the App Paths key.
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.
Applets
The Applets subkey contains per-computer settings for Windows accessories. By default, you find a single subkey, DeluxeCD, but other accessories store per-computer settings here after you run them. The more interesting accessory settings are in HKCU\Software\Microsoft\Windows\CurrentVersion\Applets, though.
Explorer
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.
Explorer\AutoplayHandlers
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers \EventHandlers 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 associates with the type of content on that disk. In Table D-2, look up the type of content you want to customize. Then open the subkey shown in the Subkey column for EventHandlers. In that subkey, add any of the following handlers as an empty REG_SZ value:
MSCDBurningOnArrival
MSGenericVolumeArrival
MSOpenFolder
MSPlayCDAudioOnArrival
MSPlayDVDMovieOnArrival
MSPlayMediaOnArrival
MSPlayMusicFilesOnArrival
MSPlayVideoFilesOnArrival
MSPrintPicturesOnArrival
MSPromptEachTime
MSPromptEachTimeNoContent
MSShowPicturesOnArrival
MSTakeNoAction
MSVideoCameraArrival
MSWiaEventHandler
Media | Subkey |
Generic | GenericVolumeArrival |
Blank CDR | HandleCDBurningOnArrival |
Mixed content | MixedContentOnArrival |
CD audio | PlayCDAudioOnArrival |
DVD | PlayDVDMovieOnArrival |
Music files | PlayMusicFilesOnArrival |
Video files | PlayVideoFilesOnArrival |
Digital images | ShowPicturesOnArrival |
Video camera | VideoCameraArrival |
Explorer\Desktop\NameSpace
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.
Explorer\FindExtensions
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.
Explorer\HideDesktopIcons
The subkey HideDesktopIcons specifies which icons to show or hide on the desktop. You see two subkeys below the key HideDesktopIcons. The first is ClassicStartMenu. It affects the classic Start menu. 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 subkey NewStartPanel affects the new Start menu. Its organization is similar to the subkey ClassicStartMenu.
Explorer\HideMyComputerIcons
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.
Explorer\MyComputer
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 default value of this subkey contains the command to run when users right-click a drive in My Computer, click Properties, and then click Backup Now on the Tools tab.
The default value of this subkey contains the command to run when users right-click a drive in My Computer, click Properties, and then click Disk Cleanup on the General tab.
The default value of this subkey contains the command to run when users right-click a drive in My Computer, click Properties, and then click Defragment Now on the Tools tab.
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.
Explorer\NetworkNeighborhood\NameSpace
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.
Explorer\RemoteComputer\NameSpace
The subkey RemoteComputer\NameSpace 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 HKCR. You see icons for the Printers and Scheduled Tasks folders on remote computers. If browsing remote computers is a slow process, you can remove the subkeys in the RemoteComputer\NameSpace key. This prevents Windows from looking up the remote printers and scheduled tasks on remote computers and could speed up browsing a bit.
Explorer\StartMenu
The subkey StartMenu 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 usefulness to you as a power user or IT professional is in sorting out where Windows stores settings and each setting's values in the registry.
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 REG_EXPAND_SZ 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 Common Favorites to \\Server\Share. The next time the operating system starts, Windows updates a second key, HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders, with the paths from User Shell Folders. Windows doesn't actually use the values in Shell Folders.
Name | Default Path |
Common AppData | %AllUsersProfile%\Application Data |
Common Desktop | %AllUsersProfile%\Desktop |
Common Documents | %AllUsersProfile%\Documents |
Common Favorites | %AllUsersProfile%\Favorites |
Common Programs | %AllUsersProfile%\Start Menu\Programs |
Common Start Menu | %AllUsersProfile%\Start Menu |
Common Startup | %AllUsersProfile%\Start Menu\Programs\Startup |
Common Templates | %AllUsersProfile%\Templates |
Explorer\VisualEffects
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.
Policies
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.
Run
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.
RunOnce
The RunOnce subkey is similar to the Run subkey. The difference is that Windows removes commands from the RunOnce subkey after running them. Thus, commands in the RunOnce subkey execute only one time.
Uninstall
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.