Preflight script opens rather than executing
Preflight script opens rather than executing
- Subject: Preflight script opens rather than executing
- From: Tim Streater <email@hidden>
- Date: Thu, 21 Apr 2011 22:52 +0100
I want my app to be installed in the user's Applications folder. Normally this works fine but if that folder is absent then the installer runs anyway and just dumps the files into the user's home directory. So, I'm thinking I should run a pre-install Action for the whole package which will check for the existence of the user's Applications folder and create it if it is absent. I have a PHP script which can do that; it has execute permission and its first line is #!/usr/bin/php. Runs fine from the command line.
If I try to add it as an action though, when the install runs the file is simply opened in BBedit or TextEdit. I want it to be *executed*, not *opened*. How do I make this happen?
I did try choosing Get Application as the Preinstall Action and giving that the path to the script. The installer then completes (no longer opens TextEdit) but I'm not sure that my script executes. If I change the name of the folder it's looking for (to Applicationsxxx, say), this folder is not created. Does the Installer pay attention to the exit status of the preinstall script? Does the preinstall script have to have a special name?
I also observe that the user is now prompted for a password when this previously (i.e. before I started messing with preinstall scripts) didn't need to. Can I avoid this?
Thanks,
Tim Streater
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden