开发者

Removing a registry key and its subkeys using a batch

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 th开发者_JAVA百科e key remains?

@ECHO OFF
REG DELETE "HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R18.0\ACAD-8001:409\Profiles\STDPROFILE" /V


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