[ Go to August 1997 Table of Contents ]

Optimizing Windows /
John Woram

HOW TO ...

Optimizing Windows / John Woram Scrub Your PC Clean

Applications/Jim Boyce Tame Your E-Mail

Power Windows / Karen Kenworthy Play PC Detective

Windows CE / John D. Ruley Make Ask CE for Directions

Windows NT Workstation / Rick Furnival Share Resources via the Net

Programming Windows / Martin Heller Java's Got Lots of Class(es)

Scrub Your PC Clean

Sometimes I don't even follow my own advice. I know I should start all over every so often with a fresh format of my systems and reinstall everything. At least one of my systems could stand a wash, if not a complete hose-down. As a beta box, it has an absolute gift for accumulating junk and includes at least a few folders whose original functions I've long since forgotten. Some are empty. Yet if I try to delete them, I get the following uninformative advice:

"This change may impact one or more registered programs. Do you want to continue?"

If you've encountered this message, it's probably the result of an uninstall that went bad. For example, after uninstalling a beta version of Ajax Software's Spic & Span utility, my C:\PROGRAM FILES folder still harbored an Ajax subfolder (actual names are changed here to protect the guilty). I got that ominous "Do you want to continue?" warning when I highlighted the folder and tried to delete it. Yet there was nothing in it, except a Spic & Span subfolder that was likewise empty. Despite the obvious expendability of these folders, though, something in the Registry didn't want me to delete them. I could have just erased them anyway-that would have been easy enough. But since the warning was a tip-off that leftovers sat in my Registry, I decided to heed it and launch a cleanup operation. If you run into the same situation after uninstalling software, here's how to proceed. Just change the names given here as needed to find what you need to delete from your system.

To begin, I searched the Registry's Data column for Spic & Span and found nothing. Then I tried a search for the equivalent 8.3 filename and found the culprit (SPIC&S~1). It was part of a long line that cited the C:\PROGRAM FILES folder, the Ajax Software subfolder, the Spic & Span subfolder and an executable file named CLEANIT.EXE. Apparently all this was accidentally left behind when I deleted the utility. Because Windows 95 didn't know it all was now useless, it warned me when I tried to delete the Ajax Software folders in Explorer.

The CLEANIT.EXE file cited above was in a Command subkey. By working my way up the immediate subkey structure, I saw all of it was part of a HouseholdFile key in the HKEY_CLASSES_ROOT section (HKCR). Before deleting the entire key structure, I opened all its subkeys to see what they contained. I expected them to lead to even more stuff I could scrap, and, sure enough, they did. For example, a ContextMenuHandlers key led to a subkey that cited one of those dreadful CLSID subkeys. Because I was about to send the HouseholdFile key off to the great bit bucket in the sky, the associated CLSID key would be useless. So I made a note of the number, then opened the HKCR\CLSID key and searched for the subkey with that number. When I found it, I made a note of the files it referred to and erased them. Then I wiped out the key itself.

Next, I tracked down the extension keys that cite the HouseholdFile key. To do this, I searched HKCR's Data column for HouseholdFile. When I found the .haf key, I erased that, too, then went on to look for more. There were none in this case, but you never know. Once I was quite sure nothing remained, I highlighted the HouseholdFile key and deleted the whole works. Then I went back to Explorer, knowing that at last Windows 95 would let me delete that Ajax Software folder.

No joy! Once again, the warning, but now the solution would be easy, I thought. I just restarted Windows 95 and tried again. History repeated itself, and it turned out there was yet another subkey-this one in the HKEY_LOCAL_MACHINE\SOFTWARE section-that I needed to remove. I'll skip the details, because it was much the same as what I've already reported. Finally, after another restart, all was forgotten and I could delete the folders without a warning. As before, I could have just "done it," knowing that I'd finally taken care of the necessary Registry cleanup. However, it's worth taking the time to restart as often as necessary, just in case there's still a little something left over elsewhere in the Registry. The restart serves as a double-check: Once the warning message no longer shows up, all's well, and the folder will disappear without protest. Otherwise, this is the clue that your work isn't done yet.

You're sick of hearing me say "backup," but you'll be even sicker if you try the steps described and something doesn't work out quite the way you expected. Given the vagaries of file associations, it's a matter of time before the perfect Registry edit turns out to be not-so-perfect after all. So heed a warning that Windows 95 doesn't give you. Do that backup now. The life you save may be your own.

A Change Icon buglet?

If your own housekeeping includes some icon tweaking, you know how easy it is to change a shortcut icon. Just open the shortcut's Context menu, select Properties, click on the Shortcut tab and then on the Change Icon button. The Change Icon dialog box should list the name of the current icon resource file, with the icon itself highlighted in the Current Icon display immediately below the filename. But sometimes it lists the wrong information. If you haven't discovered this quirk yet, just create a shortcut to the MS Paint applet in the C:\PROGRAM FILES\ACCESSORIES folder. The Change Icon dialog box will report that the current icon is the generic "flying window" in the SHELL32.DLL file, when actually it's the paint can icon contained in the executable MSPAINT.EXE file.

