Pain-Free Windows Tweaks
Want to fix nagging Windows irritations and automate everyday tasks? With these surprisingly simple Registry and batch-file tips, it's not brain surgery.
Everybody's got their own Windows pet peeve, whether it's the operating system's habit of shifting your desktop icons around or its proclivity for putting all the wrong files in your Recent Documents folder. While you can fix many Windows woes by changing a single setting, every now and then you encounter a problem or limitation that you can alleviate only by journeying into Windows' brain--the Registry--to adjust the resident gray matter.
Our 15 Registry tweaks and tools let you hide drive letters in Windows Explorer, lock Internet Explorer toolbars, and make other changes, some with the OS's tools, and some with a free Registry helper. And for a more nimble Windows, try our five downloadable batch files.
Proceed With Caution
The Windows Registry is an arcane repository of an immense number of system and application settings. Make the wrong change, and you might not be able to start Windows again. The Registry is not a playground for creative experimentation. Begin by taking some precautions (back up!), and remember that any system change has the potential to be calamitous.
Go to "Care and Feeding of the Windows Registry" for Stan Miastkowski's step-by-step instructions for backing up the Registry. If you make a boo-boo, visit "How Do I Restore My Windows Registry?" for Lincoln Spector's advice on restoring the Registry to an earlier state.
In addition to adopting Stan's global approach, back up the portion of the Registry you plan to change, just before you make the alteration: Choose Start, Run (or press Windows-R), type regedit, and press Enter. Once you're in the Registry Editor, navigate down the tree diagram of keys (Registry-speak for folders) on the left until you reach the section you plan to edit. It's usually best to dig all the way down to the deepest level you intend to alter. That way, you back up the minimum amount of data necessary, which keeps the backup file small and--if you later decide to undo your change--prevents you from overwriting unrelated settings that may have changed.
With the desired icon selected on the left side, choose Registry, Export Registry File (File, Export in Windows XP). In Windows XP, you can back up the file by right-clicking its icon in the left pane and choosing Export (see FIGURE 1). Make sure Selected branch is checked at the bottom of the Export Registry File dialog box. Navigate to a folder where you can safely store the settings; type a name and click Save. Now you're ready to edit the settings. If you need to restore them to their prior state, locate the Registry (.reg) file that you just exported, right-click it, and choose Merge. Click Yes to confirm that you want to restore the data. Although merging a.reg file will restore any changed or deleted settings on the exported branch, beware: It will not remove new settings added after you exported the branch.
Freeze Your Explorer View
Every time you log off, Windows saves the size and position of the taskbar, as well as the size and location of your Explorer windows (for the next time you open them). But you might want to set up your taskbar and folder window arrangement once and have Windows open that way in the future, regardless of how you futz with them during your current session. To do that, arrange your windows and taskbar the way you like them. Then launch the Registry Editor and navigate to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer. With Explorer selected in the left pane, look for the icon labeled NoSaveSettings on the right. (Not there? No problem. Just right-click in the right pane and choose New, DWORD Value. Type NoSaveSettings to name it, and press Enter.) When you're done, double-click your NoSaveSettings icon to edit its setting. In the 'Value data' box, type 1 and press Enter. You may have to log off and log back on again before the setting will take effect. Thereafter, each time you log on and open Explorer or any folder window, it and the taskbar will return to the size and position you froze them in, even if you rearranged or resized them during your previous Windows session.
Hide a Drive
If you want to discourage others who log in to your Windows profile from using a particular drive, you can shroud it in a cloak of invisibility so that it won't show up in Explorer. The drive will remain accessible, however: Global searches will continue to examine its contents, some third-party file managers may still see it, and Microsoft Office apps will find it with no problem. But hiding the drive's letter in Windows Explorer may keep other users from hosing the drive by mistake.
To cloak a drive, open the Registry Editor and navigate down to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer. Look for an icon labeled NoDrives in the right pane. If you don't see such an icon, right-click anywhere in the right pane, choose the New, DWORD Value option, type NoDrives, and press Enter to name it. Double-click the NoDrives icon, and in the Edit DWORD Value dialog box, select Decimal. In the 'Value data' box, type a value that corresponds to the drive you want to hide--for A: 1; B: 2; C: 4; D: 8; E: 16; F: 32; G: 64; H: 128; I: 256; J: 512; and so on. To hide multiple drives, add up the relevant numbers and type that sum in the 'Value data' box. For example, if you want to hide drives E: and F:, you would determine 16 + 32 and type the sum, 48, in the 'Value data' box. To hide all drives, type 67108863. When you're done, click OK. You'll have to log off and then log back on to see the effect.
Two Tony Tweaking Tools
Windows' Registry Editor isn't the only way--nor is it always the best way--to edit the Registry, depending on the task. Many other Windows tools customize system settings without your having to edit the Registry directly. They may be designed for IT types, but they're accessible enough for mere mortals to wield as well.
One of these tools is System Policy Editor. To install it in Windows 98, insert your Windows CD-ROM into the drive and search for the file named poledit.exe, which should be in the tools\reskit\netadmin\poledit folder. Click Start, Settings, Control Panel, double-click Add/Remove Programs, select the Windows Setup tab, and click Have Disk. Navigate to the proper folder on the disk, select poledit.inf, and click OK twice. Check the System Policy Editor box, and click Install. If you don't find it on your Windows CD-ROM, go to Microsoft's Windows 95 Update page and search for System Policy Editor.
Once you've installed the program, launch it by choosing Start, Programs, Accessories, System Tools, System Policy Editor or by clicking Start, Run, typing poledit, and pressing Enter. The first time you run System Policy Editor, it may prompt you to open a template. If so, locate and select the Admin.adm file to satisfy the program. Then choose File, Open Registry and double-click an icon (either Local Computer or Local User) to pick the portion of the Registry you want to edit. After changing a setting, choose File, Save or click the Save icon on the toolbar.
Windows Me doesn't include System Policy Editor, and Microsoft won't support its use in that version of the OS. Many of the controls will still work in Windows Me, but there's no guarantee.
For users of Windows 2000 and Windows XP Pro (sorry, Homies), the Group Policy utility provides point-and-click ways to customize Windows (in effect, you're editing the Registry). To launch Group Policy in these versions of Windows, choose Start, Run, type gpedit.msc, and press Enter. In the left tree pane, navigate to User Configuration\Administrative Templates for the most common customizing options (see FIGURE 2).
Though less functional than the Registry Editor, both the System Policy Editor and Group Policy let you tailor many Windows properties. For example, each tool allows you to restrict access to selected Control Panel icons, among other features (go to "Show Windows' Control Panel Who's in Charge" for more on this capability). In Windows 2000 and XP Pro, you can use Group Policy to remove built-in items from the Start menu (visit "Take Charge of Your Runaway Start Menu" for instructions). Note that while both these tools can be used for many of the tips described here, not every version of Windows has them, so we present only the old-fashioned Registry Editor approach.
The System Policy Editor and Group Policy reduce many Registry settings to simple point-and-click controls, so careless experimentation can lock you out of your own account or cause other serious damage. Don't ignore our advice to back up your Registry beforehand. And make sure that you check out "Tools of the Registry Trade" for the lowdown on some of our favorite third-party Registry editors.
Warn on Boot-up
Maybe you set up computers in a public venue and want a disclaimer to appear each time Windows starts. Or you might want the employees of your company to read a legal notice before beginning each workday (see FIGURE 3). Perhaps you just want to give your kids some important instructions when they get home from school and boot up. You can make such a message appear in a dialog box before the Windows welcome or boot screen so that everybody who uses the machine will see it. All users will have to click OK in the message box before continuing.
Open the Registry Editor. In Windows 9x and Me, navigate the left pane down to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Winlogon. In Windows 2000 and XP, go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon. If you don't see an icon labeled LegalNoticeCaption, right-click anywhere in the pane, choose New, String Value, type LegalNoticeCaption, and press Enter. Create a String Value icon named LegalNoticeText, if it doesn't already exist in the Winlogon key.
Double-click LegalNoticeCaption. In the 'Value data' box, type the text you want to appear in the message's title bar (you can leave this blank if you prefer), and press Enter. Next, double-click LegalNoticeText, type your message in the 'Value data' box, and press Enter. The warning dialog box accommodates a pretty large paragraph; if you plan to input more than a couple of sentences, you should probably compose the message in Notepad or another text editor, double-check it, and then paste it into the 'Value data' box in the Edit String dialog box. To remove the message later, simply return to this setting and delete any text you added for LegalNoticeCaption, LegalNoticeText, or both.
Lock That Taskbar
XP is the first version of Windows that lets you lock the taskbar so you can't move it inadvertently. (Right-click the taskbar and choose Lock the Taskbar to activate the feature.) To add this capability to Windows Me, position and size the taskbar to your liking, then open the Registry Editor, navigate the left pane to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, and look for an icon in the right pane named TaskbarSizeMove. If it's not there, right-click in the right pane, choose New, DWORD Value, type TaskbarSizeMove, and press Enter. Double-click the icon and set 'Value data' to 0 to immobilize the taskbar.
The next time you log on, you won't be able to move or resize the taskbar, but you can add and remove toolbars by right-clicking the taskbar and choosing options from the Toolbars submenu. You can also resize and rearrange individual toolbars. If you want to resize the taskbar or drag it from one screen edge to another, you can change the TaskbarSizeMove Registry setting: Return to the Registry branch above, double-click TaskbarSizeMove, and change the 'Value data' setting to 1. Click OK, log off, and log back on to make your taskbar movable once again.
Lock Those Toolbars
Windows 2000 and XP let you freeze the position of your toolbars in Windows Explorer and Internet Explorer (right-click a toolbar and choose Lock the Toolbars to activate this feature). You can still add or remove individual toolbars and customize the Standard Buttons toolbar, but there's a way to increase your toolbar options in any version of Windows simply by adding a couple of settings to your Registry.
In the Registry Editor, navigate in the left pane to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer, and select this key. If the right pane doesn't contain an icon labeled NoBandCustomize, right-click in the right pane, choose New, DWORD Value, type NoBandCustomize, and press Enter. Double-click NoBandCustomize, type 1 in the 'Value data' box, and press Enter. You may need to log off and then log back on again before the setting will take effect. Now the toolbars in Explorer, IE, and your folder windows will be locked, and you can activate or deactivate them only by editing the Registry. This also removes the 'Lock the Toolbars' command in Windows 2000 and XP.
If you want to prevent anyone from customizing the Standard Buttons toolbar, right-click in the right pane of the same Registry entry, choose New, DWORD Value, and enter NoToolbarCustomize. Set this key's 'Value data' to 1. The next time you log on--and thereafter--the Customize command won't appear when you right-click or choose View, Toolbars in Windows versions that support this feature (see FIGURE 4). Some changes will still be possible, however. For example, anyone will still be able to toggle text labels for the Standard Buttons toolbar (right-click and choose Text Labels), or (more unfortunately) to drag icons on, off, or around your Links toolbar.
CAP Your File Names
When you name a folder with eight characters or fewer, Windows 98 changes any all-caps typing to initial capital only. If you want some folder names to have all capital letters for emphasis, open the Registry Editor and go to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced. With the Advanced key selected in the left pane, double-click the DontPrettyPath icon in the right pane. Change the 'Value data' setting from 0 to 1 and press Enter. Folder names entered with all capital letters will thenceforth appear as you typed them, as will eight-character file names (and old DOS files) created with all caps.
Put Outlook in Your Tray
If your PC runs Microsoft Office XP and you like to keep Outlook open but minimized most of the time, you may not want the program to take up space on the taskbar when you aren't actually using it. A reader who signed his e-mail only as David points out that a simple Registry edit lets you make Microsoft Outlook appear as an icon in the taskbar tray (the area near the clock), instead of as a taskbar button, when minimized.
Begin by opening the Registry Editor and navigating to HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Outlook\Preferences. With Preferences selected in the left pane, right-click anywhere in the right pane and choose New, DWORD Value. Type MinToTray and press Enter to give your new icon a name. Now double-click the MinToTray icon, enter 1 in the 'Value data' field, and press Enter. If Outlook is running, exit and then restart it. The next time you minimize Outlook, it will disappear from the taskbar and appear as a tray icon. Simply double-click the tray icon to restore it. The Outlook icon appears in both the taskbar and the tray when the application window is open (not minimized), but when you minimize the program, the icon vanishes from the taskbar.
Scott Dunn writes the monthly Windows Tips column, and Lincoln Spector ("Five Batch Files") writes the Answer Line column. Both are contributing editors for PC World.
Tools of the Registry Trade
Does it seem a little odd (not to mention cumbersome and risky) that you must dig through an enormous database of Windows settings, manually adding and editing geeky strings of text, just to make your system look and act the way you wish? Fortunately, a number of fine folks have come up with utilities that convert common Registry edits into simple point-and-click operations. These tools let you customize the appearance and behavior of Windows features in ways that would otherwise necessitate a manual Registry change. Some Registry-editing tools cost up to $40, but why pay anything? Here are our favorite free Registry tweakers.
Tweak UI: This is Microsoft's venerable standby. Get version 1.33 if you use Windows 9x, Me, or 2000. The version of Tweak UI for XP is part of the Windows XP Power Toys package (but you don't have to install the other toys if you don't want them). Go to our downloads page to get your copy.
Fresh UI: Sporting a much more elegant interface than Windows Explorer, Fresh Devices' Fresh UI program provides overview information on each of its many Registry tips and clearly indicates which settings will work in each version of Windows. You have to submit an e-mail address to get this product and its registration code, but you don't pay a cent. Browse PC World's downloads to get your hands on the program.
Windows Configurator: This wonderful little program from Skorczynski Leszek was designed for Windows 9x and Me, but many of its controls work in Windows 2000 and XP; others may not, and still others require Internet Explorer 4 or later. Windows Configurator offers many security functions, including the abilities to hide Startup items, limit network access, and lock Control Panel items. Jump to our downloads page to get the freebie.
X-Setup: Xteq's Xtra-geeky (but Xtra-thorough) utility is free to home users, libraries, charities, and government institutions. Businesses must register and pay $200 for a ten-user license. The program has both Power User and Wizards modes. Its Safe Mode explains every Registry change and lets you turn back before it applies one. Go to our utility downloads for a copy.
Registry Keys: Inside the Mind of Windows
Selecting a key in the Registry Editor's left tree pane displays its contents on the right, just as in Windows Explorer or any folder window. But Registry keys do not represent folders stored on your machine. Rather, they identify collections of settings. With all icons collapsed, you see the major Registry sections: (1) HKEY_CLASSES_ROOT is where the Registry stores all file type, file association, and icon information. All settings or preferences specific to the profile you are logged in to reside in (2) HKEY_CURRENT_USER. This data is also in (3) HKEY_USERS, along with the same settings for all other profiles. As you might guess, (4) HKEY_LOCAL_MACHINE contains hardware and related driver settings. The hardware configuration currently in use is in (5) HKEY_CURRENT_CONFIG.
Though careless changes to any of these sections can cause problems, HKEY_CURRENT_USER is the safest to work in. If you make a mistake in this part of the Registry and Windows starts behaving bizarrely, you can get around the problem by creating a new user profile and logging in to that one instead. You'll lose all your preferences and settings, of course, but at least you won't have to remember which part of HKEY_CURRENT_USER you messed up.

Five Batch Files
Automate Hard-Drive Maintenance
Batch files trace their lineage back to DOS, but they're still handy for everyday Windows chores. This one scans your hard drive for errors and then defrags it automatically. If you have the appropriate apps, you can make it scan for viruses, back up data, and perform other chores. Click here to download the file and instructions for Windows 98 and Me, here for Windows 2000, and here for XP. The Windows 2000 version requires that you download and install MorphaSys's free AutoDeFrag program before you use it.
Print a Folder's Contents
Windows offers no easy way to print a list of the files in a given folder, but this batch file does. Download the file printdir.bat, and save it in the SendTo folder under your user profile. To find your SendTo folder in Windows 98, Me, or XP, select Start, Run, type sendto, and press Enter. If you use Windows 2000, go to "Add to the Send To Menu" for details on how to proceed. Once the file is in your SendTo folder, you can print a copy of a folder's contents by right-clicking the folder's name in Windows Explorer and selecting Send To, printdir.bat.
Purge Your Recent Documents
You want to return to the spreadsheet you were working on yesterday, so you go to the Start menu's Documents list (Recent Documents in Windows XP). Unfortunately, Recent Documents gives every file type equal weight, including the types you don't return to often. This batch file culls everything from Recent Documents that lacks one of the extensions you specify beforehand, such as.doc,.xls, and.txt (as in the example here). This file doesn't remove the documents, only the shortcuts to them. Go here to download the batch file and instructions for using it.
Launch Multiple Programs
Some chores require you to open more than one program. This batch file lets you launch several programs at once. In Windows 98 or Me, each line of the batch file should contain the command to launch a particular program or file, as in c:\quickenw\qw.exe or "c:\my documents\finances.xls" (the quotes are required because of the space in the file path). End the batch file with the command cls on the very last line. In Windows XP or 2000 (shown here), your batch file must point to file shortcuts rather than to the files themselves. It's best to collect the shortcuts you need in one folder.
Because you'll have to make this batch file yourself, there's nothing to download. Simply open Notepad or the text editor you prefer and type in the command lines shown, altered to point to the applications you need to open.
Change Your Resolution on the Fly
Some programs work best at a particular screen resolution. This batch file changes your resolution to 640 by 480 (at 32-bit color depth), launches a program, and waits until you exit before returning to your original settings. It requires EnTech Taiwan's free MultiRes, so download and install that program before loading the batch file. The file loads in Notepad, but just change the second line to tell the file to load itself into the program of your choice. Alter the numbers on the first line to change the resolution and the color depth. The terms "start /w" at the beginning of the second line and "cls" at the end of the program are necessary in Windows 98 and Me; they're harmless in 2000 and XP. Click here to download the batch file.
--Lincoln Spector





