Based on this question,


I am running a installer on MAC OS. It needs to run a pkg package file during the installation. That part was figured on the above question link. However, it seems this package required authentication to run. This can be done through the Terminal like this,

sudo -s
installer -pkg app.pkg -target /

How can I do this in the installer?

asked 01 Jun '13, 11:03

Codename%20K's gravatar image

Codename K
accept rate: 50%

The best solution would be to set <requireInstallationByRootUser>1</requireInstallationByRootUser> so the installer asks for administrator rights at the beginning so you won't need to use sudo when installing the pkg.


answered 03 Jun '13, 04:09

juanjo's gravatar image

juanjo ♦♦
accept rate: 23%

Tried it but it did not work. It seems the "sudo -s...exit" part needs to be passed through the "RunProgram" somehow.

(03 Jun '13, 07:03) Codename K

Thanks anyway.

(05 Jun '13, 10:20) Codename K

If you set <requireInstallationByRootUser>1</requireInstallationByRootUser> it should not require using sudo -s

(06 Jun '13, 03:11) juanjo ♦♦
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: 01 Jun '13, 11:03

Seen: 1,355 times

Last updated: 06 Jun '13, 03:11