Windows installer just changes my installation to ALLUSERS = 1 behind me

I see a strange problem with WiX 3.8 and Windows Installer.

I created an Outlook plugin that I want end users without administrator privileges to be able to install them on their machines.

Therefore, I carefully monitored

  • Do not write to any system directory (for example, C:\program files , etc.) during installation
  • Do not write to any registry key in the system level (for example, HKEY_LOCAL_MACHINE )

and in my WiX script, I set ALLUSERS=0 , and also set all the other relevant properties that I found in 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 thought this would work, but on my test system with the usual standard user account (without administrator privileges) my installation failed - with a message dialog that says that I do not have enough rights to install this for all users ... .

WTF? I specifically wanted to install this for ** this particular * user - not all users on the machine!

Looking at MSI magazines, I see amazing things:

MSI (c) (B0: B4) [18: 08: 08: 543]: Note: 1: 2262 2: AdminProperties 3: -2147287038
MSI (c) (B0: B4) [18: 08: 08: 543]: the machine policy value "AlwaysInstallElevated" is 0 MSI (c) (B0: B4) [18: 08: 08: 543]: user policy value " AlwaysInstallElevated "equals 0 MSI (c) (B0: B4) [18: 08: 08: 543]: launch of the product" ........ "with user rights: it is not assigned.
...
MSI (c) (B0: B4) [18: 08: 08: 543]: REAL ESTATE Change : Change ALLUSERS property. Its current value is "0". Its new meaning is '1'.

* Why on earth does the Windows installer decide to simply change the ALLUSERS property to 1 ?!?!? I never said that !! Sheesh .......

Any ideas? Thoughts? Pointers?

+6
source share
2 answers

Your InstallScope (and InstallPrivileges) should be sufficient to force each user to install. so I would pull your explicit ALLUSERS = 0 and see if you get every user. You will still receive security errors if the installation tries to access restricted items, but this is a separate issue.

+1
source

According to the MSI SDK documentation for ALLUSERS, the correct way to create an installation for each user is to set ALLUSERS to "" (the second bullet is bold):

  • The value of the ALLUSERS property of 1 determines the installation context for each machine.
  • The value of the ALLUSERS property of the empty string ("") determines the installation context for each user.
  • If the ALLUSERS property is set to 2, the Windows installer always resets the ALLUSERS property to 1 and installs on each computer or resets the ALLUSERS property to an empty string ("") and performs the installation for each user. A value of ALLUSERS = 2 allows the system to reset to ALLUSERS and the installation context, depending on user privileges and the version of Windows.

The value "0" is undefined, so you get all the undefined behavior that the Windows installer chooses (select one of the following): week / month / year / operating system / service pack.

For more details behind this answer, see this blog post .

+11
source

Source: https://habr.com/ru/post/976577/


All Articles