Deleting a registry key

  • Thread starter --------------------
  • Start date
?

--------------------

I'm hoping i'm using the right terminology here...but here goes.

I have comfortable with regedit and manually deleting a key on the left of
the regedit screen and all it's associated entries on the right.

Is there a way to have simply an icon on the desktop that I could
doubleclick which would simply do the same thing.

As an example, the key and all entries associated with it that I would like
to delete would be HKEY_LOCAL_MACHINE\SOFTWARE\TEST

Thank you
 
D

Dave Patrick

If you want to remove a key and all it's underlying values then you'll need
to construct your .reg file with a - minus sign in front of the key you want
to remove.

An example file to remove a file association .zzz from HKCR
-----------------Begin File-----------
Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\.zzz]
----------------End File-------------

(note the minus sign in front of HKEY)


If you need to delete only certain values, for example the string value
"InfoTip"="Contains zzz files"

Then put a minus sign after the equals sign without "quotes", something like
"InfoTip"=-

So your .reg file would look like
----------------Begin File------------
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.zzz]
"InfoTip"=-
----------------End File-------------

regedit /s filename.reg to import silently

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| I'm hoping i'm using the right terminology here...but here goes.
|
| I have comfortable with regedit and manually deleting a key on the left of
| the regedit screen and all it's associated entries on the right.
|
| Is there a way to have simply an icon on the desktop that I could
| doubleclick which would simply do the same thing.
|
| As an example, the key and all entries associated with it that I would
like
| to delete would be HKEY_LOCAL_MACHINE\SOFTWARE\TEST
|
| Thank you
|
|
 
M

Mark V

In said:
I'm hoping i'm using the right terminology here...but here goes.

I have comfortable with regedit and manually deleting a key on
the left of the regedit screen and all it's associated entries
on the right.

Is there a way to have simply an icon on the desktop that I
could doubleclick which would simply do the same thing.

As an example, the key and all entries associated with it that I
would like to delete would be HKEY_LOCAL_MACHINE\SOFTWARE\TEST

Dave has provided details on using a REG file.

One might also do this using the MS reg.exe CLI utility (probably
in a small batch file that has a Shortcut on the Current User's
desktop).

Fully automated registry editing is hazardous of course. Be sure
you have a Full Registry Backup (not "Exports") before you start
your testing of either solution.

Comment. If your TEST Key is not required to be under
HKLM\Software\, then it's a bit safer to put it under HKCU or
HKCU\Software\.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top