Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

While searching for a good (better) solution for this Solution, I try to solve my problem with Packages, but with no success.

My concrete problem looks simple:

    1. Copy a file to `/tmp` (it's an configuration script)
    2. Execute the following command `sudo installer -allowUntrusted -pkg "esets_remote_install.pkg" -target /`

So there are some (or a lot of questions):
1. To solve this problem, have I chose Distribution or Raw Package?
2. On a Raw Package (which also could included in distribution, I can choose Require admin password for installation, if this is checked, do I still need sudo before install?

My first try was to add the pkg and the file for temp to Distribution Additional Resources in Requirement & Resources and run the script via Requirement. Did not work. My second try was to put it into the Raw Package Payloadand run the script via Pre-installation. Again, no success. Even adding the package and the configuration to Additional Resources seems not solve my problem.

Thank you very much for all solutions and ideas. Even a console solution via pkgutilis welcome.

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

Could you do this with Platypus? I use it to package small executables with a shell script into an install app, which uses the shell script to move executables into the target folder on run. You're still going to have issues with your intended result however as I can't see any way around running a package install without requiring admin access IF the package normally modifies files that require admin permission, but you should be able to put the package, the configuration file, and the install script together into one app using Platypus. End users can then run the app to install the package with your desired configuration.

The setup is really simple, the output is minimal. This is not a program designed to do anything complicated but it is free and has been really useful for distributing self-written script-based apps.

share|improve this answer
    
PS if you go this route, scripts run in Platypus will start in the program itself, so you don't need to specify path to any of the included files in the packaged app, just path to where they need to be moved on run. –  dr.nixon Feb 5 at 21:16
    
Platypus is an amazing tool. Give it a spin. –  IconDaemon Feb 6 at 1:16
    
Perfect, exactly what I'm searching for. THX a lot –  Megachip Feb 6 at 15:33
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.