Automatic Deployment of BESClientMSI to Unmanaged Assets

(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

(imported comment written by BenKus)

Hi Ilithis,

I am not sure about how your VBScript will work, but I have some questions about the credentials to access the computers…

But in any case, you might consider using our handy client deploy tool from the commandline:

http://support.bigfix.com/cgi-bin/kbdirect.pl?id=368

Ben

(imported comment written by SystemAdmin)

Dear Ben Kus,

You guys are the best! These forums are quite possibly the best learning tool for TEM/BigFix. I used the command line tool you sourced me and it worked flawlessly the first time. You all deserve cake.

Enjoy the rest of your day,

Ilithis

(imported comment written by NoahSalzman)

The cake is a lie.

(imported comment written by BenKus)

I got cake, Noah… Sorry, you weren’t around and I ate it all…

Ben