Bypassing elevation when launching a new process

后端 未结 4 1335
无人共我
无人共我 2020-12-03 23:53

OK, here\'s my problem: I\'m trying to launch a third-party application. This application is apparently configured to require elevation, presumably via an embedded manifest

4条回答
  •  甜味超标
    2020-12-04 00:27

    Another possible solution is to use use the Microsoft Application Compatibility Toolkit to create and install a custom compatibility database that applies the RunAsInvoker fix or the RunAsHighest fix to the application in question. Although the documentation does not say whether or not this works for applications that have requireAdministrator set in the manifest, I have tested this and it works for me.

    You can install a compatibility database programmatically using the sdbinst command-line tool.

    (In most scenarios, Norbert's answer will be considerably simpler to use, but there may be edge cases. In particular, using a compatibility fix may be preferable if your program is not directly responsible for launching the problematic executable.)

提交回复
热议问题