Special Offers

Microsoft® Windows® XP Registry Guide
Author Jerry Honeycutt
Pages 528
Disk N/A
Level Advanced
Published 09/11/2002
ISBN 9780735617889
ISBN-10 0-7356-1788-0
Price(USD) $39.99
To see this book's discounted price, select a reseller below.

More Information

About the Book
Table of Contents
Sample Chapter
Related Series
Related Books
About the Author

Support: Book & CD

Rate this book
Barnes Noble Amazon Quantum Books


Chapter 5: Mapping Tweak UI

5   Mapping Tweak UI

Microsoft Tweak UI is a must-have tool for anyone customizing Microsoft Windows XP. It prevents users from opening the registry and customizing settings that aren't available in the operating system's user interface. Tweak UI started as a grassroots utility built by a handful of rebellious programmers and ended up one of the most popular downloads on the Internet. Microsoft has released versions of this tool for every version of Windows since Microsoft Windows 95. The company even included it on the Microsoft Windows 98 CD. And now, it's available for Windows XP, and it includes even more customizations.

You can download Tweak UI from (Microsoft split the original Microsoft Power- Toys programs apart). You can also download it from, one of my favorite download Web sites. The file you download is called TweakUiPowertoySetup.exe. Run this program to install Tweak UI on your computer. To run Tweak UI, click Start, All Programs, Powertoys for Windows XP, and Tweak UI for Windows XP. In the left pane, click a category, and then in the right pane, edit the settings you want to change. The program is mostly self-explanatory; you see a description of each setting at the bottom of the window. Pay attention to the bottom part of the windows. It tells you whether the settings in that category are per-user or per-machine. Per-user settings sometimes require you to log off and back on to Windows XP in order for them to take affect. Per-machine settings affect every user who logs on to the computer.

This chapter isn't about using Tweak UI—that's too easy. Instead, I'll tell you where in the registry Tweak UI changes each setting. Information like this is powerful. You can script Tweak UI customizations. For example, power users can write a script to apply their favorite Tweak UI settings, and then apply all those settings to every computer they use simply by running the script. The process is streamlined—compare one double-click to dozens of clicks and edits—and the consistency doesn't hurt, either. IT professionals can write a script to deploy useful settings to users or include those settings in default user profiles for new users (see Chapter 10, "Deploying User Profiles"). Scripting these settings is amazingly easy, and you learn how to do that in Chapter 9, "Scripting Registry Changes."

The sections in this chapter correspond to the major categories in Tweak UI. (I skipped the About and Repair categories because they have little to do with the registry. You should look at both, though. The About category contains useful tips for using Windows XP. The Repair category can fix a variety of small problems, including messed up icons, fonts, and folders.) Each section contains a brief description of the settings in that category and how to change them in the registry. In most cases, each section contains a table that describes each setting's value name, value type, and value data. Each table contains subheadings that show the key for the values following it.


The items in the Settings list in the General category are effects that you can enable or disable. In fact, the Settings list, shown in Figure 5-1, used to be called the Effects list in earlier versions of Tweak UI. Settings range from list box and window animations to menu fading. Disable these settings only on slower computers when you think you can improve the user interface's crispness; otherwise, these settings make Windows XP look great.

Click to view graphic
Click to view graphic

Figure 5-1 Many of these settings are in the Performance Options dialog box. Right-click My Computer, click Properties, and in the Performance area of the Advanced tab of the Properties dialog box, click Settings.

You see all the settings in the General category in Table 5-1. One value needs a bit of explaining, though: UserPreferencesMask. The bits in this REG_BINARY value are various settings, which Chapter 4, "Hacking the Registry," and Appendix B, "Per-User Settings," describe in detail. To turn on a setting, set the appropriate bit to 1 in UserPreferencesMask. To turn off a setting, clear the corresponding bit. The number in the Data column tells you which bit to toggle. The easiest way to toggle the bit is to use Calculator in scientific mode. Bitwise math is beyond most simple scripting techniques, including REG files. If you want to create a script to change the settings in UserPreferencesMask, use INF files or look to Windows Scripting Host (see Chapter 9, "Scripting Registry Changes").

Table 5-1 Values in General

