服务器维护,服务器代维,安全设置,漏洞扫描,入侵检测服务

administrator 发表于 2005-11-23 22:25:56

命令行(CMD)界面下实现对注册表键值的删除

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