We have an x86 Win32 desktop application. When the installer is run by a Standard (non-Admin) user, we avoid elevating and/or showing a UAC prompt and install under C:\Users\username\AppData\Roaming\...
instead of the common Program Files
directory.
On Windows 10, when our uninstaller is launched from Control Panel -> Programs -> Programs and Features
, no UAC prompt is shown and the uninstaller runs without elevating. This is the desired behaviour. When the same uninstaller is launched from Start -> Settings -> System -> Apps & features
, a UAC prompt is shown.
(The same behaviour can be seen in the Opera browser installer/uninstaller. I tested v35.0.2066.37.)
Why does the same uninstaller behave differently when launched from Apps & features
versus Programs and Features
?
How can the UAC prompt be avoided when the uninstaller is launched from Apps & features?
The manifest of our uninstaller includes this:
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" />
</requestedPrivileges>
</security>
</trustInfo>
I tried changing the requestedExecutionLevel
, and also tried removing trustInfo
completely, but there was no change in behaviour either way.
Tested on Windows 10 version 1511 build 10586.104.
Edit: Just to clarify, the case I'm trying to handle is where the user has a Standard account and does not know the password of an Admin account. If they see a UAC prompt when they try to uninstall, they have no choice but to cancel it, and our uninstaller does not get run.