自动重置 Windows 更新组件
手动重置 Windows 更新组件
若要重置 Windows 更新组件,请按照下列步骤操作:
打开命令提示符。若要打开命令提示符,请按 Windows 图标键 + R,在“运行”框中复制并粘贴(或键入)以下命令,然后按 ENTER 键:
cmd停止 BITS 服务和 Windows Update 服务。为此,请在命令提示符处键入以下命令。键入每个命令之后按 ENTER。
net stop bits
net stop wuauserv
删除 qmgr*.dat 文件。为此,请在命令提示符处键入以下命令,然后按 ENTER:
Del "%ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\qmgr*.dat"如果这是您第一次使用本文中的步骤解决 Windows Update 问题,请跳过步骤 4 转到步骤 5。在故障排除进行到此步骤时,只有在执行了下列除步骤 4 之外的其他所有步骤之后仍无法解决 Windows Update 问题时,方可执行步骤 4。步骤 4 中的步骤同样以上述 Fix it 解决方案的“主动”模式执行:
将以下文件夹重命名为 *.BAK:
%systemroot%\SoftwareDistribution\DataStore
%systemroot%\SoftwareDistribution\Download
%systemroot%\system32\catroot2
Ren %systemroot%\SoftwareDistribution\DataStore *.bak
Ren %systemroot%\SoftwareDistribution\Download *.bak
Ren %systemroot%\system32\catroot2 *.bak
将 BITS 服务和 Windows Update 服务重置为默认的安全描述符。为此,请在命令提示符处键入以下命令。键入每个命令之后按 ENTER。
sc.exe sdset bits D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)
sc.exe sdset wuauserv D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)
- cd /d %windir%\system32
重新注册 BITS 文件和 Windows Update 文件。为此,请在命令提示符处键入以下命令。键入每个命令之后按 ENTER。
regsvr32.exe atl.dll
regsvr32.exe urlmon.dll
regsvr32.exe mshtml.dll
regsvr32.exe shdocvw.dll
regsvr32.exe browseui.dll
regsvr32.exe jscript.dll
regsvr32.exe vbscript.dll
regsvr32.exe scrrun.dll
regsvr32.exe msxml.dll
regsvr32.exe msxml3.dll
regsvr32.exe msxml6.dll
regsvr32.exe actxprxy.dll
regsvr32.exe softpub.dll
regsvr32.exe wintrust.dll
regsvr32.exe dssenh.dll
regsvr32.exe rsaenh.dll
regsvr32.exe gpkcsp.dll
regsvr32.exe sccbase.dll
regsvr32.exe slbcsp.dll
regsvr32.exe cryptdlg.dll
regsvr32.exe oleaut32.dll
regsvr32.exe ole32.dll
regsvr32.exe shell32.dll
regsvr32.exe initpki.dll
regsvr32.exe wuapi.dll
regsvr32.exe wuaueng.dll
regsvr32.exe wuaueng1.dll
regsvr32.exe wucltui.dll
regsvr32.exe wups.dll
regsvr32.exe wups2.dll
regsvr32.exe wuweb.dll
regsvr32.exe qmgr.dll
regsvr32.exe qmgrprxy.dll
regsvr32.exe wucltux.dll
regsvr32.exe muweb.dll
regsvr32.exe wuwebv.dll
重置 Winsock。为此,请在命令提示符处键入以下命令,然后按 ENTER:
netsh winsock reset如果您使用的是 Windows XP,则需要配置代理设置。为此,请在命令提示符处键入以下命令,然后按 ENTER 键:
proxycfg.exe -d如果您运行的是其他版本的 Windows,请在命令提示符处键入以下命令,然后按 ENTER 键:netsh winhttp reset proxy重新启动 BITS 服务和 Windows Update 服务。为此,请在命令提示符处键入以下命令。键入每个命令之后按 ENTER。
net start bits
net start wuauserv
如果您正在运行 Windows Vista,请清除 BITS 队列。为此,请在命令提示符处键入以下命令,然后按 ENTER:
bitsadmin.exe /reset /allusers重新启动计算机。
==============================================================
echo Program by DSM.ITSS.Gems.OE.Yuhao@2014.03.04 v1.00
@echo off & setLocal EnableDELAYedExpansion
echo Stop Bits and Windows Update service
net stop wuauserv /Y
net stop bits /Y
Echo Remove Registry Keys from Windows Update Agent
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
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate /v SusClientIDValidation /f
each Clean download queue
Del "C:\ProgramData\Microsoft\Network\Downloader\qmgr*.dat"
each Register DLL file
CD /D %SystemRoot%\System32
regsvr32.exe /S atl.dll
regsvr32.exe /S urlmon.dll
regsvr32.exe /S mshtml.dll
regsvr32.exe /S shdocvw.dll
regsvr32.exe /S browseui.dll
regsvr32.exe /S jscript.dll
regsvr32.exe /S vbscript.dll
regsvr32.exe /S scrrun.dll
regsvr32.exe /S msxml.dll
regsvr32.exe /S msxml3.dll
regsvr32.exe /S msxml6.dll
regsvr32.exe /S Msjava.dll
regsvr32.exe /S actxprxy.dll
regsvr32.exe /S softpub.dll
regsvr32.exe /S wintrust.dll
regsvr32.exe /S dssenh.dll
regsvr32.exe /S rsaenh.dll
regsvr32.exe /S gpkcsp.dll
regsvr32.exe /S sccbase.dll
regsvr32.exe /S slbcsp.dll
regsvr32.exe /S cryptdlg.dll
regsvr32.exe /S oleaut32.dll
regsvr32.exe /S ole32.dll
regsvr32.exe /S shell32.dll
regsvr32.exe /S initpki.dll
regsvr32.exe /S wuapi.dll
regsvr32.exe /S wuaueng.dll
regsvr32.exe /S wuaueng1.dll
regsvr32.exe /S wucltui.dll
regsvr32.exe /S wups.dll
regsvr32.exe /S wups2.dll
regsvr32.exe /S wuweb.dll
regsvr32.exe /S qmgr.dll
regsvr32.exe /S qmgrprxy.dll
regsvr32.exe /S wucltux.dll
regsvr32.exe /S muweb.dll
regsvr32.exe /S wuwebv.dll
echo Remove software distribution folder
rd /s /Q %Systemroot%\SoftwareDistribution
rd /s /Q %systemroot%\system32\catroot2
echo Start Bits and Windows Update service
net start bits
net start wuauserv
echo resync
wuauclt /resetauthorization /detectnow
exit /B 0