Help with building out software install package

(imported topic written by russwm91)

Hello below is a basic action script I’m putting together for one of our applications we use

//Downloading source files for applications

prefetch client.exe sha1:0123456789012345678901234567890123456789 size:11723 http://x/client.exe

prefetch clientz.exe sha1:0123456789012345678901234567890123456789 size:11723 http://x/clientz.exe

//Close any open instance of Client

If {exist running application “client.exe”} waithidden taskkill /F /IM client.exe

If {exist running application “client.exe”} waithidden taskkill /F /IM clientz.exe

//Remove any old instance of Ellis

//Uninstall Client

waithidden msiexec /x {044cf88e-88fd-4dd1-b9da-4236cb530a2} /passive

//uninstall Client Common Client

waithidden msiexec /x {3D8382AE-FF27-4BFE-AE02-63CCC4111E9B} /passive

//Delete Old Client Files if present from workstation before installing the new client

if exist {“c:\program files\true blue\client”} then

waithidden cmd.exe /C rd /s /q “C:\Program Files\True Blue\Client”

//Install Client Common Client

waithidden msiexec /i “Client Common - ENG.msi” /passive

//Install Client Branch

waithidden msiexec /i “Client - ENG.msi” APPSERVER=servername ISBRANCH=1 Client_SHARE="\servername" COGNOSREPORTSERVERURL=“http://servername/cognos8/” /passive

Please review my action script and provide me with ways to improve it. I have only been using Bigfix for a month so this is my first attempt at Fixlet or task authoring.

Ideally I would want it to determine weather or not client process is running and the kill it

I would like it to do a regapp look up for the uninstall parameter in case the hard coded one is different from what is on the workstation. I would like to see a check at the end to make sure it installed correctly by checking the version of the client on the workstation =XXXX if not then it failed

(imported comment written by BenKus)

Hi russ,

Looks like you got pretty far, here are some notes:

  • Use “//” instead of “\” for the comments.
  • Add “waithidden” before your msiexec commands.
  • You can use if statements like:

If {exists running application “client.exe”

waithidden taskkill …

EndIf

  • Consider using the newer prefetch command instead of the old download/continue if command (easier syntax and you can stay on Jesse’s good side: http://forum.bigfix.com/viewtopic.php?pid=18024#p18024)

  • Make sure to escape your brackets: “{{” (http://support.bigfix.com/cgi-bin/kbdirect.pl?id=1230)

  • To make the action fail if the install didn’t work, simply add the relevance to the Fixlet that detects a proper install… The agent will automatically check the relevance after it runs the actionscript and if the Fixlet is still “TRUE” (indicating the install is still needed), it will report “Failed”…

Ben

(imported comment written by russwm91)

Hello Ben,

I’m trying to read up on the action guide still not understanding everything I need.

  1. I changed all my \ to // I think I have the correct format for the prefetch downloads not sure if there is a limit on how many downloads you can have in a prefetch block.

  2. I tried to add pause statements for each command after the start of each uninstall and install. I just don’t have correct format to make sure is doesn’t continue if the command above is still running.

  3. I looked at the If {exist running application “client.exe”} waithidden taskkill /F /IM client.exe does this command look for the running process list and then see client.exe in the process list then executes the command?

I’m open to any ones help and advice to make this install work great. We have only had Bigfix for a month and I’m trying to show our company that it is far superior then our current SCCM product that Microsoft shovels down our throats here in greater Seattle area.

(imported comment written by BenKus)

Hi Russ,

  1. No limit on the prefetch items… but I think you are missing the first argument of the filename.

  2. No need for pause statement (since the waithidden will not continue until msiexec exits…)

  3. Yes. It looks for the running process and then will continue to the kill command only if it sees it… Don’t forget the “endif”.

AND

  1. You still need to escape the “{”: http://support.bigfix.com/cgi-bin/kbdirect.pl?id=1230

I suggest you try it out on a test computer and if it fails, we can identify the issue…

Ben