• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Preflight script opens rather than executing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Preflight script opens rather than executing
      • From: Karl Kuehn <email@hidden>
  • Prev by Date: Re: Any up-to-date documentation about os x software distribution?
  • Next by Date: Change background on the EULA dialog in DMG
  • Previous by thread: Re: Any up-to-date documentation about os x software distribution?
  • Next by thread: Re: Preflight script opens rather than executing
  • Index(es):
    • Date
    • Thread