To delete a key using Regedit, include a minus sign in front of the key path.
Assume you had the following keys and values:
\[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Stuff\] "GuessWhat"="????" \[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Stuff\More\] "HostName"="NameHost" \[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ZipZap\] "GuessWhat"="????" \[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ZipZap\Zip\] "ZipZap"="ZapZip" \[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ZipZap\Zap\] "BlahBlah"="string"If you wanted to delete the entire Stuff service and the Zip subkey of the ZipZap service, you would submit the following within a .reg file (including the proper header for your version of Regedit):
\[-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Stuff\] \[-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ZipZap\Zip\]If the file name was c:\regdel.reg, then:
regedit /s c:\regdel.reg
where the optional /s makes it silent.
0 comments
Hide comments