anchor.diff:  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()
  -WScript.Echo "Searching for updates..."
  +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
  -    WScript.Echo "There are " & searchResult.Updates.Count & " applicable updates"
  +    LogWrite "There are " & searchResult.Updates.Count & " applicable updates"
   End if 
   If searchResult.Updates.Count = 0 Then
  -    WScript.Echo "There are no applicable updates."
  +    LogWrite "There are no applicable updates."
       WScript.Quit
   End If
   
  
positive.code: Function getUpdatesToDownload(searchResult)
      LogWrite "Creating collection of updates to download."
      Dim updatesToDownload, i
      Set updatesToDownload = CreateObject("Microsoft.Update.UpdateColl")
      For i = 0 to searchResult.Updates.Count-1
          Dim update, addThisUpdate
          Set update = searchResult.Updates.Item(i)
  
negative.code:         objOS.Reboot()
      Next
  End Sub
  </script></job>
  