Judging script of system patch with vbs

Time:2020-11-21

 

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 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

Recommended Today

Ubuntu password length is too short or too simple to solve

Ubuntu password length is too short or too simple to solve When installing Ubuntu, the account Sai was created. I want to change the password to two letters AA for easy input. Operation terminal [email protected]:~$ passwd sai Change Sai’s password. (current) UNIX password: XX Enter the new UNIX password: AA Re enter the new UNIX […]