The apparent reason for this quirk is that the shortcut system has trouble with long filenames. But not just any long filename-only one with a space in it. In this specific example, the culprit is the space in the "Program Files" segment of the complete path. Because the space blocks access to the actual icon file, the dialog box offers the name and contents of the default SHELL32.DLL file instead. To force the Change Icon box to report the correct information, just click on the Browse button and select the C:\PROGRAM FILES\ACCESSORIES folder. Highlight the MSPAINT.EXE file, click on the Open button and then on the OK button. The dialog box will now display the correct filename and current icon.

To do the same thing for any other shortcut icon, follow the path specified in the Target box on the Shortcut tab and then select the filename also listed in that box. In each case, the appropriate shortcut file (FILENAME.LNK) is automatically rewritten to preserve the correct information. The point of this little exercise is, if you want to change a shortcut icon, you should check the same executable file that contains the current icon for a replacement. There, you're likely to find icons closely related to the application in question. If you don't find something you like, then you can go off and browse elsewhere.

Anybody got the time?

And while you're straightening up, don't forget to set the clocks to the right time. But what is the right time? If you crave accuracy, the U.S. Naval Observatory Master Clock reports Universal time (a/k/a Greenwich Mean Time), plus times for the four continental U.S. time zones, Alaska and Hawaii. You'll find it at http://tycho.usno.navy.mil/cgi-bin/timer.pl.

Another page at the same site (http://tycho.usno.navy.mil/what.html) leads to instructions on how to add a Universal time clock to your own home page and includes a link to check your PC against the master clock. The observatory reported that I was 17 seconds behind the times, but, after a quick adjustment, I was rewarded with, "Your clock difference is zero (+/- 1) seconds. Nice going!" Well, now that I was on the Navy's good side, I decided to go all the way to the top: the Royal Greenwich Observatory (http://www.greenwich2000.com/time.htm) assured me that it was the "Home of World Time since 1884" and that my PC was running 240 minutes behind it-fair enough, given the intervening time zones between me and it.

Oddly enough, a "US Government warning!!" link (http://tycho.usno.navy.mil/warning.html) at the bottom of the Greenwich page tipped me off that Uncle Sam takes his ticker very seriously, and that "unauthorized access is prohibited ... and can result in criminal proceedings." And, in all caps, "Use of this system constitutes a consent to monitoring at all times." I immediately signed off; I certainly don't want the feds looking to me for the correct time.

For less mission-critical systems, lots of utilities will update your PC clock. But some require a long-distance call unless you happen to live in the shadow of a certain time server. And you usually don't discover such limitations until you download the (sometimes large) software. After wasting a fair amount of the very time I was trying so hard to calibrate, I finally found two great freeware utilities that work well within most Internet browsers. Bruce Adelsman's AtomTime95 (ATMTM14A.ZIP, 105KB) adjusts your local PC time against the atomic clock time server in Colorado. Or, if you don't trust the Colorado clock, Rob Chambers' Dimension 4 (D4TIME41.ZIP, 155KB) checks more than 100 time servers from Adelaide to Zurich (your choice). Both are available on our "Free Win95 Software" page (http://www.winmag.com/Win95/software.htm)

If you have more than one computer that needs time-tweaking, try a little experiment. Open a DOS box on each system and execute the TIME command. At the "Enter new time:" prompt, type the identical time at both computers and then press the Enter keys simultaneously. Check both systems in a day or two. Chances are they won't agree. There is an easy way to synchronize the clocks, assuming the computers are network-connected. Appoint one of them as your designated timekeeper, and keep it honest via a periodic Internet time check as already described. Then open that DOS box again on any of the other computers. Type the following string at the command prompt:

net time /set /yes \\whatever

The command-line switches instruct the NET.EXE utility to synchronize the time (/set), and to do so without further prompts (/yes). Just change the \\whatever in the line above to the actual network name of your designated timekeeper computer, and then press the Enter key to complete the job.

One more freebie

To close with more freeware (and work in a self-serving plug at the same time), my book, The Windows 95 Registry: A Survival Guide for Users, passed the 100,000 mark in sales earlier this year. To celebrate the occasion, the sixth and subsequent printings add an appendix that describes the interaction between Microsoft's free TweakUI applet and the Registry. If you have an earlier edition, you can download a free copy of the appendix from our Free Win95 Software page. It's a zipped Word document file (APPENDIX.ZIP, 69KB), with all illustrations embedded as color bitmaps.

Consulting editor John Woram is the author of The Windows 95 Registry: A Survival Guide for Users (MIS: Press, 1996). Contact John care of the editor at the e-mail addresses here.

Windows Magazine, August 1997, page 248.

[ Go to August 1997 Table of Contents ]