Re: Running an installer program from a script
Re: Running an installer program from a script
- Subject: Re: Running an installer program from a script
- From: Andrew Oliver <email@hidden>
- Date: Sun, 05 Jun 2005 20:24:05 -0700
On 6/5/05 7:01 PM, "francois.houle" <email@hidden> wrote:
> I have created a script where part of it includes running an installer. So I
> made it into an application bundle and saved the installer in the Resources
> folder.
> My first question is, should I do it this way or simply include the
> installer in the same folder as the script ?
Most distributions ship just the installer, which installs the script in
question. If your program requires an installer then that's the way I would
run it. It would be unusual for the user to run the program which called the
installer, and it's counter-intuitive for many users.
> I have included this following code in my script to startup the installer..
> Is that the right way to do it ?
>
> set home_path to (path to me)
> tell application "Finder"
> open alias ((home_path as string) & "Contents:Resources:installer.mpkg")
> end tell
That's one way to do it, but see my point above.
> Also, I'd like to know if there is any other way to automate the
> installation (such as clicking on Continue, clicking the license agreement,
> etc) besides using GUI scripting and refering to each button to click on
> them ?
I think this is way off base. It is totally wrong for your script to drive
the installer in this way. What if the user doesn't agree with the license
agreement? Well, tough shit because your script is going to click the
'Accept' button anyway, whether they like it or not.
If your program doesn't require a license agreement then there are ways of
building .mpkg's that don't use them.
> And last, I'd like to know how I can have the script wait in the background
> until the Installer is done so the user can keep on going with the script
> once the installation is completed. On that one I'd like suggestions on how
> you'd take this one on as I now there are different options...
The classic way is to poll System Events to see if the process is still
running, but I'm sure there are alternatives.
Andrew
:)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden