命令行(CMD)界面下实现对注册表键值的删除
<P>需要删除某个注册表的键值</P><P>解决方案:</P>
<P>在本机的命令行(CMD)界面下,可以用REG命令来实现对注册表键值的删除:</P>
<P>REG命令的说明如下:</P>
<P>REG DELETE KeyName </P>
<P>KeyName [\\Machine\]FullKey</P>
<P> Machine Name of remote machine - omitting defaults to the current machine</P>
<P> Only HKLM and HKU are available on remote machines</P>
<P> FullKey ROOTKEY\SubKey</P>
<P> ROOTKEY [ HKLM | HKCU | HKCR | HKU | HKCC ]</P>
<P> SubKey The full name of a registry key under the selected ROOTKEY</P>
<P> valueName The value name, under the selected Key, to delete</P>
<P> When omitted, all subkeys and values under the Key are deleted</P>
<P> /ve delete the value of empty value name <no name></P>
<P> /va delete all values under this key</P>
<P> /f Forces the deletion without prompt</P>
<P>命令例子:</P>
<P>REG DELETE HKLM\Software\MyCo\MyApp\Timeout /f</P>
<P> Force to deletes the registry key Timeout and its all subkeys and values </P>
<P>REG DELETE <A href="file://\\ZODIAC\HKLM\Software\MyCo" target=_blank>\\ZODIAC\HKLM\Software\MyCo</A> /v MTU</P>
<P> Deletes the registry value MTU under MyCo on ZODIAC(computer name)r</P>
<P>建议方案:</P>
<P>1) 把 REG DELETE … /F 写入脚本(script.bat) <BR>2) 修改default domain group policy或者 联系相应OU 的group policy object <BR>3) 把步骤1)中生成的script.bat 作为用户登录的logon script</P>
页:
[1]