Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 657
santhosh Avatar asked Feb 04 '15 07:02

santhosh


People also ask

How do I put the Mac installer on silent?

To run the installer in the silent mode, invoke the installer from the command-line interface. This option runs the installer in the silent mode. The installer Graphical User Interface (GUI) is not displayed to the user. This option specifies the location where the Mobile OTP Desktop Client has to be installed.

How do I install a PKG file on a Mac?

Choose Manage > Install Packages, then select a . pkg or . mpkg file to install. Alternatively, you can drag an installer package to the package list window.

Does macOS have a package manager?

There is no default package manager for Mac users, while Linux users have many options—from the familiar yum and apt to the modern choice of Flatpak.

Where do PKG files install Mac?

pkg file, and sometimes these files are compressed into a Zip file (. zip). All applications are stored in the Applications folder.


2 Answers

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.

like image 65
santhosh Avatar answered Sep 23 '22 12:09

santhosh


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 /

like image 38
phuongle Avatar answered Sep 25 '22 12:09

phuongle