Posted on 10-03-2022 11:18 AM
...a complete newbie here, please be easy on me
I plan to cache a PLIST and a PKG using a policy and use a script to trigger the installation (they have to be in the same directory when installing per the vendor). I am struggling with such a script which I figured would find somewhere in this forum but I could not. Can anyone help?
I tried to execute the following command from the File and Processes section,
installer -pkg /Applications/Open Client/installer_10.22.pkg -target /
but I get this error
Result of command:
installer: invalid option Roaming Usage: installer [-help] [-dominfo] [-volinfo] [-pkginfo] [-allowUntrusted] [-dumplog] [-verbose | -verboseR] [-vers] [-config] [-plist] [-file <pathToFile>] [-lang <ISOLanguageCode>] [-listiso] [-showChoicesXML] [-applyChoiceChangesXML <pathToFile>] [-showChoicesAfterApplyingChangesXML <pathtoFile>]
-pkg <pathToPackage>
-target <[DomainKey|MountPoint]>
any help appreciated please, thanks
Solved! Go to Solution.
10-03-2022 06:46 PM - edited 10-03-2022 07:13 PM
@AbeZ_Tt It looks like your path used “smart quotes”rather than basic quotes "" - always use basic quotes.
10-03-2022 11:36 AM - edited 10-03-2022 11:38 AM
you need to add parenthesis, there is a space in the open client directory. replace your command with what I paste below.
installer -pkg "/Applications/Open Client/installer_10.22.pkg" -target /
Posted on 10-03-2022 11:44 AM
@AbeZ_Tt You either have to escape or quite a path for a command in the Files & Processes payload, so for your example it would be:
installer -pkg "/Applications/Open Client/installer_10.22.pkg" -target /
That path isn't where a Jamf Pro policy will cache a .pkg though...
I would recommend you use Composer to create a wrapper .pkg for the vendor .pkg and your .plist to put them in the same temporary directory (e.g. in /private/tmp/OpenClientInstall) and use a post install script to run the installer command on the vendor's .pkg
Posted on 10-03-2022 06:28 PM
Thank you
I did just that and get the following error
installer: Error - the package path specified was invalid: '“/private/tmp/Open_installer/Open.pkg”'.
the pkg and plist are in the /private/tmp/Open_installer location, works when I try installing it manually.
Any clues on what I may be doing wrong?
10-03-2022 06:46 PM - edited 10-03-2022 07:13 PM
@AbeZ_Tt It looks like your path used “smart quotes”rather than basic quotes "" - always use basic quotes.