Mac Software Deployment Wizard; Succeeds, but Doesn't Install

Hi,

I’m trying to make a Mac install package for Stata 14 with the wizard. Everything went fine, and the deployment task completed successfully, except the software isn’t installed. The folder “/Applications/Stata” is there, but it is empty. I guessed it might be the DMG file/folder, so I unpacked it and uploaded that to the server and ran it again with the same result. No software. The log file isn’t anything that is helpful since there are actually no errors in it. How does one create a software deployment fixlet/task for installing a piece of software on the Mac?

Here is what the wizard produced…

prefetch Stata14Extracted.tmp sha1:6e47bdbe12184eabcf326931ef4dff000fbd22b7 size:359678489 http://iem.domain.com:12345/Uploads/6e47bdbe12184eabcf326931ef4dff000fbd22b7/Stata14Extracted.tmp sha256:24bffeab76d75aa222c231d389f05176fced23a8c3adeaec285345b2f4539076

wait mkdir -p "/Applications/Stata"
createfile until END
cp -Rfp “{pathname of client folder of current site & “/__Download/Stata 14 Extracted”}” "/Applications/Stata"
END

move __createfile copyFiles.sh
wait /bin/sh “{pathname of client folder of current site & “/copyFiles.sh”}”

// FOLDER PACKAGE INSTALLS (.pkg, and .mpkg)
if {(not active of action OR ((exists folder whose (name of it ends with “.mpkg” OR name of it ends with “.pkg”) of it)) of folder ("/Applications/Stata"))}

wait installer -pkg “/Applications/Stata/Stata 14 Extracted” -target /

// FOLDER APPLVISX BINARY
elseif {exists folder whose (name of it ends with “.app” AND exists folder “Contents” whose (exist file “PkgInfo” whose (exists line whose (it = “APPLVISX”) of it) of it) of it) of folder ("/Applications/Stata")}

appendfile tell application "/Applications/Stata/Stata 14 Extracted"
appendfile DoInstall
appendfile quit
appendfile end tell

wait /bin/sh -c “iconv -f UTF-8 -t macintosh {concatenation " " of substrings separated by " " of pathname of client folder of current site}/__appendfile > {concatenation " " of substrings separated by " " of pathname of client folder of current site}/doinstall.txt”

run “{posix path of framework folder & “/Carbon.framework/Versions/Current/Support/LaunchCFMApp”}” “{(pathname of parent folder of it & “/” & name of it & “/Contents/MacOSClassic/” & preceding text of first “.app” of name of it) of folder whose (name of it ends with “.app”) of folder (”/Applications/Stata")}"

wait /bin/sh -c “osascript {concatenation " " of substrings separated by " " of pathname of client folder of current site}/doinstall.txt”

// FOLDER APP BINARIES (.app)
elseif {(not active of action OR ((exists folder whose (name of it ends with “.app”) of it)) of folder ("/Applications/Stata"))}

wait sh -c “rm '/Applications/{name whose (it ends with “.app”) of folders of folder (”/Applications/Stata/Stata 14 Extracted")}’"
wait cp -Rfp “/Applications/Stata/Stata 14 Extracted” “/Applications”

// FILE PACKAGE INSTALLS (.pkg, and .mpkg)
elseif {(not active of action OR ((exists file whose (name of it ends with “.mpkg” OR name of it ends with “.pkg”) of it)) of folder ("/Applications/Stata"))}

wait installer -pkg “{(if (exists file whose (name of it ends with “.mpkg”) of it) then (pathname of file whose (name of it ends with “.mpkg”) of it) else (pathname of file whose (name of it ends with “.pkg”) of it)) of folder (”/Applications/Stata/")}" -target /

endif

Thanks

Your prefetch statement is downloading the file “Stata14Extracted.tmp”. I don’t see anything in the script that is renaming this file and it’s not going to do anything with a file with a .tmp extension. Is this a flat package installer? If so, it needs to have a .pkg extension.

the tmp might be a BFArchive in which case they need to extract it. The extract also in later versions of the platform can extract to a different directory so you could specify the directory rather than copying it.

The normal documentation is at https://developer.bigfix.com/action-script/reference/file/extract.html

With at least a 9.0 client or later you can do:

extract <archive> <directory-to-extract-to>
1 Like

Hi,

Thanks for the replies. I added the extract command in and it still succeeded, but didn’t do anything. The only change was the installer was extracted to /Applications/Stata/

I then tried just a simple: wait installer -pkg "__Download/Stata14Extracted/Install Stata.pkg" -target / but that didn’t work either. The task succeeded, but there is no sign of Stata anywhere on the Mac.

I’m going to run that command interactively and see what it does.

I punted and installed it all manually. I didn’t have time to get it working with BigFix. Thanks for the replies!

Was the pkg actually in the download folder in that location?

1 Like