I have created dmg file for Mac OS X. How can I install it on Mac in silent mode?


asked 23 Sep '13, 07:11

SuryaSingh's gravatar image

accept rate: 55%

In order to run InstallBuilder based installer in silent mode, you can specify --mode unattended - such as:

$ Installer.app/Contents/MacOS/installbuilder.sh --mode unattended

You can also make the unattended mode the default by adding the following to your project file:

<project> <defaultInstallationMode>unattended</defaultInstallationMode> </project>

This will cause the installer to run in unattended mode by default. You can also change <unattendedModeUI> to minimalWithDialogs to also show the progress bar:

<project> <defaultInstallationMode>unattended</defaultInstallationMode> <unattendedModeUI>minimalWithDialogs</unattendedModeUI> </project>

After that, the installer will run in unattended mode by default and can still be switched to full GUI by running it from command line with --mode osx or --mode qt depending on if you are using Qt flavor of InstallBuilder.

However, the user will still have to double-click on the installer - and due to security issues it is not possible to automate this step (to avoid automatically running a virus or other unsafe file).


answered 23 Sep '13, 09:00

wojciechka's gravatar image

wojciechka ♦♦
accept rate: 26%

Thanks for your reply.

I have a dmg which I want to run in GUI as well as in silent mode. What I understand from your reply is it that to run my dmg file in silent mode, I need to mount it first then open content of app file and then run installerbuilder.sh file with --mode unattended argument. Am I right?

(23 Sep '13, 09:19) SuryaSingh

Yes, that is correct. The mounting can be done from GUI or from Terminal, and running the application has to be done via Terminal or you can create a separate .app bundle that launches the original installer in unattended mode and have 2 applications in the DMG.

To do this, simply copy the installer .app bundle, change installbuilder.sh to run ../../../OriginalInstaller.app/Contents/MacOS/installbuilder.sh --mode unattended and remove all other files in Contents/MacOS folder.

This way the user will be able to select between unattended and GUI modes by running appropriate application.

(23 Sep '13, 09:38) wojciechka ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 23 Sep '13, 07:11

Seen: 4,039 times

Last updated: 23 Sep '13, 09:38