With the release of GFIMax agent V8.5 i wanted to test it, but don’t have the time to log on and install. So i made a script.

Download the agent agent_8_5_0.exe Save it 2 your web server, edit the script, save as VBS, away you go.

Just make a task in GFI to call the script, then away it goes. Or you can just run the script manualy.

———–
    sTarget = “C:temp”
    Set objFSO = CreateObject(“Scripting.FileSystemObject”)
    If Not objFSO.FolderExists(sTarget) Then
     objFSO.CreateFolder(“c:temp”)
    End If
 

    strFileURL = “http://www.YOURSERVER/AGENT_8_5_0.EXE
    strHDLocation = “c:tempAGENT_8_5_0.EXE”

    Set objXMLHTTP = CreateObject(“MSXML2.XMLHTTP”)
 
    objXMLHTTP.open “GET”, strFileURL, false
    objXMLHTTP.send()
 
    If objXMLHTTP.Status = 200 Then

      Wscript.Echo “Downloading the latest version of Agent…” & VbCrLf & VbCrLf
      Set objADOStream = CreateObject(“ADODB.Stream”)
      objADOStream.Open
      objADOStream.Type = 1 ‘adTypeBinary
 
      objADOStream.Write objXMLHTTP.ResponseBody
      objADOStream.Position = 0   
 
      Set objFSO = Createobject(“Scripting.FileSystemObject”)
        If objFSO.Fileexists(strHDLocation) Then objFSO.DeleteFile strHDLocation
      Set objFSO = Nothing
     
      objADOStream.SaveToFile strHDLocation
      objADOStream.Close
      Wscript.Echo “Download complete” & VbCrLf & VbCrLf     
      Set objADOStream = Nothing
    End if
   
Set WshShell = WScript.CreateObject(“WScript.Shell”)
Return = WshShell.Run(“c:tempAGENT_8_5_0.EXE /silent  “, 0, true)
   

—————

« »