How to remove a registry key from using notepad

  • Thread starter Thread starter T
  • Start date Start date
T

T

Hi,
I need to deploy a software throughout my organisation
and I need to delete a key using notepad. I was wondering
if anyone can show me a sample of the argument to type
and save in notepad so as to delete a key. Thanks.
 
T said:
Hi,
I need to deploy a software throughout my organisation
and I need to delete a key using notepad. I was wondering
if anyone can show me a sample of the argument to type
and save in notepad so as to delete a key. Thanks.

Hi

You can delete keys and values with a registry file (.reg):


Delete key:

REGEDIT4

[-HKEY_LOCAL_MACHINE\SOFTWARE\Brix\Testapp2]


Delete value:

REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Brix\Testapp2]
"Test"=-


Be sure that you registry file contains a blank line at the end.

More here:

WinGuides.com Article - Windows Registry Tutorial Importing and Exporting
Registry Settings
http://www.winguides.com/article.php?id=1&page=4&guide=registry
 
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

(note: encoding should be unicode format)

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft MVP [Windows NT/2000 Operating Systems]
http://www.microsoft.com/protect.

:
| Hi,
| I need to deploy a software throughout my organisation
| and I need to delete a key using notepad. I was wondering
| if anyone can show me a sample of the argument to type
| and save in notepad so as to delete a key. Thanks.
|
|
 
Back
Top