How to run a process as current user privilege from an admin process

后端 未结 3 451
遥遥无期
遥遥无期 2020-12-21 11:39

When a setup program(built by like Inno Setup) does launch a process, the process always be run as administrator privilege. -because setup program had been run as admin.

3条回答
  •  隐瞒了意图╮
    2020-12-21 12:14

    This question comes up every 3 or 4 months internally at MSFT.

    The answer that the security folks give is: You can't. When the elevated process token is created, there are changes made to the token that can't be undone.

    Your best bet is to have a launcher application that runs your elevated setup program and then when the elevated setup program is completed, turns around and runs your child process.

提交回复
热议问题