понедельник, 28 января 2013 г.

Reset клиента Windows Update Agent

Бывает работает-работает клиент wsus... А в понедельник не работает и непонятно почему. Как раз для таких случаев есть лекарство, которое необходимо запускать с правами администратора.


REM Description: This script resets all of Windows Update Agent settings. 
@echo off 
cls 
 
@echo 1. Stopping BITS and Automatic Updates services... 
net stop bits  
net stop wuauserv 
 
@echo 2. Deleting AU cache folder and log file... 
del /f /q %windir%\WindowsUpdate.log 
del /f /s /q %windir%\SoftwareDistribution\*.* 
 
@echo 3. Re-registering DLL files... 
%windir%\system32\regsvr32.exe /s %windir%\system32\atl.dll  
%windir%\system32\regsvr32.exe /s %windir%\system32\jscript.dll  
%windir%\system32\regsvr32.exe /s %windir%\system32\msxml3.dll  
%windir%\system32\regsvr32.exe /s %windir%\system32\softpub.dll  
%windir%\system32\regsvr32.exe /s %windir%\system32\wuapi.dll  
%windir%\system32\regsvr32.exe /s %windir%\system32\wuaueng.dll  
%windir%\system32\regsvr32.exe /s %windir%\system32\wuaueng1.dll  
%windir%\system32\regsvr32.exe /s %windir%\system32\wucltui.dll  
%windir%\system32\regsvr32.exe /s %windir%\system32\wups.dll  
%windir%\system32\regsvr32.exe /s %windir%\system32\wups2.dll  
%windir%\system32\regsvr32.exe /s %windir%\system32\wuweb.dll 
 
@echo 4. Removing WSUS Client Id... 
REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v AccountDomainSid /f 
REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v PingID /f 
REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v SusClientId /f 
 
@echo 5. Restart BITS and AU services... 
net start bits 
net start wuauserv 
 
@echo 6. Forcing AU discovery... 
wuauclt /resetauthorization /detectnow

Комментариев нет:

Отправить комментарий