I am running an application installer in Windows 10. Its manifest says it should be run with Administrator privileges. If I run the application with the environment setting
__COMPAT_LAYER=RunAsInvoker the application should run as the invoking user and no longer request elevation. This works in many cases, however there are several cases in which the application starts and then immediately pops up the UAC dialog.
Just to be 100% clear:
I have set
__COMPAT_LAYER=RunAsInvokerwhen starting the application. This usually works but, in some cases, the application still asks for elevation.
I have set the security policy
User Account Control: Detect application installations and prompt for elevationto DISABLED (I thought this was going to be the real fix, but no).
I DO NOT want the application to run with admininstrator privs. It doesn't need to do anything that would require admin and, if it did, I want it to just try and fail.
The application is not popping up its own messagebox (example, checking if it can write to %ProgramFiles% and then showing me a custom message. It's the UAC prompt on the secure desktop).
Why does this happen? Can an application keep requesting elevation despite the "RunAsInvoker" option?
How can I get the application to just run with the current user's token and simply fail if it has insufficient permissions?
Note that I haven't been able to find any answers beyond the