vote up 1 vote down star

I having trouble with an application not prompting for administrator privileges (thank you Blizzard's WOW installer) and I'm looking for an OS X equivalent of Windows' RunAs.

I am familiar with SUDO, but don't want to use it as it is often a pain to drill down to the relevant binary in the application package.

flag

2 Answers

vote up 1 vote down check

You can use an application called Pseudo to run any application as root. It's nothing more than a shell for sudo, but will accomplish your goal of not having to dig around in application bundles.

I would not recommend using it in this case, though. Broken program can do far more damage as root than as a normal user, and if the WOW installer isn't doing what it's supposed to when you're not an admin, I wouldn't trust it with root priviliges.

Just run the installer logged in as an admin. If that doesn't help, your problem is somewhere else.

link|flag
Blizzard is just lazy and tries to install the whole shebang to the users home directory. I just want it to go into Applications like all other programs. – James McMahon Aug 6 at 0:19
2  
Then if you run it as root, it will install to root's home directory and no one else will be able to access it. Install as a normal user, then move the application directory to /Applications. – SidneySM Aug 6 at 2:11
@SidenySM, you can point the installer at whatever directory, it just needs admin to write to /Applications. – James McMahon Aug 6 at 20:13
vote up 1 vote down

This is probably rare enough that it's not worth going to great lengths to make the process elegant, but you can write a very simple Applescript to elevate an app for you. There are lots of ways to approach it, but if you want it to show you a file picker and then prompt for the Administrator password you could use something like:

set filePath to (POSIX path of (choose file))
do shell script "open \"" & filePath & "\"" with administrator privileges

open will figure out how to find the executable in a App bundle. This will also work with other file types, for instance system configuration files.

You could also make this a droplet or a script menu entry that worked on the current Finder selection. If you add the text: password "yourPass" to the end of the second line then you can suppress the authentication prompt, but I certainly wouldn't recommend that.

link|flag

Your Answer

Get an OpenID
or
never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.