I'm seeing a strange issue with WiX 3.8 and Windows Installer.
I have created an Outlook plugin that I want end-users without admin permissions to be able to install on their machines.
Therefore, I carefully made sure
C:\program files
etc.) during installHKEY_LOCAL_MACHINE
) and in my WiX script, I made sure to set ALLUSERS=0
and also set all other relevant properties I found to perUser
or limited
:
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension">
<Product Id="*" Name="MyAddin" Language="1033" Version="1.0.0"
Manufacturer="Me" UpgradeCode="-some-guid-" Codepage="1252">
<Package InstallerVersion="200" Compressed="yes"
InstallScope="perUser"
Description="yada yada" Manufacturer="Me" Languages="1033" SummaryCodepage="1252"
InstallPrivileges="limited"
Comments="yada yada" />
<Property Id="ALLUSERS" Value="0"/>
I had imagined that would work - but on my test system, with a normal standard user account (no admin privileges), my install fails miserably - with a message dialog telling me I have insufficient privileges to install this for all users....
WTF? I specifically wanted to install this for **just this* user - not all users on the machine!
Looking at the MSI logs, I see astonishing things:
MSI (c) (B0:B4) [18:08:08:543]: Note: 1: 2262 2: AdminProperties 3: -2147287038
MSI (c) (B0:B4) [18:08:08:543]: Machine policy value 'AlwaysInstallElevated' is 0
MSI (c) (B0:B4) [18:08:08:543]: User policy value 'AlwaysInstallElevated' is 0
MSI (c) (B0:B4) [18:08:08:543]: Running product '........' with user privileges: It's not assigned.
...
MSI (c) (B0:B4) [18:08:08:543]: PROPERTY CHANGE: Modifying ALLUSERS property. Its current value is '0'. Its new value: '1'.
*Why on earth is the Windows Installer deciding to just change the ALLUSERS
property to 1
?!?!? I never told it to!! Sheesh.......
Any ideas? Thoughts? Pointers?
According to the MSI SDK documentation for ALLUSERS the correct way to create a per-user installation is to set ALLUSERS to "" (second bullet bolded below):
The value "0" is undefined so you get whatever undefined behavior the Windows Installer picks this (pick one of the following): week/month/year/operating system/service pack.
For more "behind the story" details behind this answer see this blog entry.
Your InstallScope (and InstallPrivileges) should be enough to force a per user install. so I'd take out your explicit ALLUSERS=0 and see if you get a per user install. You'll still get security errors if the install tries to access restricted items, but that's a separate issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With