Some application installers have a lot of options or install additional software you may not use. You can create a choices XML file and customize the installer in many cases. Unfortunately, Jamf Pro does not natively support using a choices.XML file. There are a few ways to go about distributing software using one with Jamf Pro. You can repackage the software and run the install with a post install script
installWithChoices.sh assumes that you have cached the installer and a completed choices XML file to a staging location, in this case /Library/Management/ and runs the installer with the options, then deletes the cached files. The variables used are for the package name and the choices XML file name.
installer -applyChoiceChangesXML "/Library/Management/${choicesName}" -pkg "/Library/Management/${pkgName}" -target /
rm -rf "/Library/Management/${choicesName}"
rm -rf "/Library/Management/${pkgName}"
I deploy both Office and Cisco AnyConnect VPN and modify the installation as we do not utilize all the applications included. The reason this works for me is I can create a policy to cache the Office or AnyConnect installer and a separate choices XML to install only the required applications at the time. I may have a group that wants Outlook, while most installs do not, or a group requesting OneNote. Having one package for the installer for Office that is kept up to date and can be installed with the required options lets me create multiple policies that can reference a single installer that I can keep up to date without needing to update multiple policies.