HKCU\Control Panel\Sound   
Beep on errorsBeepREG_SZYes | No
HKCU\Control Panel\Desktop   
Enable combo box animationUserPreferencesMaskREG_BINARYBit 0x0004
Enable cursor shadowUserPreferencesMaskREG_BINARYBit 0x2000
Enable list box animationUserPreferencesMaskREG_BINARYBit 0x0008
Enable menu animationUserPreferencesMaskREG_BINARYBit 0x0002
Enable menu fadingUserPreferencesMaskREG_BINARYBit 0x0200
Enable menu selection fadingUserPreferencesMaskREG_BINARYBit 0x0400
Enable mouse hot tracking effectsUserPreferencesMaskREG_BINARYBit 0x0080
Enable tooltip animationUserPreferencesMaskREG_BINARYBit 0x0800
Enable tooltip fadeUserPreferencesMaskREG_BINARYBit 0x1000
Show Windows version on desktopPaintDesktopVersionREG_DWORD0X00 | 0X01
HKCU\Control Panel\Desktop\WindowMetrics   
Enable Window AnimationMinAnimateREG_SZ0 | 1


When an application needs your attention—or when it simply wants to annoy you—it steals the focus from the application in which you're currently working. This leads to frustration as you flip back and forth between windows. The settings in the Focus category prevent that scenario by causing applications to flash their taskbar buttons to get your attention rather than stealing focus from the application in the foreground.

Table 5-2 describes the settings in the Focus category. The default value for ForegroundLockTimeout is 0x00030D40, or 200000. This value is the time in milliseconds before Windows XP allows an application to steal the focus from the foreground application. To convert 200000 to seconds, divide it by 1000 (200 seconds). You see the value ForegroundFlashCount in the table twice, because setting it to 0 causes the taskbar button to flash until you click it; otherwise, the taskbar button flashes the number of times you set in ForegroundFlashCount.

Table 5-2 Values in Focus

HKCU\Control Panel\Desktop   
Prevent applications from stealing focusForegroundLockTimeoutREG_DWORDN
Flash taskbar button until I click on itForegroundFlashCountREG_DWORD0x00
Flash taskbar button N timesForegroundFlashCountREG_DWORDN


The settings in the Mouse category control the rodent's sensitivity. Before adjusting these values manually, use Tweak UI to figure out what the best settings are for you. You can use the test icon, shown in Figure 5-2, to try different values. After you've settled on a value, you're good to go.

Click to view graphic
Click to view graphic

Figure 5-2 Use Tweak UI to find suitable values before trying to set mouse sensitivity values manually.

The first value in Table 5-3 (on the next page), MenuShowDelay, is the time in milliseconds that Windows XP waits before opening a menu to which you point. The default is 400, or .4 seconds, but you can cut that number in half if you want menus to open faster. The values DragHeight and DragWith are the settings that specify the distance (in number of pixels) that you must move the mouse with a button held down before Windows XP recognizes that you're dragging something. The default value is 4 pixels, and you should keep the height and width the same as each other. The last two values, DoubleClickHeight and DoubleClickWidth, are the settings that specify the maximum distance (in pixels) allowed between two mouse clicks before Windows XP recognizes that you're double-clicking something. The default value is 2. These are REG_SZ values; Windows XP expects decimal rather than hexadecimal numbers.

Table 5-3 Values in Mouse

HKCU\Control Panel\Desktop   
Menu speedMenuShowDelayREG_SZ0 to 65534
DragDragHeight DragWidthREG_SZ0 to N
HKCU\Control Panel\Mouse   
Double-clickDoubleClickHeight DoubleClickWidthREG_SZ0 to N


The settings in the Hover category are similar to the settings in the Mouse category. They control the size of the area in pixels and the time in milliseconds that the mouse pointer must remain in one spot before Windows XP recognizes that the mouse is hovering over something. Table 5-4 describes the values for this category. The default sensitivity is 2, and you should keep the height and width equal to each other. The default hover time is 400. Cut that number in half to select objects quicker when you point to them. If you don't see these values in the registry, create them.

Table 5-4 Values in Hover

HKCU\Control Panel\Mouse   
Hover sensitivityMouseHoverWidth MouseHoverHeightREG_SZ0 to N
Hover time (ms)MouseHoverTimeREG_SZ0 to N


The setting in the Wheel category controls the mouse wheel. The value WheelScrollLines is the only value in Table 5-5. That's because the three different options in this category relate to the different data you can assign to this value. The default is 3, which enables the mouse wheel to scroll 3 lines at a time.

Table 5-5 Values in Wheel

HKCU\Control Panel\Desktop   
Use mouse wheel for scrollingWheelScrollLinesREG_SZ0
Scroll a page at a timeWheelScrollLinesREG_SZ-1
Scroll N lines at a timeWheelScrollLinesREG_SZ0 to N


