SetobjSession=CreateObject("Microsoft.Update.Session")
SetobjSearcher=objSession.CreateUpdateSearcher
SetobjResults=objSearcher.Search("Type='Software'")
SetcolUpdates=objResults.Updates
Fori=0tocolUpdates.Count-1
'IfcolUpdates.Item(i).Title=_
'"SecurityUpdateforWindowsXP(KB899587)"Then
'IfcolUpdates.Item(i).IsInstalled<>0Then
'Wscript.Echo"Thisupdateisinstalled."
'Wscript.Quit
'Else
'Wscript.Echo"Thisupdateisnotinstalled."
'Wscript.Quit
'EndIf
'EndIf
wscript.echocolUpdates.Item(i).Title
Next
'Wscript.Echo"Thisupdateisnotinstalled."
如何关闭WindowsXPServicePack2防火墙?
SetobjFirewall=CreateObject("HNetCfg.FwMgr")SetobjPolicy=objFirewall.LocalPolicy.CurrentProfile
objPolicy.FirewallEnabled=FALSESetobjFirewall=CreateObject("HNetCfg.FwMgr")SetobjPolicy=objFirewall.LocalPolicy.CurrentProfile
objPolicy.FirewallEnabled=FALSE