Checkbox on actions to run elevated

I know it is possible to execute the entire project elevated, but it would sometimes be helpful to have the ability to execute some actions elevated while leaving the others to run as a normal user. Adding a checkbox to the Runtime tab under Execution Properties would make the most sense.

I like the idea, and have explored this several times over the years since UAC was introduced (vista).

The trouble is that on windows, only processes can be elevated, not parts of a process. So my though was to launch another instance of FB (well FBCMD) and just run that specific action, but in doing that, there is no way to avoid the elevation prompt.

Also, the only way to launch an elevated process is via ShellExecute, which does not provide any means to capture stdout/stderr - so we would need to establish some form of socket communication to be able to capture the logs live, or just write it to a file and import when done.

That’s doable, but the elevation prompt makes the whole idea a non starter.

Thank you for the feedback! We ended up executing the Automise project elevated and then for specific tasks where we needed to run something that was not elevated, we are choosing to use the Execution Properties and configure it to use a standard user. For our purposes, we have several actions which need to run elevated and then only a few which specifically should not run elevated. We do have to prompt for the password of the standard user, but in our scenario, this is not a problem.

1 Like