1

I'm currently working on a desktop application that runs both on Windows and Mac and needs to request sudo access on Mac in order to install and trust a certificate in the users's keychain, I was planning on displaying a window with a textbox that would request the password but this doesn't look like a clean way to do it. I only require to do that once, not everytime the app runs.

The app has been developed using C# and would require sudo in order to execute a console command using Process.Start(...)

Is there any way I can achieve this?

Thanks a lot in advance

JuanMa
  • 111
  • 4
  • Can't you just run the "sudo" command and pass it the path to the exe as a parameter? – DavidG Aug 04 '16 at 15:32
  • 1
    http://stackoverflow.com/questions/20061526/sudo-chmod-command-from-cocoa – SushiHangover Aug 04 '16 at 18:40
  • I want to avoid calling the command directly with sudo but rather have the OS prompt the user for the sudo password when required, like when you're running an installer. – JuanMa Aug 05 '16 at 20:57

0 Answers0