# Monday, October 26, 2009

Deleting Registry values with a .reg file

Sometimes you just want to do something simple in a batch file, and I'd always thought it wasn't possible to 'delete' a value in a .reg file (as the file is applied as a 'merge'), but it is...

Just replace the value with a - (minus)...

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoDriveTypeAutoRun"=-



Wednesday, December 23, 2009 1:10:54 PM (AUS Eastern Daylight Time, UTC+11:00)
You can also use:


reg delete HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoDriveTypeAutoRun
MB
Comments are closed.