PDA

View Full Version : Mac OSX authenticated installers



kollcook
05-28-2004, 10:48 AM
Hello,
I'm new to Install Shield. I was evaluating the software and we need to produce and installer that performs an MAC OSX authentication at the start (So the installer runs with admin priviledges). I haven't found a way to do this yet. Any Ideas?

thanks
Gary

Mike_W
06-02-2004, 11:07 AM
Hi Gary,

You can try using the Security Service's isUserAdmin. You can read the Security Service online documentation (http://helpnet.installshield.com/Robo/BIN/Robo.dll?mgr=agm&tpc=%2Frobo%2Fprojects%2Fisxuniversalhelplibrary%2Ftopics%2Fsecurity_service.htm&wnd=InstallShieldLivingHelp%7CMain&agt=wsm&ctxid=search%2Fgsearch.asp) which contains a code example that may be helpful.

The documentation states that the Service only works with UNIX and Windows. However it also works on Mac OSX. It basically checks to see if the user is equal to "root". I hope this is useful.


Mike

Mike_W
06-02-2004, 11:12 AM
Gary,

There is also a "Admin Condition" bean in the Bean Gallery (http://www.installshield.com/downloads/beans.asp?prod=mpf).

Mike

kollcook
06-02-2004, 12:36 PM
Unfortunately I don't think that will help. Since our installer needs to perform admin type things (write to protected directories) then our customers would be forced to use the sudo command (very few OSX users know what that means) or to install as root (again our customers won't know how to do that).

Our present install system simply prompts the user to enter their password and then the installer runs in a sudo-like state.

When I evaluated Multiplatform a couple of months ago I was told that it also didn't have this feature. InstallShield does look impressive and I would use it if it had this feature. Could you please submit it as a feature request for a future version?

thanks
Gary

Mike_W
06-03-2004, 11:14 AM
Hi Gary,

I can submit a feature request for more advanced privilege detection on OSX and have a prompt for credentials. I know something simliar exists for other operating systems.

You can investigate using the Exec Action to run a shell script that performs the sudo command and any other actions requiring elevated privileges. Create an input panel that gathers the user's credentials and pass it to the shell script via parameters. You can have the shell script perform the copy actions or even launch another installer.

Also, would using AppBundles solve your problem? Is there a built in mechanism in OSX that prompts you for credentials if required when using an AppBundle? Just a thought.

Mike

BugKiller
09-27-2004, 05:44 AM
Hi Mike_W.

>>I can submit a feature request for more advanced privilege detection on OSX and have a prompt for credentials. I know something simliar exists for other operating systems.<<

I need this feature too.
When it is available?

Thanks Bugkiller

Roger_TW
03-30-2005, 03:28 AM
[QUOTE=BugKiller]Hi Mike_W.

>>I can submit a feature request for more advanced privilege detection on OSX and have a prompt for credentials. I know something simliar exists for other operating systems.<<

I need this feature too.
When it is available?

Dear Mike_W

I need this feature too. Please answer me . Thanks, Roger_TW

Ofer Rivlin
03-30-2005, 03:55 PM
What exactly do you need?
1. Check that the user is an administrator?
2. Check that this administrator knows the administrator password?
3. Run the sudo command?

Roger_TW
03-30-2005, 09:26 PM
Dear Sir:
When we install the file to the /System folder , it need to authenticate to the system. It likes to Run the sudo command. How to do this in Installshield 10.5? Just as same as Kollcook said before.
Thanks,
Roger_TW

Ofer Rivlin
04-03-2005, 08:56 PM
There is a solution for that that works for me. It is good if you have only few sudo commands that you can execute in a row. When you run a sudo command for the first time, you will be asked for authentication. Once you have entered the password you can continue run sudo commands for 5 minutes hassle-free (without being asked for authentication again). I am using a custom product bean that during the installation (preferably at the beginning), executes an AppleScript that triggers the first sudo command. (You need a custom bean because working with AppleScript in a Shell environment is not straight-forward).

cimlup
04-11-2005, 05:00 PM
By the dates in the zip file, this bean appears to predate X. Does it still work?



Gary,

There is also a "Admin Condition" bean in the Bean Gallery (http://www.installshield.com/downloads/beans.asp?prod=mpf).

Mike

Ofer Rivlin
04-12-2005, 06:16 AM
It works, but as it promises it checks if the user is an admin only on Windows and UNIX.

Ofer Rivlin
05-25-2005, 03:58 PM
I have published a short tutorial with the necessary files about Checking authentication and running sudo commands on Mac OS X during installation with InstallShield Universal at installsite.org:

http://www.installsite.org/pages/en/mp/isuniv.htm#sudo

I will appreciate any relevant comments.
Ofer