Reputation: 57
I need to remove a registry key (including its subkeys) from a batch file.
The examples I found led me to the following code but the key remains?
@ECHO OFF
REG DELETE "HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R18.0\ACAD-8001:409\Profiles\STDPROFILE" /V
Upvotes: 2
Views: 4951
Reputation: 22979
Not so good at batch programming, but
reg query "HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R18.0\ACAD-8001:409\Profiles\STDPROFILE" /s > toDelete.txt
for /f %v in (toDelete.txt) do reg delete %v
the first line puts every key and value in a file, then the loop reads them and calls reg delete
Upvotes: 2