PackageMaker Launching an app after closing the Installer

Good afternoon,

I am trying to launch my application that was just installed by a installer created with PackageMaker.

I am able to launch it using a PostInstall script from the Package: component or by using the Post Install Actionfrom the Distribution by opening my application's file (MyApp.app)

But the problem is that the application is launched right away and the user has not clicked the Close button from the installer yet.

I would like to know what would be the proper Mac Guideline and the proper way to do code/implement that feature. ( I am just trying to replicate the InstallShield way on windows when the user is presented a check box to launch the application on the last page of the installer)

Thanks for any input

Simon

Macbook Pro, Mac OS X (10.5.2)

Posted on May 1, 2008 2:29 PM

Reply
4 replies

May 2, 2008 6:40 AM in response to SimonGuertin

The MacOS X installer app (for whom PackageMaker is just the package builder) doesn't work the same way. If you could get it to work, you would have to hack it in some way. Perhaps launch a background process that polls the system and waits until Installer.app is no longer running, then launch the app. There is no "official" way to do this as far as I know.

May 3, 2008 12:14 PM in response to SimonGuertin

SimonGuertin wrote:
I am trying to launch my application that was just installed by a installer created with PackageMaker.

You're the only one who truly knows the requirements of your installer/application, but launching an app immediately following it's installation is fairly non-standard on the Mac platform.

I would guess that most users will be surprised to see this happen and some may be annoyed. Just because someone is installing your app doesn't mean they're also wanting to run it immediately. I've run across some installers that have Finder open the folder containing the app they just installed but offhand I can't think of any Mac installers that launch their app.

Another thing to consider, and perhaps the reason PackageMaker doesn't make it easy to do what you're wanting, is that there is a command line version of the installer. The command line installer allows software packages to be installed by shell scripts or remotely when no one is even logged on to a system. This capability is particularly important in managed environments such as schools, computer labs and enterprises. If your installer requires the GUI and requires that someone be sitting in front of the computer running the installer then it's going to increase the difficultly for admins to distribute your application in large environments.

Steve

PS - ideally it would be nice if it could be determined during an install if the GUI was available (or if the install was taking place on the command line) so that GUI related stuff could be done (or avoided)... but I don't know if that's possible. In any event, your installer shouldn't depend on the GUI being available.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

PackageMaker Launching an app after closing the Installer

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.