Run executable with administrator privileges on mac

I created an Adobe Air application that should be able to edit the hosts file on a Mac, for which you need administrator rights. It works with Windows when running the executable as an administrator. I was wondering how can you do the same on a Mac? If it changes by OS version, I am running Mac OS X 10.7.4

I tried the sudo open 'Application.app' command but did not allow me to edit the file.

Thank! Ken

+5
source share
1 answer

Try to run the application using

sudo Application.app/Contents/MacOS/Application
+7
source

All Articles