site_archiver@lists.apple.com Delivered-To: installer-dev@lists.apple.com Thread-index: AcnB087iG1tzwj7JGUmpE3ByC/YP/w== Thread-topic: Get Value From User? User-agent: Microsoft-Entourage/12.15.0.081119 If you take the lines of code I sent you and copy/paste it into terminal, you'll see the results. I have it setting a terminal variable to what is returned by the script. If you needed multiple values returned, then you might want to go the file route or have each run as a separate script that is equal to the equivalent variable in the shell script (handy if you don't want the possibility of someone reading the info in a hidden file or file name (like a password). If this is for something you plan on publishing publicly or selling, you probably would want to go the plugin route. I have the luxury of doing it with a simple Applescript since my stuff is for internal use only, and hitting a smaller audience (few thousand users). Also, never attempted to make a plugin before. -- Bryan S. Lee
From: Paul Cook <cook.p.d@comcast.net> Date: Mon, 20 Apr 2009 10:28:02 -0500 To: Installer-Dev mailing-list <installer-dev@lists.apple.com> Subject: Re: Get Value From User?
Thanks, for both the custom plugin suggestion and the AppleScript suggestion.
In terms of the AppleScript route, how does the answer get passed to a script? (If for example, I want to use the answer in a PostFlight Script?) I suppose one could have AppleScript write it in a file somewhere and then you could read it from your script. But is there an easier way?
I was able to find some information about custom Installer plugins at: http://developer.apple.com/samplecode/InstallerPluginSample/listing1.html
I haven't looked at the sample code yet, so I don't know if the same question applies to the custom installer plugin approach or not. But unless it is real close to what I want, I may go the AppleScript route.
Best Wishes,
Paul
On Apr 17, 2009, at 11:41 PM, Paul Cook wrote:
Is there anyway from any kind of any Installer script (preflight, postflight, etc.) to ask the user for a value and to get that value from within a script? (Bash, Perl, AppleScript, etc.)
In this case, we'd like to ask the user for a name of something. And then use that name within a script.
My fear based on the answer to the recent progress question is that the answer is probably No. But this is just different enough that I thought it might be worth hoping otherwise.
Thanks for any help,
Paul
_______________________________________________ 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/cook.p.d%40comcast.net
This email sent to cook.p.d@comcast.net
_______________________________________________ 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/bl%40clemson.edu
This email sent to bl@clemson.edu
_______________________________________________ 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... This email sent to site_archiver@lists.apple.com
participants (1)
-
Bryan S. Lee