Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5 -- as a non-privileged user?
Is there a way to execute a and make sure it doesn't execute with uac privileged status?  Of course, any time something is run directly from the editor, it'll run as an admin.  If I make an executable that can be run as a standard user, that's fine... but certain things I do, the applications I'm manipulating run as admin so the script needs to run as admin.  In those cases, there are times I'd like to have the script open up a webpage in the default browser for example.  In the case of a browser, I definitely do NOT want it to launch as admin.  

Currently as a workaround, I'm checking uacInfo.isAdmin.  If that's true, then I copy the URL I would open to the clipboard and pop up a dialog telling the user to paste that URL in the browser.  I just hoped there may be a fancy way to make it easier for my end users.

I suppose the challenge will be... what user can it be run as... because I'm not sure there's a programmatic way to see how the user is logged in if the parent process is started as admin.

#2 always starts new process as not-admin. And there is flag to start as admin.

All other similar functions would start new process as admin if current process is admin. Including run.console, Process.Start, ShellExecute[Ex], CreateProcess.

Copy      Help
// script ""; //admin + @"notepad.exe"); //not admin + @"notepad.exe", flags: RFlags.InheritAdmin); //admin
Process.Start(folders.System + @"notepad.exe"); //admin
Awesome!  Thank you.  I missed that Smile
Currently it is only in RFlags documentation.

Forum Jump:

Users browsing this thread: 1 Guest(s)