Installing Application from Batch file

(imported topic written by Gallus2391)

Hi All,

I;ve seen a few similar posts on this subject but I can;t get my head around how to achive this…

I have a application that I need to install on all my physical servers.

This application is installed from a batch file that runs an exe with some parameters, the computer name is one of these parameters.

I’ve tried setting up a server with a null share but when I use the script command it says running and never finishes, when I use the RUN command it fails striaght way.

I’ve tested with the mapping on the KB article and all is OK.

I’d like to avoid doing the null share if possible and run (independantly of user presence) in a more secure way.

I know you can add files to a site but I’m not sure how I would run those from a fixlet.

We’re running 8.1 on the console at the moment.

The exe I’d like to run is below I need to add the name of the computer to the end of this statement.

fglam-5_5_5_4-windows-ia32.exe --silent --fms url=http://ukstrfms01.peroot.com:8080 --fms url=http://ukedgfms01.peroot.com:8080 --installdir “C:\Program Files\Quest_Software” --host-display-name

Can anyone help me ?

(imported comment written by amagewick91)

Here is an example I threw together from something I have. It may not be 100% but you will get the idea.

Add something like this to the top of the action after you import the software into bigfix.

delete __createfile delete __Download\FGLAM.BAT   createfile until endoffile fglam-5_5_5_4-windows-ia32.exe --silent --fms url=http:
//ukstrfms01.peroot.com:8080 --fms url=http://ukedgfms01.peroot.com:8080 --installdir "C:\Program Files\Quest_Software" --host-display-name    endoffile   move __createfile __Download\FGLAM.BAT

Then you have your EXISTING code from the import (something like this)

download http:
//10.1.1.185:52311/Uploads/0e93cfe0473a67eaf7d5a78cca86cd135c6e7593/lat2120_nic_drvr_win_a37.tmp 

continue 

if 
{(size of it = 123593958 AND sha1 of it = 
"0e93cfe0473a67eaf7d5a78cca86cd135c6e7593") of file 
"lat2120_nic_drvr_win_a37.tmp" of folder 
"__Download"
}   extract lat2120_nic_drvr_win_a37.tmp   wait __Download\setup.exe

Delete the line that runs the installer

wait __Download\setup.exe

Run the FGLAM.BAT file

waithidden cmd.exe /c 
"{pathname of client folder of site "actionsite
" & "\__Download\FGLAM.BAT
"}"

(imported comment written by Gallus2391)

Ok so I get the first section, we’re creating the batchfile which we run later.

On the second section I should download the fglam-5_5_5_4-windows-ia32.exe file that I’ve added to the site. This goes to the _download folder on the local client ?

I’m not familiar with the download statement I assume the actual path on that statement is standard i.e. http://servername/path to site ?

I can then run the batchfile with the run hidden…

(imported comment written by amagewick91)

Sorry I may have confused you with my first example. I have been a bit off lately and quikly threw it together without a lot of thought.

Download the setup file “fglam-5_5_5_4-windows-ia32.exe” first from the vendor, then use the Windows Software Distribution Wizard in Bigfix to import it.

Then you want to edit the task that it creates as shown above in my previous post. Again, the content of that example is a bit off, but you get an idea of what needs to be done.

The batch file should be something like this “I believe”.

delete __createfile delete __Download\FGLAM.BAT   createfile until endoffile 
"{pathname of client folder of site "actionsite
" & "\__Download\fglam-5_5_5_4-windows-ia32.exe
"}" & 
" --silent --fms url=http://ukstrfms01.peroot.com:8080 --fms url=http://ukedgfms01.peroot.com:8080 --installdir "C:\Program Files\Quest_Software
" --host-display-name "   endoffile   move __createfile __Download\FGLAM.BAT

You may need more quotes around the line below for it to work correctly. I know in my VBS I need 3 sets.

"{pathname of client folder of site "actionsite
" & "\__Download\fglam-5_5_5_4-windows-ia32.exe
"}"

After that then you can follow what I put for steps 3 and 4 in my first example.

The full example would look something like this.

delete __createfile delete __Download\FGLAM.BAT   createfile until endoffile 
"{pathname of client folder of site "actionsite
" & "\__Download\fglam-5_5_5_4-windows-ia32.exe
"}" & 
" --silent --fms url=http://ukstrfms01.peroot.com:8080 --fms url=http://ukedgfms01.peroot.com:8080 --installdir "C:\Program Files\Quest_Software
" --host-display-name "   endoffile   move __createfile __Download\FGLAM.BAT   download http:
//10.1.1.185:52311/Uploads/0e93cfe0473a67eaf7d5a78cca86cd135c6e7593/fglam-5_5_5_4-windows-ia32.tmp 

continue 

if 
{(size of it = 123593958 AND sha1 of it = 
"0e93cfe0473a67eaf7d5a78cca86cd135c6e7593") of file 
"fglam-5_5_5_4-windows-ia32.tmp" of folder 
"__Download"
}   extract fglam-5_5_5_4-windows-ia32.tmp   waithidden cmd.exe /c 
"{pathname of client folder of site "actionsite
" & "\__Download\FGLAM.BAT
"}"

(imported comment written by Gallus2391)

Thanks I think I understand… Thats great. I’ll give it go…