Answers:
您可以使用脚本自动检查并安装更新。这将适用于XP或Windows 7。
有许多脚本可供下载,这是我的:
' Written in 2007 by Harry Johnston, University of Waikato, New Zealand.
' This code has been placed in the public domain. It may be freely
' used, modified, and distributed. However it is provided with no
' warranty, either express or implied.
'
' Exit Codes:
' 0 = scripting failure
' 1 = error obtaining or installing updates
' 2 = installation successful, no further updates to install
' 3 = reboot needed; rerun script after reboot
'
' Note that exit code 0 has to indicate failure because that is what
' is returned if a scripting error is raised.
'
Set updateSession = CreateObject("Microsoft.Update.Session")
Set updateSearcher = updateSession.CreateUpdateSearcher()
Set updateDownloader = updateSession.CreateUpdateDownloader()
Set updateInstaller = updateSession.CreateUpdateInstaller()
Do
WScript.Echo
WScript.Echo "Searching for approved updates ..."
WScript.Echo
Set updateSearch = updateSearcher.Search("IsInstalled=0")
If updateSearch.ResultCode <> 2 Then
WScript.Echo "Search failed with result code", updateSearch.ResultCode
WScript.Quit 1
End If
If updateSearch.Updates.Count = 0 Then
WScript.Echo "There are no updates to install."
WScript.Quit 2
End If
Set updateList = updateSearch.Updates
For I = 0 to updateSearch.Updates.Count - 1
Set update = updateList.Item(I)
WScript.Echo "Update found:", update.Title
Next
WScript.Echo
updateDownloader.Updates = updateList
updateDownloader.Priority = 3
Set downloadResult = updateDownloader.Download()
If downloadResult.ResultCode <> 2 Then
WScript.Echo "Download failed with result code", downloadResult.ResultCode
WScript.Echo
WScript.Quit 1
End If
WScript.Echo "Download complete. Installing updates ..."
WScript.Echo
updateInstaller.Updates = updateList
Set installationResult = updateInstaller.Install()
If installationResult.ResultCode <> 2 Then
WScript.Echo "Installation failed with result code", installationResult.ResultCode
For I = 0 to updateList.Count - 1
Set updateInstallationResult = installationResult.GetUpdateResult(I)
WScript.Echo "Result for " & updateList.Item(I).Title & " is " & installationResult.GetUpdateResult(I).ResultCode
Next
WScript.Quit 1
End If
If installationResult.RebootRequired Then
WScript.Echo "The system must be rebooted to complete installation."
WScript.Quit 3
End If
WScript.Echo "Installation complete."
Loop
您可以从命令行运行,如下所示:
cscript wsusupdate.vbs
我的脚本仅具有最低限度的功能,但可能仍然有用。还有其他具有许多其他功能的此类脚本,请尝试使用Google搜索。
<59, 3> <null>: 0x80240044
。知道为什么失败了吗?我曾尝试查找此引用的方法,但无法弄清楚发生了什么。你能为我指出正确的方向吗?
除了使用Windows Update的常规方法之外,您还可以从命令行强制进行检查。
打开管理员命令提示符并运行:
C:\> %windir%\system32\wuauclt.exe /detectnow
Wuauclt.exe是Windows Update的自动更新客户端,用于从Microsoft Update检查可用更新(对于MS Windows平台的各种版本)。
这不会强制安装。
要检查更新,请转到“控制面板”,“安全性”,“ Windows Update”,然后单击“检查更新”。
强制进行真正的重新扫描更新的另一种方法是通过删除存储在%windir%\ Windows \ SoftwareDistribution \ Download中的所有更新来擦拭板岩:
NET STOP wuauserv
RD /S /Q %windir%\SoftwareDistribution\Download
NET START wuauserv
然后转到Windows Update,然后单击“检查更新”。这可能需要一个小时,因为系统卷上的每个可更新文件都已检查(随后的“检查更新”将很快)。这种方法至少在MS认为的范围内,可以消除错误,减少更新并产生干净的最新系统。