We often talk about editing or creating new registry entries in Windows but we seldom talk about removal.  If you want to delete an existing registry entry you simply set the entry value to a hyphen ( – ).

For example, we recently needed to delete:

HKLM > SOFTWARE > Microsoft > Windows > CurrentVersion > Run > InstallWindowsUpdates = DWORD AA

To do this we simply set “InstallWindowsUpdates”=-

Specifically, the DELUPDATES.REG file looked like:

Windows Registry Editor Version 5.00


We scripted this to install silently using the switch /S

regedit.exe /S \\fileserver\scripts\DELUPDATES.REG

and we pushed this command to the desired computers using PDQ so it would run locally as an administrator.

If you wanted to delete the entire key you would use:


which would make your reg file look like:

Windows Registry Editor Version 5.00


For more information see THIS Microsoft article.



Questions or Comments?