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: "Francois Houle" <email@hidden>
- Date: Mon, 6 Jun 2005 11:45:43 -0400
- Thread-topic: Running an installer program from a script
Thanks for all the input Andrew !
I'll look into different options for it...
Just a note for the licence agreement, this is a site licence (and the
software is an upgrade)so in this case the user already has accepted the
licence agreement... But in the end I still think I'll have the user go
through the installation themselves when prompted for it...
The only question is the System Events one...
What I'd like to do is bsically, when the installer gets started, its
window should be brought to the front and the script remain in the back
checking the process... I'm just not sure about the way to write it up
as the inscructions in the AS dictionnaries are not that clean about how
to write it up... The terms are there, but the end result line is not
obvious... Could you give me a basic example of waiting for a process
and bringing the installer to the front ?
Frank
-----Original Message-----
From: Andrew Oliver [mailto:email@hidden]
Sent: Sunday, June 05, 2005 11:24 PM
To: Francois Houle; AppleScript-Users list
Subject: Re: Running an installer program from a script
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