Tweaking the Windows XP Desktop

Published: May 5, 2003
**
**

Buy the book

This article was adapted from Jerry's book, Microsoft Windows XP Registry Guide, published by Microsoft Press. To get this comprehensive guide to the Registry, order the book today.

Editor's Note: Past articles by members of the online community are archived for your use. The information may become outdated as technology changes. For the most current information, please search the Web site or post a question in the newsgroups.

Jerry Honeycutt

In my last article about the Windows XP registry, Safekeeping the Registry, I described how to back up registry settings before changing them and how to use System Restore if things go really wrong. All of that was in preparation for showing you a few of my favorite hacks to make Windows XP look and feel the way you want.

I use the term hack loosely. These aren't security hacks or hacks that give you more features than you're supposed to have. These are hacks that help you customize the operating system in ways that you can't through its user interface.

This column is geared to advanced users of Windows XP. Even advanced users should be aware that if you use Registry Editor incorrectly, you can cause serious problems that may require you to reinstall your operating system. Microsoft recommends that before you edit the registry, you back up the registry and understand how to restore it if a problem occurs.

For an introduction to working with the Windows XP registry, see my columns, Customizing Your PC with the Windows XP Registry and Safekeeping the Registry, and the Knowledge Base article, Description of the Microsoft Windows Registry. This article is largely excerpted from my book Microsoft Windows XP Registry Guide (Microsoft Press, 2002). If you want to learn more about hacking the Windows XP desktop and Start menu, take a look at Chapter 4, "Hacking the Registry."

In this column, I'll describe how Windows XP enthusiasts can customize the desktop. You'll learn how to add commands to the My Computer icon's shortcut menu and resort the All Programs list. To make these customizations easier, I've included scripts for some of them. You can click the link to the scripts I've provided in this column and copy the text to an .inf file or or you can download them from Microsoft Windows XP Registry Guide Group, the MSN group that I use to support my book's readers.

Run Programs from My Computer

I'm all for any customization that makes things easier. There are some programs that I use over and over again, and I want a nice, easy place from which to run them. The Quick Launch toolbar is nice, as is the list of frequently-used programs on the Start menu.

I want a place where I can put system-oriented commands, though, so I put those commands on My Computer's shortcut menu. Then I can place the My Computer icon on the desktop and those commands are one mouse click away. To show the My Computer icon on the desktop:

Click Start, right-click My Computer, and then click Show on Desktop.

To add commands to My Computer's shortcut menu, you need to edit its class registration, which is HKCR\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D} in the registry. Add the command to this key's shell subkey. For example, after installing Tweak UI, one of the Microsoft PowerToys for Windows XP, I like to add a command to My Computer's shortcut menu that opens Tweak UI.

To do this, I add the branch tweak\command to My Computer's class registration. I set the default value of tweak to Tweak UI, the menu item text, and the default value of command to C:\Windows\System32\Tweakui.exe, the path and file name of Tweak UI. Figure 1 shows what this looks like in the registry.

Figure 1

Figure 1

After customizing the class registration for My Computer, starting Tweak UI is fast:

Right-click My Computer, and then click Tweak UI.

The following .inf file automates this setting. First install Tweak UI. Then save this script to the file Tweakui.inf, right-click the file, and then click Install. (To save this script to an .inf file, open Notepad, copy the script and paste it into Notepad, and save the file as Tweakui.inf. In the Save as type box, be sure to click All Files.) Alternatively, download Listing 4-2 from the Microsoft Windows XP Registry Guide Group.

Personalize the Start Menu

Windows XP has a nice, new Start menu. And you can customize it more thoroughly than with any earlier version of Windows.

1.

Click Start, click Control Panel, click Appearance and Themes, and then click Taskbar and Start Menu.

2.

On the Start Menu tab, click either Start menu or Classic Start menu to choose which version of the Start menu to use, and then click Customize.

In the Customize Start Menu dialog box, you can choose what Windows XP displays on the Start menu and in what form. However, there are some Start menu customizations that you can't do through the user interface.

Each time you run a program, Windows XP adds it to the list of frequently-used programs you see on the Start menu. You might not want every program you open to appear on this list, however. For example, I don't want to see Notepad in this list nor do I want to see Command Prompt.

You can choose which programs do and don't pop up in this list by customizing HKCR\Applications. This key contains subkeys for a variety of programs that Windows XP knows about. The name of each subkey is the name of the program file. Thus, you see the subkeys notepad.exe and explorer.exe in HKCR\Applications. If you want to customize other programs, add its subkey to this key. For example, to customize whether Command Prompt appears in the list of frequently used programs, add the subkey cmd.exe to HKCR\Applications. To add a subkey:

1.

Open the key under which you want to add a subkey, and then right-click in the right pane.

2.

Click New, and then click Key.

3.

Type the appropriate subkey.

Then, to keep the program off of the list, add the REG_SZ value NoStartPage to it. Figure 2 shows what this looks like in the registry. To add a value:

1.

Open the key under which you want to add a value, and then right-click the right pane.

2.

Click New, and then click the type of value, such as String Value, you want to add.

3.

Type the appropriate value.

Figure 2

Figure 2

On the Start menu, you can sort the All Programs menu. Windows XP sometimes adds new shortcuts to the bottom of the All Programs menu when you expect them to appear in alphabetical order. In either case, finding the program you want to run is difficult when the sort order of the Start menu gets out of hand.

HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder contains the sort order of the Favorites menu and Start menu. The subkey Favorites contains the sort order of the Favorites menu. The subkey Start Menu contains the sort order of the classic Start menu, and the subkey Start Menu2 contains the sort order of the new Start menu.

Deciphering the contents of these three keys is next to ridiculous, but you can remove any of them to resort the corresponding menu in alphabetical order. For example, to restore the All Programs menu to alphabetical order, remove the subkey Start Menu2. To remove a subkey:

In the left pane, right-click the subkey you want to remove, and then click Delete.

To restore the Favorites menu in both Windows Explorer and Internet Explorer, remove the subkey Favorites. I typically remove MenuOrder to resort all of the menus at the same time.

More Registry Tweaks

This article shows you only a few of my favorite registry tweaks. My book Microsoft Windows XP Registry Guide gives you many more ways to customize Windows XP. If you have any questions about my book, including whether or not it covers a particular topic or contains a particular tweak, please send them to jerry@honeycutt.com.

Expert Zone Columnist Jerry Honeycutt is a writer, speaker, and technologist who has written over 25 books, including Microsoft Windows XP Registry Guide (Microsoft Press, 2002). He frequently writes about customizing and deploying Windows XP.