Microsoft

Guilt by association

When Ed Bott became fed up with pushy setup programs that commandeer file associations, he asked TechRepublic members for some help. Suggestions ranged from built-in tools to registry tricks, but a freeware utility topped the list.


Let me apologize in advance if I'm tired and cranky today. You see, I've been refereeing a wrestling match between two applications that's lasted for more than a week now, and I'm just about exhausted. In this case, it's two "jukebox" programs tussling over which one gets the right to spring into action when I pop a music CD in the drive. But it could just as easily have been a Web browser, or a graphics-editing program, or a word processor.

This running battle was the inspiration for this week's Microsoft Challenge. I'm tired of rude application developers who write setup programs that take over all files with a particular file extension, even when I prefer to use another program for that particular task. I asked for your help in undoing the damage without having to reinstall software. More importantly, I want to find a way to keep this from happening again.

I was startled by the wide range of responses I received from TechRepublic members who have devised a variety of tactics for responding to file extension hijackers.

Fighting unruly extensions
Clean up. Some TechRepublic members have resigned themselves to the problem and use one of Windows' built-in tools to repair the damage after running Setup.

Sparks, for instance, was one of several TechRepublic members to suggest that I use the Open With command: "Select the file in question, then hold down the [Shift] key and right-click on the file. Choose Open With, select the program you want to use for the file type, and be sure to check Always Use This Program To Open This Type Of File." I'm willing to do that little post-Setup dance (although I reserve the right to grumble as I point and click), but it's a less than optimal solution for programs that set up complicated associations.

Fight back. Two clever TechRepublic members proposed using my powers as a system administrator to foil those evil apps. "Use Regedt32 | Security to modify the registry key where these associations are stored. Make access read-only for all users," Bill F suggested.

Wayne Maples offered similar advice from his NT tips page: "If you want to lock down a particular association so it cannot be changed, find the association to lock under HKEY_CLASSES_ROOT. Then create a new binary value, assigning it value=01000000. The application associated with the extension is now locked and cannot be changed except by removing this value."

Unfortunately, both gentlemen admit the cure may be worse than the disease. As Bill points out, "This might cause install programs to complain, and of course you should test this before you put it into a production environment." Hmmm, I'm looking for something a little simpler, thanks.

Back up. TechRepublic member rziminski offered the best manual solution: "Use a backup of the registry to restore settings. First, start the Registry Editor, then select the folder labeled HKEY_CLASSES_ROOT. Choose Registry, Export Registry File. (The equivalent NT command is Save Key.) Then, give the exported file a meaningful name—for example, Saved Associations.reg. Later, when an application insists on rearranging the file associations to suit itself, simply restore your preferred settings by double-clicking on the *.reg file. If you're running NT 4.0, launch the Registry Editor, choose Registry, Restore, then select the file containing the backed-up settings."

Yes! It works! If you remember to back up this Registry key before running any Setup program, you can put all your file associations back the way they were in seconds.

And if messing around in the Registry doesn't appeal to you, automate the process with a nifty free utility called Freedom of Association, from PC Magazine's Neil J. Rubenking. A TechRepublic member with the mysterious handle Millenium was the first to recommend this extremely useful addition to your Windows bag of tricks: "You can always just back up your registry before adding a new program. But I would rather use Freedom of Association. You can view registered extensions and the file types associated with them, clean up invalid entries, correct erroneous associations, and add extensions to existing file types. Try it out; I think it will work for you."

I did. It does. And now, if you'll excuse me, I'm about to end this long-running wrestling match once and for all. Thanks to all the TechRepublic members who participated in this week's Challenge; each one earns 1,000 TechPoints.

Here's Ed's new Challenge
I'm working with a TechRepublic member who recently upgraded to a Windows 2000 Server. He's managed to convince his users to store their data on the server where it can be backed up, but getting all those data files into safe storage has turned into a struggle. His old DDS-2 backup drive doesn't have the capacity or the speed to do regular backups. What hardware would you recommend? Should he consider migrating older files to Removable Storage? I'll award 1,000 TechPoints (and maybe even a cool TechRepublic T-shirt) if I use your advice in my next column. But don't delay—this challenge closes at the end of the day on Thursday, July 27. If you think you've got the answers, click here to tackle this week's Microsoft Challenge.

Editor's Picks

Free Newsletters, In your Inbox