Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use vbs to judge system patch

Shulou Source: shulou.com Published: 2022-06-03 06:50:47 11月15日 Update

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!

Tags: Systems patches content articles learning help easy to understand more organization knowledge editing industry information information channels firewalls channels research fire prevention Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Shulou Technology Apple macOS OPPO Reno