Re: Launching Application immediately after installation
Re: Launching Application immediately after installation
- Subject: Re: Launching Application immediately after installation
- From: Mike Fischer <email@hidden>
- Date: Tue, 20 Jun 2006 00:11:24 +0200
Am 19.06.2006 um 20:53 schrieb St?phane Sudre <email@hidden>:
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.
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):
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
$
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.
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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden