Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Execute Updater by VBS?

Status
Not open for further replies.

tr0n

ISP
Aug 19, 2005
20
US
Anyone know how to automate the Adobe_Updater.exe process? I've been googling things and all I can come up with are results about how to disable the thing. I need to know if there's a switch command or something I can use in a VBS to automate the update process. When the updater runs, it checks for downloads then requires user interaction to proceed with the download and install, then again to reboot. How can I insert this into my script to automate these selections?

Script currently is as follows:

Code:
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(".\text.txt", ForReading)
Set WriteStuff = objFSO.OpenTextFile("log.txt", 8, True)
Const ForReading = 1
dim computer
dim runme
dim errReturn
runme = "C:\Program Files\Common Files\Adobe\Updater6\Adobe_Updater.exe"
i = 0
Do Until objFile.AtEndOfStream
   computer = trim(objfile.readline)
   Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & computer & "\root\cimv2")
   Set objProcess = objWMIService.Get("Win32_Process")
   errReturn = objProcess.Create(runme, null, null, intProcessID)
   i = i + 1
   if  not errReturn = 0 then
         WriteStuff.WriteLine("Failure to launch on " & computer & vbCrLf)
      err.clear
    end if
Loop
objFile.Close
WriteStuff.Close
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top