How does task manager elevate without UAC Prompt?

后端 未结 1 1613
醉酒成梦
醉酒成梦 2021-02-15 08:52

This has been on my mind for sometime. I can open task manager by pressing Ctrl + Shift + Esc and on the second tab (Processes), I can easily pr

相关标签:
1条回答
  • 2021-02-15 09:08

    What you are describing is called Auto Elevation. It is done by a lot more than just task manager, but there is no way to make your program do it. To auto elevate the following requirements must be met.

    1. <autoElevate>true</autoElevate> must be in the assembly manifest.
    2. It must be located in one of a handful of "secure" directories. A secure directory is one that standard users can't modify and they include %SystemRoot%\System32 and most of its subdirectories, %SystemRoot%\Ehome, as well as a handful of directories under %ProgramFiles% that include Windows Defender and Windows Journal.
    3. It must be digitally signed by the Windows publisher, which is the certificate used to sign all code included with Windows (it's not sufficient to be signed by Microsoft, so Microsoft software that's not shipped in Windows isn't included)

    You can do number 1 and 2 yourself, but there is no way you can fulfill requirement #3.

    0 讨论(0)
提交回复
热议问题