I'm puzzled why my installer pops up a UAC box asking for Admin permissions when the user chooses to install in a location which they already have full write access.
My Installation Type is set to "Per machine if user is administrator, per-user otherwise"
My app's manifest has this: "<requestedExecutionLevel level="asInvoker" uiAccess="false" />"
Can you give me any clues why the installer is asking for admin permissions?
Yeah, I'd already searched and found that thread, it doesn't answer my question. I already have the Installation Type set to "Per machine if user is administrator, per-user otherwise", yet if I log in as a non-admin user, run the installer and point it at a location the user has full permissions to, it pops up a UAC prompt asking for an admin to log in.
Maybe that thread is not complete, what it should have also mentioned is that on every OS starting with Vista onward a package set to "install per-machine if user admin, or per user-use otherwise" will
try to install per-machine if the possibility to elevate is available. Since you have UAC enabled the OS sees there is a way to install per-machine so it tries to elevate the installation.
The only way to force the installer to avoid the elevation is to either create a "per-user only" package or to add our predefined dialog "InstallTypeDlg', where the user
can choose to install per-user or per-machine, this way the installer will automatically inform the OS that the package should be installer per-user, skipping elevation.
Ah, I see, thanks. In that case I think the setting is a bit misleading, since it's not actually the case that it's 'Per machine if user is administrator, per-user otherwise', it's always 'Per machine' on Vista+, which is increasingly most people.
FOLLOW US
Get the latest news in Application Packaging