2

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.

2 Answers 2

2

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.

7
  • 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. Aug 6, 2009 at 0:19
  • 3
    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.
    – s4y
    Aug 6, 2009 at 2:11
  • 1
    @SidenySM, you can point the installer at whatever directory, it just needs admin to write to /Applications. Aug 6, 2009 at 20:13
  • I didn't had any such issues with WOW installer, @James. And I installed it to /Applications as default. Wondering what could have really happened in your end... I did download the installer from Blizzard website.
    – cregox
    May 21, 2010 at 0:08
  • @Cawas, the first Mac OsX account is admin by default. The account I run under is pure user, which could account for the behavior. Also it has been about a year since I posted this, so Blizzard could have improved their installer. Jul 21, 2010 at 12:40
1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .