Install App on Mac OS with command line arguments

user-kgvShFwdkY
New Contributor II

Hi,

I have an app that I am trying to install, and I want to provide command line parameters for the install. I don't see an option for providing command line arguments in. JAMF Pro configuration

sudo securityagent.pkg --key=XXX --env=XXX

1 ACCEPTED SOLUTION

Tribruin
Valued Contributor II

You would need to build a custom package and post install script to run the installer. Build a package that puts the installer package (securityagent.pkg) in a custom location (e.g. /var/tmp) and then create post-install script to run the installer from that location:

#!/bin/sh

# Run installer
/var/tmp/securityagent.pkg --key=XXX --env=XXX

# Remove package after install
rm /var/tmp/securityagent.pkg

You then create a policy in Jamf to install this new package instead of original installer package.

View solution in original post

5 REPLIES 5

Tribruin
Valued Contributor II

You would need to build a custom package and post install script to run the installer. Build a package that puts the installer package (securityagent.pkg) in a custom location (e.g. /var/tmp) and then create post-install script to run the installer from that location:

#!/bin/sh

# Run installer
/var/tmp/securityagent.pkg --key=XXX --env=XXX

# Remove package after install
rm /var/tmp/securityagent.pkg

You then create a policy in Jamf to install this new package instead of original installer package.

user-LyiRNoMzva
New Contributor

set pathToApp to (POSIX path of (path to me)) & "Firefox 3.app" do shell script "open -a "" & pathToApp & "" --args -P default -no-remote"
In this example it would be "Firefox 3.app") Result: /Applications/Firefox 3 launcher.app/Firefox 3.app.

user-kgvShFwdkY
New Contributor II

So I need JAMF composer to create this custom app? After searching it seems like I need to use JAMF Composer, I have a Jamf PRO cloud account....Where can I download the Jamf composer software?

mm2270
Legendary Contributor III

Right here on Jamf Nation go into your account in the upper right section, and choose My Assets. From there, as long as your Jamf Nation account is correctly linked to your Jamf instance, you should be able to download the Jamf Pro DMG, which includes the Mac applications including Composer.

user-kgvShFwdkY
New Contributor II

Thanks for the help! was able to install using the above method!