Registry question

M

M.Siler

How do you create a .reg file that will delete a key? I know how to create
..reg file to add or modify entries but I'm not sure of what goes in the .reg
file to delete a key.
 
R

Rick \Nutcase\ Rogers

Hi,

Use this syntax to remove a key:

Windows Registry Editor Version 5.00
[-HKEY_LOCAL_MACHINE\Software\Microsoft.....]

The path listed is used as an example.

--
Best of Luck,

Rick Rogers, aka "Nutcase" - Microsoft MVP

Associate Expert - WindowsXP Expert Zone

Windows help - www.rickrogers.org
 
A

Alex Nichol

M.Siler said:
How do you create a .reg file that will delete a key? I know how to create
.reg file to add or modify entries but I'm not sure of what goes in the .reg
file to delete a key.

To delete a complete key, put a - immediately after the leading [ in a
..reg file. To delete a value within it, set the value to -

Example:
REGEDIT4

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E965-E325-11CE-BFC1-08002BE10318}]
"UpperFilters"=-
"LowerFilters"=-

[-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Cdr4_2K]

from my 'cdgone.reg', which deletes the two values UpperFilters and
LowerFilters from the first key, and deletes the second key entirely.
 

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

Similar Threads

Reg files no longer working 8
Registry Prompt 3
registry help needed 4
Delete Registry key without warning 4
registry 2
.REG files have to be in Unicode? 2
Changes to registry using a batch file 11
no reg find 2

Top