Mac mpkg and action script problem

(imported topic written by pdentremont91)

Hi Guys,

We are new to Macs and attempting to install a piece of software that requires arguments and must be installed not from the mpkg but from the following:

AgentSetup.mpkg/Contents/Resources/install EMAILADDRESS=someemail@domain.com PASSWORD=Password FIRSTBACKUP=1

which works fine from terminal when prefixed by sudo.

So i uploaded the mpkg as a folder.

Note: Extract seems to extract the the mpkg contents instead of the mpkg from the tmp.

I tried a few things and determined i needed to build a shell script and run it however this doesn’t seem to work.

download http://server:52311/Uploads/ae2bfa9a4d263f300ba672c60b4177ba5f00c0b4/AgentSetup.mpkg.tmp

continue if {(size of it = 19622527 AND sha1 of it = “ae2bfa9a4d263f300ba672c60b4177ba5f00c0b4”) of file “AgentSetup.mpkg.tmp” of folder “__Download”}

extract AgentSetup.mpkg.tmp

appendfile #!/bin/sh

appendfile {posix path of client folder of current site}/__Download/Contents/Resources/install EMAILADDRESS=user@domain.com PASSWORD=password1 FIRSTBACKUP=1

move __appendfile myscript.sh

run chmod 777 myscript.sh

wait sh myscript.sh

Any help would be appreciated,

Peter d’Entremont

(imported comment written by jessewk)

There can be a lot of problems uploading Mac folders through a Windows console. I suggest you put your mpkg file on a disk image and upload the .dmg file through the software distribution wizard. The wizard will use the following logic to build the install action:

  1. Mount the disk image

  2. If there is a .mpkg file at the root of the image, run it using the ‘installer’ command line app

  3. Else if there is a .pkg file at the root of the image, run it using the ‘installer’ command line app

  4. Else if there is a .app folder containing a PkgInfo file with the identifier ‘APPLVISX’ run the VISE installer and use apple script to trigger the install.

  5. Else if there is a .app folder, copy it to the Applications folder.

In this case, step 2 would trigger and in the generated action you should be able to see the where to modify the command line to add your parameters.

Btw, the usual caveats about deploying passwords with BigFix apply (don’t do it).