The settings in the X-Mouse category, as described in Table 5-6, used to be one of my favorite customizations. I liked the idea of windows popping to the foreground when I pointed at them. It gets annoying after a while, but it's a novelty you should try because you might like it. Here's more on each of these settings:

  • Activation follows mouse (X-Mouse). Gives focus to any window to which you point but doesn't raise the window to the foreground unless you check the next option in this list.
  • Autoraise when activating. Brings the window that has focus to the foreground.
  • Activation delay (ms). Specifies the delay (in milliseconds) before Windows XP brings the window to which you pointed to the foreground.

These settings in the value UserPreferencesMask are bits, which you learned about earlier in this chapter. The default value for ActiveWndTrkTimeout is 0, but 400 is a more reasonable delay. A higher timeout prevents windows from flipping between the foreground and background, making this feature much less annoying and more useful.

Table 5-6 Values in X-Mouse

HKCU\Control Panel\Desktop   
Activation follows mouse (X-Mouse)UserPreferencesMaskREG_BINARYBit 0x0001
Autoraise when activatingUserPreferencesMaskREG_BINARYBit 0x0040
Activation delay (ms)ActiveWndTrkTimeoutREG_DWORD0 to N


The settings in the Explorer category are all over the map: You can customize the Start menu, enable smooth scrolling, and automatically clear the document history. Table 5-7 on the next page maps the settings in this category to their registry values. Create any keys and values that you don't see in the registry.

You'll notice that the setting Show Links On Favorites Menu is missing from Table 5-7. This is because that setting isn't in the registry. When you disable the Links menu, Tweak UI simply sets the Links folder's hidden attribute. Enable the folder, and Tweak UI clears the Links folder's hidden attribute. This is the only way to prevent Internet Explorer from displaying the Links folder on the Favorites menu.

Table 5-7 Values in Explorer

HKCU\Control Panel\Desktop   
Enable smooth scrollingSmoothScrollREG_DWORD0x00 | 0x01
HKCU\Software\Microsoft\Internet Explorer\Main   
Use Classic Search in Internet ExplorerUse Search AsstREG_SZYes | No
Manipulate connected files as a unitNoFileFolderConnectionREG_DWORD0x00 | 0x01
Prefix "Shortcut to" on new shortcutsLinkREG_DWORD0x00 | 0x01
Detect accidental double-clicksUseDoubleClickTimerREG_DWORD0x00 | 0x01
Use Classic Search in ExplorerUse Search AsstREG_SZYes | No
Allow Help on Start MenuNoSMHelpREG_DWORD0x00 | 0x01
Allow Logoff on Start MenuNoLogoffREG_DWORD0x00 | 0x01
Allow Recent Documents on Start MenuNoRecentDocsMenuREG_DWORD0x00 | 0x01
Allow Web content to be added to the desktopNoActiveDesktopREG_DWORD0x00 | 0x01
Clear document history on exitClearRecentDocsOnExitREG_DWORD0x00 | 0x01
Enable Windows+X hotkeysNoWinKeysREG_DWORD0x00 | 0x01
Lock Web contentNoActiveDesktopChangesREG_DWORD0x00 | 0x01
Maintain document historyNoRecentDocsHistoryREG_DWORD0x00 | 0x01
Maintain network historyNoRecentDocsNetHoodREG_DWORD0x00 | 0x01
Show My Documents on classic Start MenuNoSMMyDocsREG_DWORD0x00 | 0x01
Show My Pictures on classic Start MenuNoSMMyPicturesREG_DWORD0x00 | 0x01
Show Network Connections on classic Start MenuNoNetworkConnectionsREG_DWORD0x00 | 0x01


When you create a shortcut, Windows XP adds an overlay to the original document's icon so you can easily identify it as a shortcut. The Shortcut category enables you to customize that overlay. You can choose not to add an overlay, to add a light arrow, to use the normal arrow, or to use a custom icon as the overlay. Table 5-8 shows the value and data that Tweak UI uses for shortcuts.

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIcons is the key where you customize the shortcut overlay. Create this key if you don't see it in the registry. You add the REG_SZ value 29, and set it to filename,index, where filename is the name of the file containing the icon, and index is the index of that icon. For more information about using icons, see Chapter 4, "Hacking the Registry." Tweak UI removes 29 from ShellIcons if you choose the default arrow. It sets 29 to C:\WINDOWS\system32\tweakui.exe,2 for a light arrow or C:\WINDOWS\system32\tweakui.exe,3 for no arrow.

Table 5-8 Values in Shortcut

Light Arrow29REG_SZC:\WINDOWS\system32\tweakui.exe,2


