locked
Run an application as non-elevated! RRS feed

  • Question

  • I have a program that I run in elevated mode. From inside the program I launch another program which gets the same elevated mode access when it runs. I would like to know is it possible (if so how) run the child process as a standard user or in non-elevated mode?

    I know you can use 'runas' verb in the ShellExecuteEx command to run as admin. Is there anything like that or any similar commands that can execute an application as standard user?

     

    Thanks all.

    Thursday, October 11, 2007 9:12 PM

Answers

  • No, because there is no way to identify which standard user account that would need to be (consider the Over-the-shoulder elevation case).

     

    The best way to resolve this kind of situation (which is fairly common) is to use a 'bootstrap' model. Have your initial process start running as a Standard User and have it initiate the elevated process (either by runas or COM elevation), use IPC to let it know when you need to run other child processes as a Standard User, which it can do by executing them normally.

     

    Friday, October 12, 2007 7:41 AM

All replies

  • No, because there is no way to identify which standard user account that would need to be (consider the Over-the-shoulder elevation case).

     

    The best way to resolve this kind of situation (which is fairly common) is to use a 'bootstrap' model. Have your initial process start running as a Standard User and have it initiate the elevated process (either by runas or COM elevation), use IPC to let it know when you need to run other child processes as a Standard User, which it can do by executing them normally.

     

    Friday, October 12, 2007 7:41 AM
  • Hi Andy,

     

    Thank you for the answer. I think this should help me resolve this problem.

     

    Thanks again.

     

    Friday, October 12, 2007 1:11 PM