Example Programs

cancel
Showing results for 
Search instead for 
Did you mean: 

Updated WiX Installer Example for Measurement Studio Applications

 

Overview

This example is a Microsoft Visual Studio solution contains an updated version of the example that ships with Measurement Studio 2013 for Visual Studio 2012.

 

Description

The shipping example for the WiX installer includes a number of different libraries that are used in Measurement Studio 2013. This is in the file Product.wxs.

This new example provides a template for the NI Driver Merge Modules. By default, these are commented out. Please note these are just the merge modules, not the drivers. In order to use hardware, one must install the runtime version of the desired drivers or the full versions of the drivers to the target machine.

Also note if one is building an installer for a .NET 4.5 applications, one may need to install the .NET 4.5 runtime framework to the target machine. This installer for will make a file called Setup.msi. Upon running the MSI, your .NET application will be installed just like any other Windows application. As a final note, this example is only for Visual Studio 2012.

 

Requirements

  • Microsoft Visual Studio 2012 (or compatible)
  • National Instruments Measurement Studio 2013 (or compatible)
  • WiX 3.8 (or compatible)

 

Steps to Implement or Execute Code

  1. Download extract the attached file.
  2. Open All Libraries.2012.sln
  3. Select the "Product.wxs" file
  4. Enter GUID for ComponentId_ExampleApplication_Assembly, ComponentId_ExampleApplication_Shortcut, and Product_UpgradeCode for both x86 and x64 architectures.
  5. Build the Solution
  6. Depending on your build setting, the installer will be located in <Application Directory>\2012\Setup\bin\x86\Debug\Setup.msi
  7. Take the MSI to a target machine and deploy it.

 

 

 **This document has been updated to meet the current required format for the NI Code Exchange. **

Kurt P
Automated Test Software R&D
Comments
HeroOfHyrule
NI Employee

This is an amazing example. Thanks for posting this.

Rob S
Applications Engineer
National Instruments
Member NielsUll
Member

Hi!

I got the sample prgoram to install fine with all DLLs  to local directory instead of GAC. However,

there seems to be a problem with uninstalling?  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

Any suggestions?

Member NielsUll
Member

And one more thing: If I try to do a passive install:

   msiexec /i Setup.msi /passive

I end up with all the NI stuff in

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"

Member Kurt-P
Member

Hey NielsUII, could you post this to the forum? To be honest, I am not sure why we are seeing this behavior and it would be better to post to the forum to get a little more visibily on the issue at hand.

Edit: Please post the link here to the post you create so we have a reference to it.

Kurt P
Automated Test Software R&D
Member NielsUll
Member