windows - How to delete registry entry with batch command?
问题描述
I want to delete a specific entry in registry. The path is this
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\3rdparty\Extensions\heildphpnddilhkemkielfhnkaagiabh\policy\url_list
Then in the path, there is a specific entry with name 4
and entry server.com
.
I found this
REG DELETE "HKEY_CURRENT_USER\SOFTWARE\SomeProgram" /v "EntryName"
but how do I get it to delete by value? I want to enter server.com
instead of 4
.
解决方案
命令行只允许删除键,但不允许删除它们的值。您可以通过用您想要的值覆盖值来使用替代方法
利用 :
REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\3rdparty\Extensions\heildphpnddilhkemkielfhnkaagiabh\policy\url_list /v "EntryName" /t REG_SZ /d example.com