Microsoft Windows Registry Guide, Second Edition
ControlPanel
The key HKCU\Control Panel has a wealth of customization possibilities. This is the key where Windows stores most of the settings you configure in Control Panel. The most interesting subkeys are Desktop and Mouse. The following list gives you an overview of what's in most of the subkeys, and I describe the Desktop and Mouse subkeys in more detail in the sections following this one:
- Accessibility.
This subkey stores accessibility settings you set using the Accessibility Options dialog box. To open this dialog box, in Control Panel, launch Accessibility Options. The values' names are self-explanatory, and you can easily map them to the user interface.
- Appearance.
This subkey contains values for each scheme you see on the Appearance tab of the Display Properties dialog box. To open this dialog box, in Control Panel, launch Display, and then click the Appearance tab. Customizing themes in the registry is too cumbersome to do reliably, so stick with the user interface.
- Colors.
This subkey defines the color of each element in the Windows user interface. ActiveBorder defines the color of each active window's border, for instance. Each value is a \CONSOLE value that contains three decimal numbers that correspond to the RGB color notation.
- Current.
Windows does not use this subkey.
- Cursors.
This subkey contains values that associate the name of a mouse pointer with a file containing the mouse pointer. The file has the .cur extension, or if the pointer is animated, the .ani extension. The value's name is the name of the pointer. This key's default value contains the name of the current pointer scheme. You don't see values in this key unless you've customized your pointers in the Mouse Pointers dialog box. To open the Mouse Pointers dialog box, in Control Panel launch Mouse.
- Custom colors.
This subkey defines the custom colors in the color palette. The values in the Custom Colors subkey are named ColorA through ColorP, and all have a default value of 0xFFFFFF.
- Desktop.
See the “Desktop” section later in this appendix.
- Don't load.
This subkey indicates which Control Panel files to load. Windows consults the values in don't load to decide whether to display the option in Control Panel. The operating system looks for a value whose name is the same as the file. If the \CONSOLE value is Yes, the operating system displays the file's icon in Control Panel; otherwise, it doesn't display the icon.
- International.
This subkey contains a value called Locale that contains the ID of the user's locale. See Intl.inf in %SystemRoot%\Inf for a list of the locale IDs available. Configure this setting in the Regional And Language Options dialog box. To see this dialog box, in Control Panel launch Regional And Language Options. You see many other values in this subkey, which define settings such as the currency symbol, date format, list separator, and so on.
- Keyboard.
This subkey stores options configured in the Keyboard Properties dialog box. To display the Keyboard Properties dialog box, in Control Panel launch Keyboard. The most interesting value in this subkey is the \CONSOLE value InitialKeyboardIndicators. If the value is 0, Windows turns NUMLOCK off when it starts. If the value is 2, the operating system turns on NUMLOCK. The operating system stores the current state of NUMLOCK in this value when users log off or restart the computer.
- Mouse.
See the “Mouse” section later in this appendix.
- PowerCfg.
This subkey defines the schemes that you see in the Power Options dialog box. To open the Power Options dialog box, in Control Panel launch Power Options. The \CONSOLE value CurrentPowerPolicy indicates the current power scheme. You find that scheme in PowerCfg\PowerPolicies.
- Screen Saver.Name.
These subkeys contain settings unique to each screen saver. Name is the name of the screen saver.
- Sound.
This subkey contains the \CONSOLE value Beep, which indicates whether Windows beeps on errors. The operating system beeps on errors if this value is Yes.
Desktop
The values in HKCU\Control Panel\Desktop control many aspects of the Windows user interface. A good number of them don't have a user interface for configuring them, however, so there's a lot of potential in this subkey for customizing the operating system. The following list describes these values:
- ActiveWndTrkTimeout.
This REG_DWORD value indicates the time in milliseconds that the mouse pointer must remain over a window before Windows activates the window. The default value is 0.
- AutoEndTasks.
This \CONSOLE value determines whether the operating system ends tasks automatically when users log off or shut down Windows. If the value is 0, the operating system doesn't end processes automatically; instead, it waits until the timeout in HungAppTimeout expires and then displays the End Task dialog box. If the value is 1, the operating system automatically ends processes.
- CaretWidth.
This REG_DWORD value specifies the width of the blinking caret. The default value is 1. This value is not in the registry by default.
- CoolSwitch.
Windows doesn't use this value.
- CoolSwitchColumns.
This \CONSOLE value determines how many columns of icons you see in Task Switcher (ALT+TAB). The default value is 7.
- CoolSwitchRows.
This \CONSOLE value determines how many rows of icons you see in Task Switcher (ALT+TAB). The default value is 3.
- CursorBlinkRate.
This \CONSOLE value determines the amount of time in milliseconds that elapses between each blink of the selection cursor. The default value is 530, which is a little more than a half a second.
- DragFullWindows.
This \CONSOLE value determines whether users see windows' contents when they drag them. The default value is 1, which means users see full window contents when dragging. Set this value to 0 to see window outlines only.
- DragHeight.
This \CONSOLE value indicates the height of the rectangle that determines the start of a drag operation. The default value is 4.
- DragWidth.
This \CONSOLE value indicates the width of the rectangle that determines the start of a drag operation. The default value is 4.
- FontSmoothing.
This \CONSOLE value determines whether Windows smoothes the edges of large fonts using anti-aliasing techniques. The default value is 0, which disables font smoothing. To enable font smoothing, set the value to 2.
- ForegroundFlashcount.
This REG_DWORD value indicates the number of times that a taskbar button flashes to get the user's attention. The default value is 3. If the timeout value in ForegroundLockTimeout expires without user input, Windows automatically brings the window to the foreground.
- ForegroundLockTimeout.
This REG_DWORD value specifies the time in milliseconds that must elapse since the last user input before Windows allows windows to come to the foreground. The default value is 200,000 (200 seconds).
- GridGranularity.
Windows doesn't use this value.
- HungAppTimeout.
This \CONSOLE value controls how long Windows waits for processes to end in response to users' clicking the End Task button in Task Manager. If the timeout expires, Windows displays the End Task dialog box, which tells the user that the process did not respond to the request. The default value is 5000, or five seconds.
- LowPowerActive.
This \CONSOLE value indicates the status of the low-power alarm. If this value is 0, no alarm activates when battery power is low. This is the default value. If this value is 1, an alarm activates when battery power is low. This value affects only computers that use Advanced Power Management (APM).
- LowPowerTimeOut.
This \CONSOLE value determines whether a lower-power timeout is set. If this value is 0, the timeout is not set. This is the default value. If this value is 1, the timeout is set. This value affects only computers that use Advanced Power Management (APM).
- MenuShowDelay.
This \CONSOLE value determines the time in milliseconds that elapses between when the user points to a menu and when Windows displays it. The default value is 400, which is almost half a second.
- PaintDesktopVersion.
This REG_DWORD value determines whether Windows displays its version and build number on the desktop. The default value is 0, which doesn't display the version. Set this value to 1 to display the version of Windows on the desktop.
- Pattern.
This \CONSOLE value defines a two-color, 8-pixel-by-8-pixel bitmap used for the background. The default value is an empty string. To define a bitmap, set this value to B1 B2 B3 B4 B5 B6 B7 B8. BN is an 8-bit binary number that represents a row of 8 pixels. Bits that are 0 show the background color, whereas bits that are 1 show the foreground color.
- ScreenSaveActive.
This \CONSOLE value determines whether the user has selected a screen saver. The default value is 1, indicating that a screen saver is active. Set this value to 0 to indicate that a screen saver is not active.
- ScreenSaverIsSecure.
This \CONSOLE value has a default value of 0. This value indicates whether or not the screen saver is password-protected. The value 1 indicates the screen saver is password-protected; 0 indicates that it's not protected.
- ScreenSaveTimeOut.
This \CONSOLE value specifies the time in seconds that the computer must remain idle before the screen saver starts. The default is 600, which is 10 minutes.
- SCRNSAVE.EXE.
This \CONSOLE value has no default value. This value specifies the path and name of the screen-saver executable file. If the screen-saver file is in %SystemRoot%\System32, no path is necessary.
- TileWallpaper.
This \CONSOLE value indicates how to format wallpaper on the screen. If the value is 0, Windows centers the wallpaper. This is the default value. If the value is 1, Windows tiles the wallpaper.
- WaitToKillAppTimeout.
This \CONSOLE value indicates the time in milliseconds that Windows waits for processes to end after users log off or shut down Windows. If the timeout expires and processes are still running, Windows displays the End Task dialog box, unless you've set the value AutoEndTasks to end processes automatically. The default value is 20,000, which is 20 seconds.
- Wallpaper.
This \CONSOLE value is the path and file name of the image to use for wallpaper. The default value is an empty string. You don't need to include the path if the file is in %SystemRoot% or %SystemRoot%\System32. If you want to include wallpaper in a default user profile, copy the image file to the user profile folder and then specify the full path in this value.
- WallpaperStyle.
This \CONSOLE value determines how to display the wallpaper on the desktop. The default value is 0, which centers the bitmap on the desktop. Set this value to 2 to stretch the wallpaper.
- WheelScrollLines.
This \CONSOLE value specifies the number of lines to scroll for each one-notch rotation of the mouse wheel when users don't use modifier keys such as CTRL or ALT. The default value is 3. To turn off wheel scrolling, set this value to 0.
I left the value UserPreferencesMask out of the list because this value represents some of the most interesting and most useful ways to customize Windows. It's also more complicated than other values in the list because it's a bit mask that contains a large number of settings in one value. Lately, Microsoft has stayed away from using large bit masks like this one, favoring REG_DWORD values that you set to 0x00 to disable a feature and 0x01 to enable a feature. This value is a holdover from earlier versions of Windows, however. It's a 4-byte REG_BINARY value that might as well be a REG_DWORD value. The default value is 0x80003E9E, which will make more sense after you know what the different bits in this value represent.
Table C-1 describes each bit. Because this is a REG_BINARY value, count the bits from left to right, beginning with 0. If this were a REG_DWORD value, you'd count the bits from right to left instead. The table indicates each setting's bit number, describes the feature that it controls, and shows the bit mask. For any feature you see in the table, setting the bit to 0 disables the feature and setting it to 1 enables the feature. If you'd like to see an example of writing a script that changes settings in UserPreferencesMask, see Chapter 4, “Hacking the Registry.” Chapter 4 contains a script that updates this value to cause Windows to raise windows to the foreground when you point at them. For more information about doing bitwise math, see Chapter 1, “Learning the Basics.”
Bit | Bit Mask | Default | Description |
0 | 0x00000001 | 0 | Active window tracking. Windows get focus when the user positions the mouse pointer over them. |
1 | 0x00000002 | 1 | Menu animation. This depends on the value of bit 9. |
2 | 0x00000004 | 1 | Combo box animation. The combo boxes slide open. |
3 | 0x00000008 | 1 | List box smooth scrolling. The list boxes scroll smoothly. |
4 | 0x00000010 | 1 | Gradient captions. The title bars display a gradient. |
5 | 0x00000020 | 0 | Keyboard cues. Menu hotkeys are underlined only when accessed from the keyboard. |
6 | 0x00000040 | 0 | Active window tracking Z order. Windows that gain focus through active window tracking are brought to the foreground. |
7 | 0x00000080 | 1 | Mouse hot tracking. |
8 | 0x00000100 | 0 | Reserved for future use. |
9 | 0x00000200 | 1 | Menu fade animation. Menus fade when closed; otherwise, menus use slide animation. |
10 | 0x00000400 | 1 | Selection fade animation. Lists fade after users make a selection. |
11 | 0x00000800 | 1 | ToolTip animation. This depends on bit 12. |
12 | 0x00001000 | 1 | ToolTip fade animation. ToolTips fade when they close. When the bit is set to 0, ToolTips use slide animation. |
13 | 0x00002000 | 1 | Cursor shadow. This requires more than 256 colors. |
31 | 0x80000000 | 1 | All user-interface effects. This enables combo box animation, cursor shadow, gradient captions, hot tracking, list box smooth scrolling, menu animation, menu hotkey underlining, selection fade, and ToolTip animation. |
Desktop\WindowMetrics
The key HKCU\Control Panel\Desktop\WindowMetrics contains settings that govern the dimensions of the elements you see on the screen. Some of these settings represent dimensions in pixels, whereas others are actually coordinates. The following list describes the settings in WindowMetrics, which you define by clicking Advanced on the Display Properties dialog box's Appearance tab, as shown in Figure C-3.
Figure C-3 After you've configured the settings in this dialog box, consider exporting them to a REG file so that you can use the same settings on other computers.
- BorderWidth.
This \CONSOLE value determines the width of the borders for all windows that users can't resize. The default is -15, which is 15 twips. (The minus sign indicates a twip, which is 1/1440th of an inch.) Valid values are 0 through -750.
- CaptionFont.
This REG_BINARY value contains the name of the font to use in window captions. The default is Trebuchet MS.
- CaptionHeight.
This \CONSOLE value specifies the height of caption buttons. This value is measured in twips, and the default value is -375.
- CaptionWidth.
This \CONSOLE value specifies the width of caption buttons. This value is measured in twips, and the default value is -270.
- IconFont.
This REG_BINARY value contains the name of the font used to display icon text. The default value is Tahoma.
- IconSpacing.
This \CONSOLE value specifies the width of the grid cell used to display the large view of an icon. This value is measured in twips, and the default is -1125.
- IconTitleWrap.
This \CONSOLE value determines whether icon text wraps or truncates when it's too long to fit on one line. The default value is 1, which causes icon text to wrap; 0 causes icon text to truncate.
- IconVerticalSpacing.
This \CONSOLE value specifies the vertical space between icons. This value is measured in twips, and the default is -1125.
- MenuFont.
This REG_BINARY value specifies the font to use in menu bars. The default value is Tahoma.
- MenuHeight.
This \CONSOLE value specifies the height of menu bars. This value is measured in twips, and the default is -285.
- MenuWidth.
This \CONSOLE value specifies the width of buttons on menu bars. This value is measured in twips, and the default is -270.
- MessageFont.
This REG_BINARY value contains the name of the font to use in message boxes. The default value is Tahoma.
- MinAnimate.
This \CONSOLE value determines whether Windows uses animation for minimizing and restoring windows. The default value is 1, which uses animation. Set this value to 0 to prevent window animation.
- ScrollHeight.
This \CONSOLE value specifies the height of horizontal scroll bars. The default value, measured in twips, is -255.
- ScrollWidth.
This \CONSOLE value specifies the width of vertical scroll bars. The default value, measured in twips, is -255.
- Shell Icon BPP.
This \CONSOLE value determines the color depth of icons on the desktop. The default value is 4, but valid values include 4 (16 colors), 8 (256 colors), 16 (65,536 colors), 24 (16,777,216 colors), and 32 (4,294,967,296 colors).
- Shell Icon Size.
This \CONSOLE value specifies the size in pixels of icons that Windows Explorer displays. The default value is 32. Valid values range from 16 to 48 pixels.
- SmCaptionFont.
This REG_BINARY value specifies the font to use for small captions. The default value is Tahoma.
- SmCaptionHeight.
This \CONSOLE value specifies the height of small captions. This value is measured in twips, and the default is -255.
- SmCaptionWidth.
This \CONSOLE value specifies the width of small captions. This value is measured in twips, and the default is -255.
- StatusFont.
This REG_BINARY value specifies the font to use in status bars. The default value is Tahoma.
Mouse
The values in HKCU\Control Panel\Mouse configure the mouse. The following list describes these values, including their types and default values:
- DoubleClickHeight.
This \CONSOLE value specifies the height of the rectangle that Windows uses to detect double-clicks. If two clicks are within the rectangle and within the time specified by the value DoubleClickSpeed, the clicks are combined into a double-click. The default value is 4.
- DoubleClickSpeed.
This \CONSOLE value specifies the amount of time that can elapse between two mouse clicks for Windows to consider them a double-click. If the amount of time between clicks is greater than this timeout, the operating system considers them separate clicks. The default value is 500, which is half a second, and the valid range is 100 through 900.
- DoubleClickWidth.
This \CONSOLE value specifies the width of the rectangle that Windows uses to detect double-clicks. If two clicks are within the rectangle and within the time specified by the value DoubleClickSpeed, the clicks are combined into a double-click. The default value is 4.
- MouseSpeed.
This \CONSOLE value determines how fast the pointer moves in response to mouse movements. Valid values are 0, 1, and 2. The default value is 1. When this value is 0, Windows doesn't accelerate the mouse. When this value is 1, Windows doubles the mouse speed when it exceeds the value in MouseThreshold1. When this value is 2, Windows doubles the mouse speed when it exceeds the value in MouseThreshold1 and quadruples the mouse speed when it exceeds the value in MouseThreshold2.
- MouseThreshold1.
This \CONSOLE value, measured in pixels, specifies the mouse speed that triggers mouse acceleration. The default value is 6.
- MouseThreshold2.
This \CONSOLE value, measured in pixels, specifies the mouse speed that triggers quadruple mouse acceleration. The default is 10.
- MouseTrails.
This \CONSOLE value specifies whether mouse trails are enabled or disabled. Setting this value to 0 disables mouse trails; setting it to 1 enables them.
- SnapToDefaultButton.
This \CONSOLE value determines whether the mouse snaps to the default button when you open a dialog box. The default value is 0, which turns off this feature. To enable this feature, set the default value to 1.
- SwapMouseButtons.
This \CONSOLE value determines whether Windows swaps the left and right mouse buttons. The default value is 0, which disables this feature. To swap the mouse buttons, set this value to 1.