Re: Launching Application immediately after installation
site_archiver@lists.apple.com Delivered-To: installer-dev@lists.apple.com Am 19.06.2006 um 20:53 schrieb St?phane Sudre <ssudre2@wanadoo.fr>: On lundi, juin 19, 2006, at 06:11 PM, Luke Bellandi wrote: Hi Amrit, How are you launching your application in your postflight script? I would think that using "open /Applications/MyApp.app" should open the application, and return, allowing the postflight script to exit and the Install to complete normally. It could also be interesting to know where the application is supposed to be installed and which authentication you are requiring. sudo "$USER" open "/Applications/TextEdit.app" Replace with your application path of course. I tried this in Terminal.app: $ sudo -s Password: # sudo -u mike open "/Applications/TextEdit.app" # exit $ HTH Mike -- Mike Fischer Softwareentwicklung, EDV-Beratung Schulung, Vertrieb Web: <http://homepage.mac.com/mike_fischer/index.html> Note: I read this list in digest mode! Send me a private copy for faster responses. _______________________________________________ Do not post admin requests to the list. They will be ignored. Installer-dev mailing list (Installer-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/installer-dev/site_archiver%40lists.a... Because you may not want root to launch the application. Using open to launch a document instead of an application works fine even from a postflight script run as admin/root (EUID 0). I'm using this method to launch a URL which will launch the default browser (Safari in most cases) and open the URL. Otherwise it's probably possible to figure out the real user that launched the Installer. Check out the shell variable USER in the postflight script. (See man bash for details.) Then try this (untested): Synopsis: Execute a shell as root. Then launch TextEdit from this shell as my normal user id. Go back to my normal non-root shell. Worked fine so the above code should work in your postflight script as well. Try it with a non admin user though. Not sure if it works there. This email sent to site_archiver@lists.apple.com
participants (1)
-
Mike Fischer