Skip to main content
Question

Need to install 2 package in one script


Forum|alt.badge.img+3

Hi 

I need to install 2 package file in Mac system via JAMF pro cloud. I have created 2 installer in 1 package file and add the script but in Jamf console is showing complete but setup in not run on the system

 

script is as below.

#!/bin/sh
## postinstall
 

/usr/sbin/installer -pkg /private/tmp/HPPrinter/hp-printer-essentials-UniPS-6_1_0_1.pkg -target /

/usr/sbin/installer -pkg /private/tmp/HP Secure Print/Personal Print Manager.pkg -target /

 

exit 0 ## Success
exit 1 ## Failure
 
so 1st installer run and then 2nd install this is sequence.
 
kindly correct if I written wrong script 
 
Thank you.

3 replies

jamf-42
Forum|alt.badge.img+17
  • Esteemed Contributor
  • 744 replies
  • April 1, 2023

usr/sbin/installer -pkg /private/tmp/HP Secure Print/Personal Print Manager.pkg -target /

 

Need space escaped

 

HP\\ Secure\\ Print/Pereonal\\ Print\\ Manager


Forum|alt.badge.img+3
  • Author
  • New Contributor
  • 5 replies
  • April 3, 2023

hi all.

 

Thank you for your reply .

 

So I have remove the space and create new script in package file 

/usr/sbin/installer -pkg /private/tmp/SecurePrinter/Printer_1.pkg -target /

now I am able to run the script without any issue and printer successful installed in Mac system via Jamf policy 

Thank you all for your guidance

 


karthikeyan_mac
Forum|alt.badge.img+17

@Bhaskar You can also try "quoting the package path in the second command like

/usr/sbin/installer -pkg "/private/tmp/HP Secure Print/Personal Print Manager.pkg" -target /

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings