Installing an App on a Mac

(imported topic written by SystemAdmin)

We’ve uploaded a folder using the Mac Software Deployment Wizard. Within the folder is an application and a configuration file. When we deploy the task the application appears in the Application folder on the target computer but it doesn’t work (double click does nothing). Below is our action:

download http://bigfix.company.net:52311/Uploads/0a02d9151b88d10c88ce3698c399050c27a3ef14/CompanyRemoteAssistance.tmp

continue if {(size of it = 1059533 AND sha1 of it = “0a02d9151b88d10c88ce3698c399050c27a3ef14”) of file “CompanyRemoteAssistance.tmp” of folder “__Download”}

extract CompanyRemoteAssistance.tmp

if {not active of action OR exists file whose (name of it ends with “.tmp”) of folder “__Download” of client folder of current site}

delete “{pathname of file whose (name of it ends with “.tmp”) of folder “__Download” of client folder of current site}”

wait /bin/sh -c “find {concatenation “\ " of substrings separated by " " of pathname of client folder of current site}/__Download/* -exec cp -rfp {”%7b%7d”} {concatenation “\ " of substrings separated by " " of “/Applications”} ;”

else

wait /bin/sh -c “find {concatenation “\ " of substrings separated by " " of pathname of client folder of current site}/__Download/* -exec cp -rfp {”%7b%7d”} {concatenation “\ " of substrings separated by " " of “/Applications”} ;”

endif

We’ve even zipped the file and attempted to simply place it on the Mac and unzip it from there. But that’s giving us errors too. Below is the action and error

Action

download http://bigfix.company.net:52311/Uploads/858e577f083d340fe09fc174cfb16e7fbe92fdf9/Company%20Remote%20Assistancezip.tmp

continue if {(size of it = 1088765 AND sha1 of it = “858e577f083d340fe09fc174cfb16e7fbe92fdf9”) of file “Company Remote Assistancezip.tmp” of folder “__Download”}

extract Company%20Remote%20Assistancezip.tmp

if {not active of action OR exists file whose (name of it ends with “.tmp”) of folder “__Download” of client folder of current site}

delete “{pathname of file whose (name of it ends with “.tmp”) of folder “__Download” of client folder of current site}”

wait /bin/sh -c “find {concatenation “\ " of substrings separated by " " of pathname of client folder of current site}/__Download/* -exec cp -rfp {”%7b%7d”} {concatenation “\ " of substrings separated by " " of “/Applications”} ;”

else

wait /bin/sh -c “find {concatenation “\ " of substrings separated by " " of pathname of client folder of current site}/__Download/* -exec cp -rfp {”%7b%7d”} {concatenation “\ " of substrings separated by " " of “/Applications”} ;”

endif

Error

Completed

download http://bigfix.company.net:52311/Uploads/858e577f083d340fe09fc174cfb16e7fbe92fdf9/Company%20Remote%20Assistancezip.tmp

Failed

continue if {(size of it = 1088765 AND sha1 of it = “858e577f083d340fe09fc174cfb16e7fbe92fdf9”) of file “Company Remote Assistancezip.tmp” of folder “__Download”}

extract Company%20Remote%20Assistancezip.tmp

if {not active of action OR exists file whose (name of it ends with “.tmp”) of folder “__Download” of client folder of current site}

delete “{pathname of file whose (name of it ends with “.tmp”) of folder “__Download” of client folder of current site}”

wait /bin/sh -c “find {concatenation “\ " of substrings separated by " " of pathname of client folder of current site}/__Download/* -exec cp -rfp {”%7b%7d”} {concatenation “\ " of substrings separated by " " of “/Applications”} ;”

else

wait /bin/sh -c “find {concatenation “\ " of substrings separated by " " of pathname of client folder of current site}/__Download/* -exec cp -rfp {”%7b%7d”} {concatenation “\ " of substrings separated by " " of “/Applications”} ;”

endif

(imported comment written by JackCoates91)

sounds like it’s losing its unix permissions, can you check that it’s still executable? zipping on a windows system will strip that off.

