Scope PerUser and admin prompt

Dec 20, 2016 at 12:15 PM
can i set install scope to "perUser" and at the same time before starting instalation get UAC prompt dialog? I use bootstrapper project (EXE with 2 installations (.net and my application)). If i set perMachine i get UAC prompt dialog but software is installed to all users. I need to setup for current logged user but with UAC dialog for confirm admin privileges.

Dec 22, 2016 at 1:57 AM
This is rather a WiX challenge not a Wix#. perMachine is the setting that triggers the UAC prompt. As far as I know MSI doesn't consider scenario when per-user install requires elevation.

Of course you can either build with Wix# your custom bootstrapper app (BA) that requires elevation while keeping per-user install model. This will achieve the desired behavior. You can also check in the first install as a Launch condition or in a OnLoad event if the user is an admin and fail the install with an instruction to restart the install as an admin.

However quite possible there is a work around within MSI/WiX that I am just not aware of. You can post this very same question to the Wix# GitHub board where currently Wix# is hosted. GitHub may have a wider WiX audience so there is a chance that someone will offer a hint.