How to use vbs to judge system patch
This article mainly shows you "how to use vbs to judge system patches", the content is simple and easy to understand, the organization is clear, I hope to help you solve doubts, let Xiaobian lead you to study and learn "how to use vbs to judge system patches" this article.
Set objSession = CreateObject("Microsoft.Update.Session")
Set objSearcher = objSession.CreateUpdateSearcher
Set objResults = objSearcher.Search("Type='Software'")
Set colUpdates = objResults.Updates
For i = 0 to colUpdates.Count - 1
' If colUpdates.Item(i).Title = _
' "Security Update for Windows XP (KB899587)" Then
'If colUpdates.Item(i).IsInstalled 0 Then
'Wscript.Echo "This update is installed. "
' Wscript.Quit
'Else
'Wscript.Echo "This update is not installed. "
' Wscript.Quit
'End If
' End If
wscript.echo colUpdates.Item(i).Title
Next
'Wscript.Echo "This update is not installed. "
How to turn off Windows XP Service Pack 2 Firewall?
Set objFirewall = CreateObject("HNetCfg.FwMgr")Set objPolicy = objFirewall.LocalPolicy.CurrentProfile
objPolicy.FirewallEnabled = FALSESet objFirewall = CreateObject("HNetCfg.FwMgr")Set objPolicy = objFirewall.LocalPolicy.CurrentProfile
objPolicy.FirewallEnabled = FALSE
The above is "how to use vbs to judge the system patch" all the contents of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!