Question with multiple actions in software deployment

(imported topic written by jcsUTSW)

I’ve got a program that I need to deploy. Using the software deployment wizard I have the following action script.

download http://sw2kbf1.swmed.org:52311/Uploads/b1e98bb706b7f5fccb9245f38791f23f31ea8c6b/big5.tmp

continue if { (size of it = 1985418 and sha1 of it = “b1e98bb706b7f5fccb9245f38791f23f31ea8c6b”) of file “big5.tmp” of folder “__Download”}

extract big5.tmp

wait “{pathname of system folder & “\msiexec”}” /i “{(pathname of client folder of current site) & “__Download\BBWin_0.12.msi”}” /qn /norestart

This works great with no problems but I need to add to it and would like to know how you would go about doing so.

I have a configuration file that I need to drop into the \Program Files\BBWin\etc directory. This file already exists there so I need to delete it first.

The tricky part is program files may be on C: or D:

Then I need to start the service that’s called “BBWin”

Any tips?

Thanks

(imported comment written by jessewk)

You’ll want to add another download to the action for the config file, or if it’s short just write it out as part of the action using ‘create file’.

After that, use a command like this to delete the destination (and a similar one to copy the config file over):

delete “{value of variable “ProgramFiles” of environment}\BBWin\etc\config.txt”

Then you can start a service silently using the technique described in comment #9 of this thread:

http://forum.bigfix.com/viewtopic.php?id=377

Jesse

(imported comment written by jcsUTSW)

Thanks for the reply!! Looks like that method of starting the service is better than what I was thinking…

This is what I had come up with…

delete __createfile

createfile until endoffile

Line 1 contents of my config file

Line 2 contents of my config file

Line 3 contents of my config file

Line 4 contents of my config file

endoffile

parameter “filename” = “{(value “etcpath” of key “HKLM\SOFTWARE\BBWin” of registry as string & “\BBWin.cfg”)}”

move “{parameter “filename”}” “{parameter “filename”}.bak”

move __createfile “{parameter “filename”}”

delete __createfile

createfile until endoffile

@ECHO OFF

net start bbwin

endoffile

copy __createfile startbb.bat

runhidden startbb.bat

Think that would work?

Should I break it up into multiple actions or can I just add that to the bottom of the initial deployment action?

(imported comment written by jessewk)

looks about right. One deployment Fixlet will be much easier than multiple Fixlets, so yes, I’d just add it to the end.