(imported comment written by jessewk)

Jack is right. That’s a pitfall of the Mac Software Distribution Wizard. Make sure you don’t copy the files to a windows system before uploading them. I don’t think you need to pre-zip them before using the wizard, you just need to select the files from a Mac hosted share.

(imported comment written by SystemAdmin)

We’ve recreated the package we want placed on our Macs solely using Mac OSX 6, shared the drive, mounted the share on the computer with our console and used the Mac Software Deployment Wizard. The folder and the files did not once touch a windows based system. When we deploy our new task it essentially takes everything out of the folder (including the .app) and places it in the applications folder. BigFix reports back stating it completed the task successfully. Below is our action script.

download http://bigfix.company.net:52311/Uploads/67769fe778ec5e4aef85ccac744e22039eb65aa1/COMPANYRemoteAssistance.tmp

continue if {(size of it = 1058820 AND sha1 of it = “67769fe778ec5e4aef85ccac744e22039eb65aa1”) of file “COMPANYRemoteAssistance.tmp” of folder “__Download”}

extract COMPANYRemoteAssistance.tmp

if {not active of action OR exists file whose (name of it ends with “.tmp”) of folder “__Download” of client folder of current site}

delete “{pathname of file whose (name of it ends with “.tmp”) of folder “__Download” of client folder of current site}”

wait /bin/sh -c “find {concatenation “\ " of substrings separated by " " of pathname of client folder of current site}/__Download/* -exec cp -rfp {”%7b%7d”} {concatenation “\ " of substrings separated by " " of “/Applications”} ;”

else

wait /bin/sh -c “find {concatenation “\ " of substrings separated by " " of pathname of client folder of current site}/__Download/* -exec cp -rfp {”%7b%7d”} {concatenation “\ " of substrings separated by " " of “/Applications”} ;”

endif

I again attempted zip the folder (on the Mac) and upload the zipped file using the Mac Software Deployment Wizard. That returned a failed. Below is the Action Script Execution Detail:

Completed

download download http://bigfix.company.net:52311/Uploads/3b77d33be694a079d79097aca1f343274e431b52/COMPANY%20Remote%20Assistancezip.tmp

Failed

continue if {(size of it = 1062256 AND sha1 of it = “3b77d33be694a079d79097aca1f343274e431b52”) of file “COMPANY Remote Assistancezip.tmp” of folder “__Download”}

extract COMPANY%20Remote%20Assistancezip.tmp

if {not active of action OR exists file whose (name of it ends with “.tmp”) of folder “__Download” of client folder of current site}

delete “{pathname of file whose (name of it ends with “.tmp”) of folder “__Download” of client folder of current site}”

wait /bin/sh -c “find {concatenation “\ " of substrings separated by " " of pathname of client folder of current site}/__Download/* -exec cp -rfp {”%7b%7d”} {concatenation “\ " of substrings separated by " " of “/Applications”} ;”

else

wait /bin/sh -c “find {concatenation “\ " of substrings separated by " " of pathname of client folder of current site}/__Download/* -exec cp -rfp {”%7b%7d”} {concatenation “\ " of substrings separated by " " of “/Applications”} ;”

endif

(imported comment written by JackCoates91)

On the target system, is the application still executable?

(imported comment written by SystemAdmin)

Negative

All the files basically come out of the folder, including the .app. So for example, the file structure is like this. It essentially contains two items

HD\Company Remote Assistance\server.txt

HD\Company Remote Assistance\COMPANY Remote Assistance.app

When it gets deployed, it appears like this.

Applications\Company Remote Assistance\server.txt

Applications\Company Remote Assistance\company.icns

Applications\Company Remote Assistance\info.plist

Applications\Company Remote Assistance\Appsettings.plist

Applications\Company Remote Assistance\CocoaDialog

Applications\Company Remote Assistance\script

etc

(imported comment written by JackCoates91)

Ok, so the permissions got stripped somewhere along the way. We’ll need to look into if there’s a way to prevent that, but in the meantime you should add a line to your action script to chmod them back into place.