(imported topic written by SystemAdmin)
Hello everyone,
Here is what I wish to accomplish at the end of this project:
Be able to gather hostnames of unmanaged assets that have yet to have the luxury of having the TEM Client by means of using web reports. Once the hostnames are populated in a file, with each hostname on its own line, use this information to install the TEM Client to these machines.
Currently, I am able to gather all the hostnames and have them set so there is one on each line of the text file.
The VBScript I have written, unfortunately, gets me an error code 1620: This installation package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer package.
Below is the script that I am running on the server.
dim oFile, filename, txtstream, objWMIService, objSoftware
set oFile = CreateObject (“Scripting.FileSystemObject”)
set filename = oFile.openTextFile (“C:\Windows\TEM_reprovisioning\UnmanagedAssetsReport.txt”,1)
txtstream = “”
do until filename.atEndOfStream
txtstream = filename.ReadLine
Set objWMIService = GetObject(“winmgmts:” _
& “{impersonationLevel=impersonate}!\” & txtstream & “\root\cimv2”)
Set objSoftware = objWMIService.Get(“Win32_Product”)
errReturn = objSoftware.Install("\server\share\BESClientMSI.msi /qb",True)
Wscript.Echo errReturn
loop
Any help is appreciated!
Thanks all,
Ilithis