Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with wix merge modules when not copying to GAC

Hi!

 

I'm having two problems when using the provided merge modules to create a wix installer which installs the DLLs to the application directory. I can reproduce them for the sample "Updated WiX Installer Example for Measurement Studio Applications" at https://decibel.ni.com/content/docs/DOC-36168

 

I'm using Wix 3.8 and Visual Studio 2012.

I have modified the sample as per the instructions, uncommenting all the

<ConfigurationData Name="Config_.../> lines, and I have set my own GUIDs in program.wxs.

 

The first issue is that passive installs doesn't seem to work. If I run

 

   msiexec /i Setup.msi /passive

 

 

I end up with all the NI dlls, config files and policy files in a subdir of the install folder: 

 

 

C:\Program Files (x86)\Example Company Name\Example Application\Module Retargetable Folder

 

 

It works fine if I don't add /passive? It also seems to work if I explicitly set the installdir on the command line:

 

msiexec /i Setup.msi /passive INSTALLDIR="C:\Program Files (x86)\Example Company Name\Example Application"

 

The second issue is that uninstalling doesn't remove the NI dlls.  After uninstalling, there are 22 National Instrument files left in the install directory (C:\Program Files (x86)\Example Company Name\Example Application):

NationalInstruments.Common.config

NationalInstruments.Common.dll

NationalInstruments.Common.Native.config

NationalInstruments.Common.Native.dll

NationalInstruments.MStudioCLM.config

NationalInstruments.MStudioCLM.dll

NationalInstruments.NiLmClientDLL.config

NationalInstruments.NiLmClientDLL.dll

policy.12.0.NationalInstruments.Common.dll

policy.12.0.NationalInstruments.Common.Native.dll

policy.12.0.NationalInstruments.MStudioCLM.dll

policy.12.0.NationalInstruments.NiLmClientDLL.dll

policy.13.0.NationalInstruments.Common.dll

policy.13.0.NationalInstruments.Common.Native.dll

policy.13.0.NationalInstruments.MStudioCLM.dll

policy.13.0.NationalInstruments.NiLmClientDLL.dll

policy.9.0.NationalInstruments.Common.dll

policy.9.0.NationalInstruments.Common.Native.dll

policy.9.0.NationalInstruments.NiLmClientDLL.dll

policy.9.1.NationalInstruments.Common.dll

policy.9.1.NationalInstruments.Common.Native.dll

policy.9.1.NationalInstruments.NiLmClientDLL.dll

 

 

0 Kudos
Message 1 of 6
(6,717 Views)

Hello Niels,

 

I am very interested in having a deeper look at the example:

 

Concerning the "passive" issue I have the following question/note:

- Do you see the same behavior when you do a "quiet" install instead of a passive one?

- For some reason this makes me think about a bug in Visual Studio (old version) that I also personally experienced some time ago, but I do not think it is directly linked.

  I did a quick google search and  this is what I could directly find back about that bug. (http://community.flexerasoftware.com/archive/index.php?t-154037.html)

  Do note that I am not sure that it is linked to the issue. To be able to give some more feedback I would require the modified example that you are using.

 

Concerning the uninstall process:

- Can you share the modified version of the community example you are using? (to be able to reproduce exactly the same issue)

- The most common reason I know off that might cause files to not uninstall is that the linked GUIDs are causing "issues".
  Changing the GUIDs of the files/components that are not uninstalling might do the trick in that case.
  However, to have some certainty about this I should be able to have a look at your code (and test it)

 

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
Message 2 of 6
(6,675 Views)

Hi!

 

It works the same way for passive and quiet modes. I have attached my project.

 

I mistyped when I said I was using VS 2012 - it is actually 2013. I don't know if that would make a difference?

 

Inside the WiX Hardware Example\2012\Setup\bin\x86\Debug\en-us folder in teh zip file, you will find install logs for the various stuff have tried, aling with an action.txt file describing what I did and the results.

 

Regards, Niels

 

0 Kudos
Message 3 of 6
(6,663 Views)

Hello Niels,

 

I have currently only had the time to test the issue with the remaining DLLs after uninstall.

 

Can you confirm that you only see the issue (remaining DLLs and .Config files) with the Measurement Studio Common Merge Modules ("MStudioCommon45_MergeModules")?

 

In the example in attachment I have let those components copy to the GAC and let the other Merge Modules copy "locally".

Can you confirm that with this example the uninstall does work properly?

 

I am not proposing this as a solution, but I just would like to know if you see the same behavior in VS 2013 (I only have 2008,2010 and 2012 available at my side)

 

Thanks for your efforts!

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 4 of 6
(6,648 Views)

Hi NielsUll,

 

The behavior you are seeing where the MStudioCommon assemblies are left behind on the system is by design. You can verify this in the merge module for MStudioCommon.version.msm, which is located, by default, in C:\Program Files (x86)\Common Files\Merge Modules. If you open the Component table in the merge module, you will find the components whose config elements you uncommented in the WiX project. You will notice that the components each have a value set in the Attributes column, which is 16 or 0x0010 depending on how you have the value represented. This attribute means the components are set as msidbComponentAttributesPermanent. This attribute value (16) tells Windows that the component should not be removed during uninstall. 

 

To change the uninstall behavior, you may modify the merge module component table, specifically the values in the Attributes column for these components, and set them to msidbComponentAttributesLocalOnly ( or 0x0000 ).

 

I do not have an answer for the behavior you are seeing when passing the /passive argument to msiexec. I will post back here when I have more information on that.

 

Thanks,

 

Daniel Dorroh
National Instruments
Message 5 of 6
(6,634 Views)

Hi!

 

Thanks for the suggestion ThiCop - but given the explanation from D-Cubed, I now understand the uninstall issue, and will not investigate this part further.

 

Depending on the outcome of the /passive install issue, me will decide whether to use a pathed merge module or skip on using the mereg module all together and just have our installer copy the necessary DLL's to our install dir.

Regards

Niels

 

0 Kudos
Message 6 of 6
(6,614 Views)