I created a "perMachine" installer with the wix toolset. The installer has to be started with admin rights, because it writes multiple registry keys to HKLM and HKCR.
I'd like to change the installer to a "perUser" installation. Is it possible to do this and still write to HKLM and HKCR? The registry entries have to be there to register a shell icon overlay handler...
Greets
EDIT: There does not seem to be a way to write to HKLM as non-admin user. But is there a way to get wix installer to promt for admin pw? If so, I could live with the following solution:
- user knows admin pw (or admin provides pw): the icon overlay component is installed
- user does not provide admin pw: the icon overlay component is skipped.
So my questions are: 1. How to promt the user for the admin pw? 2. How to skip/install a component based on the users action?
EDIT2: I have tried multiple combinations of:
InstallPrivileges="elevated" InstallScope="perUser"
Property "ALLUSERS" set to empty string
Property "MSIUSEREALADMINDETECTION" set to 1
Property "MSIINSTALLPERUSER" set to 1
Condition for said component: "Privileged / AdminUser"
Nothing has worked so far. It all comes down to the Condition not beeing read correctly. I have tried on several PCs with an admin user. In order to get the product to install with ALL features, I have to start the installer explicitly as administrator over the context menu. Otherwise the icon overlay handler won't get installed.