简体   繁体   中英

How to silently install a pkg file in Mac OS X

I am developing a Mac OS X application(cloud printing application). To run my application i need some support drivers. So i packed those drivers and my application using package maker software. And i created a pkg file.

It working fine as a package installer. But i need to silently install this package by running by scripts / commands in terminal.

PS : Silent install is the method that will install the software with any user intervention(like agree the terms). it will silently install the software using admin privillages by using terminal commands. On windows side it is possible to do this silent install.

Can anyone provide the solution to do this silent install in package installer?

Before moving to other installers, we can silently install the installer package using the below command

sudo installer -store -pkg "/User/MyName/Desktop/helloWorld.pkg" -target /

Got the reference from this link.

In order to install *.pkg file silently, it needs to have administrator privileges. Just run my command below if you have administrator password: echo "your_admin_pwd" | sudo -S installer -allowUntrusted -verboseR -pkg "path/to/your.pkg" -target / echo "your_admin_pwd" | sudo -S installer -allowUntrusted -verboseR -pkg "path/to/your.pkg" -target /

you can use [platypus] or [pkginastall] library

I have not used it myself.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM