Skip to main content
Jamf Nation, hosted by Jamf, is the largest Apple IT management community in the world. Dialog with your fellow IT professionals, gain insight about Apple device deployments, share best practices and bounce ideas off each other. Join the conversation.
Posted: by bsuggett
Downloads: 223


This updated and expanded script allows to work around the JAMF binary issues listed below by leveraging the default macOS installer binary.


Feature Request


Expanding on the functionality in July's installPKGfromDMG - Fix pass exit code to JSS Parameters now included are... dmgName="" # Required forcesuccessflag="" # Optional useinstallerapp="" # Optional allowUntrusted="" # Optional Require parameter 6 to be YES applyChoiceChangesXMLFile="" # Optional Require parameter 6 to be YES Supplying parameter 5/forcesuccessflag with "YES" without quotes and case sensitive allows PKG exit code to be bypassed and returns a forced exit code of 0 to the JSS (if needed). Supplying parameter 6/useinstallerapp with "YES" without quotes and case sensitive forces the use of macOS native installer binary to install the PKG. Supplying parameter 7/allowUntrusted with "YES" without quotes and case sensitive allows to bypass an invalid or expired certificate embedded within the PKG. Supplying parameter 8/applyChoiceChangesXMLFile with an XML filename allows the PKG to be supplied an xml answerfile. The xml file MUST be beside the PKG wrapped in your DMG. Please take careful note, that parameters 7 (allowUntrusted) and 8 (applyChoiceChangesXMLFile) are dependent on parameter 6 (useinstallerapp) being YES. I've also added mpkg if no pkg is found within the DMG. Additionally all parameters will be parsed in the logs so one can see if, when, and where something went wrong.


Generating Preview...