0

This question already has an answer here:

I am trying to write an app that will trigger an pkg to open so the user can install this. I have the code and it is working well except for the following.

When I try to open the pkg file using open /tmp/mypackage.pkg in most cases it will open the Finder to the users home folder not the package.

I have checked and the package is present within the specified directory and the application is creating the correct command.

The command i am using to do this is in python:

subprocess.Popen(['open', '/tmp/mypackage.pkg'])
application.close()

marked as duplicate by nohillside Nov 14 '13 at 12:24

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1

From the command line you could use

sudo installer -pkg /tmp/mypackage.pkg -target /

I assume you can incorporate this into your python application.

  • 1
    I want to be able to use open only becuase I want to show the installer UI to the user. – user204088 Nov 14 '13 at 11:17

Not the answer you're looking for? Browse other questions tagged .