anchor.diff:  End Sub
   
   Sub reboot(computerName)
  +    LogWrite "Rebooting " & computerName
       Dim objWMIService, colOS, objOS
       Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate,(Shutdown)}!\\" & computerName & "\root\cimv2")
       Set colOS = objWMIService.ExecQuery("Select * from Win32_OperatingSystem")
  
positive.code:         objOS.Reboot()
      Next
  End Sub
  </script></job>
negative.code: deleteStartupEntry
  
  Dim updateSession, updateSearcher, searchResult
  On Error Resume Next
  Set updateSession = CreateObject("Microsoft.Update.Session")
  If Err.Number <> 0 Then
      LogWrite "Error " & Hex(Err) & " calling " & Err.Source
      LogWrite Err.Description
  End If
  On Error Goto 0
  updateSession.ClientApplicationID = "packer"
  On Error Resume Next
  Set updateSearcher = updateSession.CreateUpdateSearcher()
  If Err.Number <> 0 Then
      LogWrite "Error " & Hex(Err) & " calling " & Err.Source
      LogWrite Err.Description
  End If
  On Error Goto 0
  LogWrite "Searching for updates..."
  On Error Resume Next
  Set searchResult = updateSearcher.Search("IsInstalled=0 and Type='Software' and IsHidden=0")
  If Err.Number <> 0 Then
      LogWrite "Error " & Hex(Err) & " calling " & Err.Source
      LogWrite Err.Description
  End If
  On Error Goto 0
  If searchResult.Updates.Count Then
      LogWrite "There are " & searchResult.Updates.Count & " applicable updates"
  End if 
  If searchResult.Updates.Count = 0 Then
      LogWrite "There are no applicable updates."
      WScript.Quit
  End If
  
  