Tim Johnson wrote: > Easy there. Before we start using the 'V' word, lets just step back for a second. > First of all, there is absolutely nothing wrong with putting a program in the Run > key, and it is in fact a bad idea to tell people to categorically delete anything in > that key. I would agree that viruses and other programs often use this key, and it > is a good idea to familiarize yourself with the legitimate contents of this key. > Creaing a service for any program that needs to run at startup is overkill, and > actually can be counterproductive, since the majority of non-OS programs should be > run in the user context instead of the system context, but this is really a > discussion for another forum.
I agree that I was overstating the case--slightly. I was looking at the right subkey, but under the wrong key, HKEY_CURRENT_USER, when I said that. When I looked at the actual key I cited, I did see four values. One, the system-tray icon for my antivirus, is convenient. Another, the Synchronization Manager, was something I specifically requested by turning on the offline files feature. The other two were Iomega cats my zip drive drug in--imgicon.exe and another exe that seems to run and exit at startup. None of these is at all indispensable, and I run some pretty heavy-duty productivity applications. So while my statement may have involved a bit of hyperbole, I will basically stick with it. > Now on to the actual question: > > I'm going to assume that the OP has already done his research for now and knows for > sure that he wants to delete the key in quesion, and avoid the standard lecture on > why you should be VERY SURE that you want to do this before you start deleting keys. > The way you would actually do this would be via a line like this: > > my $result = delete $Registry->{'HKEY_LOCAL_MACHINE/SOFTWARE/Tim/MyKey/'}; > > Of course, this only works if there are no subkeys, so you will have to work your > way back from the deepest key if there are subkeys. > > Also, I really recommend reading the documentation on the module. > > "Perldoc Win32::TieRegistry" Sorry, Tim, but there is way more to it than that. Have you ever tried to remove the vestiges of a failed install/uninstall, particularly on a large, multi-application suite. The keys and values set are not at all so neatly placed. They can be found all over the Registry. If left in place, some of them can cause very persistent, subtle, and vexing problems. There are legitimate purposes for many of these settings. File types must be associated. DLLs must be registered, etc. Some though, seem to exist for no other purpose than to insinuate the software inextricably in the system. I really don't think there is any way one could successfully code a Registry scour to clean out a bad uninstall until one has done it by hand. Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>