Use VBS to judge system patches script _vbs

Source: Internet
Author: User


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 isn't installed.
' Wscript.Quit
' End If
' End If
WScript.Echo Colupdates.item (i). Title
Next

' WScript.Echo ' This update isn't installed.


How do I turn off the 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.