Table 5-9, on the next page, describes the values in the Colors category. Create any values that you don't see in the registry. HotTrackingColor is a string value, and Windows XP expects an RGB value in decimal notation. For example, white is 255 255 255. The operating system expects binary RGB values in hexadecimal for the remaining values. Windows XP uses each color as follows:

  • Hot-tracking. Windows XP displays file names in this color when you point to them and if you've enabled the single-click user interface.
  • Compressed files. Windows XP displays compressed files in this color.
  • Encrypted files. Windows XP displays encrypted files in this color.

Table 5-9 Values in Colors

HKCU\Control Panel\Colors   
Hot-trackingHotTrackingColorREG_SZRRR GGG BBB
Compressed filesAltColorREG_BINARY0xRR 0xGG 0xBB 0x00
Encrypted filesAltEncryptionColorREG_BINARY0xRR 0xGG 0xBB 0x00


The Thumbnails category controls the quality of thumbnails in Windows Explorer. Table 5-10 describes the values for Image Quality and Size. Create values that you don't see in the registry. The default value for ThumbnailQuality is 0x5A. The default value for ThumbnailSize is 0x60. Keep in mind that higher quality and larger thumbnails require more disk space, which is not usually a problem, but they also take longer to display. Changing the quality does not affect thumbnails that already exist on the file system.

Table 5-10 Values in Thumbnails

Image QualityThumbnailQualityREG_DWORD0x32 - 0x64
Size (pixels)ThumbnailSizeREG_DWORD0x20 - 0xFF

Command Keys

If you have a keyboard with navigation keys, such as the Microsoft Internet Keyboard Pro (I use this keyboard; learn more about it at, you can customize them. For example, you can reassign the Calculator key to open your favorite calculator, instead of the program that comes with Windows XP.

HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\AppKey is the key where you customize the navigation keys. If you don't see this key, create it. Look up the keyboard key you want to customize in Table 5-11, and then add the corresponding subkey to AppKey. Within that subkey, create the REG_SZ value ShellExecute, and set it to the path and file name of the program you want to execute by pressing that key. If you want to disable the navigation key, set it to an empty string. You can restore the original behavior by removing the subkey you added to AppKey. For example, to run PowerToy Calculator by pressing the Calculator key, add 18 to AppKey. Then create the REG_SZ value ShellExecute in 18, and set it to PowerCalc.exe.

Table 5-11 Subkeys for Command Keys

Back (Internet browser)1New29
Corrections45Raise microphone volume26
Favorites6Refresh (Internet browser)3
Forward (Internet browser)2Save32
Forward (mail)40Search5
Lower microphone volume25Spelling checker42
Mail15Stop (Internet browser)4
Media16Toggle dictation and command/control43
Mute microphone24Toggle microphone44
Mute volume8Undo34
My Computer17WebHome7

Common Dialog Boxes

The common dialog boxes, such as the Save As dialog box, display the places bar on the left side. These are shortcuts to common folders, which make getting around much easier. By default, you see the History, Documents, Desktop, Favorites, and My Network Places folders there. You can customize the folders that appear in the places bar by using the Common Dialogs category in Tweak UI (see Figure 5-3 on the next page).

Click to view graphic
Click to view graphic

Figure 5-3 Make network document folders easily accessible by adding them to the places bar.

First things first: Table 5-12 describes the settings that enable you to remove the Back button and history from common dialog boxes. You can also hide the places bar altogether by setting the value NoPlacesBar to 0x01. Create this value if it doesn't exist.

Table 5-12 Values in Common Dialog Boxes

Show Back button on File Open/Save dialog boxNoBackButtonREG_DWORD0x00 | 0x01
Remember previously-used file names NoFileMruREG_DWORD0x00 | 0x01
Hide places barNoPlacesBarREG_DWORD0x00 | 0x01

Customizing the places bar is a bit more complicated. First you add to HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\comdlg32\ the PlacesBar subkey. In PlacesBar, create the REG_DWORD values Place0, Place1, Place2, Place3, and Place4. These correspond to the five available buttons from top to bottom. The common dialog boxes will display only the buttons specified by these values; if there is a PlacesBar subkey with no values, an empty places bar will be displayed. Then set PlacesN to one of the settings in shown in Table 5-13. For example, to set the second button to My Music, create the REG_DWORD value Places1 in PlacesBar, and set it to 0x0D. You're not limited to the folders you see in Table 5-13, by the way. You can create the PlacesN value as a REG_SZ and then add the path of any folder. To restore the default places bar, remove the PlacesBar subkey and remove the NoPlacesBar value.

Table 5-13 Folders for the Places Bar

Desktop0x00Network Neighborhood0x12
My Documents0x05My Pictures0x27
My Music0x0DRecent Documents0x08
My Computer0x11  


Last Updated: September 11, 2002
Top of Page