具体操作步骤要参考:
在单位里部署了WSUS服务,并且使用组策略在网络中做了部署。说实在的,这的确简化了我的工作。有些同事的计算机有了问题,拿到单位来处理,但总不好把人家的机器也加入到活动目录中去,而且有些人使用的是home版,这些计算机也不能加入进来。于是我就写了个批处理脚本。呵呵,其实是从专业版的注册表中导出的。
@ECHO OFF REM REM Name:setWsusServer REM Author:PopZslam REM Date:03/18/2009 REM Version:0.0.1 REM
set tmpFile="%userprofile%\tmpTestAccessWrite%RANDOM%.reg" set wsusServer=http://wsus.x.com set statusServer=http://wsus.x.com set port=80
echo. >> %tmpFile% if exist %tmpFile% ( del %tmpFile% echo Windows Registry Editor Version 5.00 >> %tmpFile% echo. >> %tmpFile% echo [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU] >> %tmpFile% echo "UseWUServer"=dword:00000001 >> %tmpFile% echo. >> %tmpFile% echo [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate] >> %tmpFile% echo "WUServer"="%wsusServer%:%port%" >> %tmpFile% echo "WUStatusServer"="%statusServer%:%port%" >> %tmpFile% echo. >> %tmpFile% echo [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate] >> %tmpFile% echo "ElevateNonAdmins"=dword:00000001 >> %tmpFile% start "Write to Register ..." /w %tmpFile% del %tmpFile% ) else ( echo Can not create temp pause exit ) @ECHO ON
|
阅读(603) | 评论(0) | 转发(0) |