1

I created an Installer using WiX to install a VSIX along with two dependent components. These two components were available to me in the form of Merge Modules. Below is the code where I used the merge modules in my code:

<DirectoryRef Id="TARGETDIR">
  <Merge Id="MergeModuleID1" SourceFile="MergeModule1.msm" DiskId="1"  Language="0"/>
  <Merge Id="MergeModuleID2" SourceFile="MergeModule2.msm" DiskId="1" Language="0" />
</DirectoryRef>

and I've referred these merge modules as:

<Feature Id="ProductFeature" Title="Title" Level="1">
  <ComponentRef Id="VSPackage"/>
  <ComponentRef Id="ApplicationShortcut"/>
  <ComponentRef Id="DesktopShortcut"/>
  <ComponentRef Id="LicenseComp"/>
  <MergeRef Id="MergeModuleID1"/>
  <MergeRef Id="MergeModuleID2"/>
</Feature>

The problem I'm facing is, that my VSIX is installed to all the user accounts on the machine, but these merge modules are not, they're installed only on the user account where the product is installed. On other user accounts, an installation dialog appears, which I believe is installing these merge modules, after which everything works fine. How do I make these merge modules to be installed to all users?

P.S: ALLUSERS property in both the MSI and merge modules are set to '1'.

Nithin Kamble
  • 45
  • 1
  • 5

2 Answers2

2

You may need to clarify that question somewhat. Merge modules are not installed, just the files, so you mean the files in merge modules are going somewhere incorrect, yes? Also, files are not installed on a user account they got to a location on disk.

Guessing my way through this, you're probably saying that the files get installed to somewhere like the User's Application Data location for the installing user. If that's what the merge modules specify in their internals, that's normal. You can obviously install files to the current user's application data folder even if you're doing a per machine install. I can't say if those merge modules are correctly designed or not, but if they are then:

  1. The initial install will put those files in the installing users file location.
  2. If another logs on and uses a shortcut and your MSI is correctly designed, the install-on-demand feature will install those files for that user in that user's folder, maybe asking for the original install media. That's the way this is designed to work because: a) There is no mechanism that that allows a file to be installed simultaneously to all user file locations on the system, and it makes no sense anyway if they never use the app. b) What happens if you create a new user account AFTER the product has been installed? The file will not be in that user's location, however the install on demand scheme guarantees that this new user will get the file in their location if they log on and use the app.

The short answer is that this is probably all working as intended.

PhilDW
  • 20,260
  • 1
  • 18
  • 28
1

Setting ALLUSERS is fine.

What you've described looks like "advertising".

To remove advertising for the Merge Modules, add AllowAdvertise="no" to the Attributes of the Feature containing the MergeRef element :

<Feature Id="ProductFeature" Title="Title" AllowAdvertise="no" Level="1">
  <ComponentRef Id="VSPackage"/>
  <ComponentRef Id="ApplicationShortcut"/>
  <ComponentRef Id="DesktopShortcut"/>
  <ComponentRef Id="LicenseComp"/>
  <MergeRef Id="MergeModuleID1"/>
  <MergeRef Id="MergeModuleID2"/>
</Feature>
JM Lauer
  • 192
  • 1
  • 11