I try to create a MSI Single Package using WIX (3.10). The user can select in the UI whether the package should install Per-User or Per-Machine. The package is initialized with ALLUSERS=2
and MSIINSTALLPERUSER=1
. I did not set an InstallScope
, as this would limit the Package to one or the other.
If the user selects Per-Machine the setup continues with ALLUSERS=2
and MSIINSTALLPERUSER=""
. - Everything works as expected.
If the user chooses Per-User installation ALLUSERS=2
and MSIINSTALLPERUSER=1
remain unchanged. If a non-privileged user runs the setup everything works as expected as well.
But if a privileged user executes the setup and chooses Per-User installation, registry keys that should be written to HKCU\Software\Classes\
are still written to HKCR
/ HKLM\Software\Classes\
. This happens without UAC being invoked.
I observed this behavior on a Windows 8.1 (current patch level).
This is not what I want. If the user selects Per-User installation, there should be nothing written to HKLM/HKCR.
Here is sample from the wxs-file:
<Component Id="MyRegistryComponent" Guid="{99999999-9999-9999-9999-999999999999}">
<RegistryValue Id="MyRegistryComponent_MainKey" Root="HKCU" Key="Software\Classes\myapp.myclass" Value="myapp.myclass.foo" Type="string" />
</Component>
I checked the MSI with Orca. This RegistryValue
has Root=1 in the Registry table of the MSI.
I tried/checked already:
- I verified that the
ALLUSERS
andMSIINSTALLPERUSER
properties are indeed set as stated above. - I tried setting
ALLUSERS=""
MSIINSTALLPERUSER=1
– No effect. - I changed
Root="HKCU"
toRoot="HKMU"
in the wxs. This results in Root=-1 in the MSI, but I does not change the final result after installation.
What am I missing here? Is possible that this behavior is caused by previous incomplete (un-)installations?