Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

WiX Setup fails after upgrade to NIDAQ1760f2

Hi,

after an upgrade from NI DAQ mx (to version 17.6f2) my WiX msi setup fails to install.

I always get error code 2765 when I start the msi.

The problem seems to be the MStudioCommon.2012_x64.msm merge module (if I delete this module setup is fine)

Any ideas how to fix this?

 

Here my .wxs for the NI modules:

 

<?xml version="1.0" encoding="UTF-8"?>

<?define MergeModulesDir = "$(env.CommonProgramFiles)\Merge Modules" ?>
<?define RetargetableDir = "[INSTALLDIR]" ?>
  
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
	<Fragment>

    <DirectoryRef Id="INSTALLDIR" DiskId="1">
      <?if $(var.Platform) = "x86"?>
      <Merge Id="MStudioCommon.2012.msm" Language="0" SourceFile="$(var.MergeModulesDir)\MStudioCommon.2012.msm"/>
      <Merge Id="MStudioEnterpriseAnalysis.2012.msm" Language="0" SourceFile="$(var.MergeModulesDir)\MStudioEnterpriseAnalysis.2012.msm"/>
      <Merge Id="MStudioDAQmx.2013.msm" Language="0" SourceFile="$(var.MergeModulesDir)\MStudioDAQmx.2013.msm">
        <ConfigurationData Name="ReconfiguredDir.1C6086E6_C978_44A8_BF54_50ED5B46EE79" Value="[INSTALLDIR]"/>
      </Merge>
      <Merge Id="MStudioUIDesign.2012.msm" Language="0" SourceFile="$(var.MergeModulesDir)\MStudioUIDesign.2012.msm"/>
      <Merge Id="MStudioUI.2012.msm" Language="0" SourceFile="$(var.MergeModulesDir)\MStudioUI.2012.msm"/>
      <Merge Id="NIMesaDLL.msm" Language="0" SourceFile="$(var.MergeModulesDir)\NIMesaDLL.msm"/>
      <Merge Id="niMetaUtils.msm" Language="0" SourceFile="$(var.MergeModulesDir)\niMetaUtils.msm"/>
      <Merge Id="MStudioUIWinForms.2012.msm" Language="0" SourceFile="$(var.MergeModulesDir)\MStudioUIWinForms.2012.msm"/>
      <Merge Id="mkl" Language="0" SourceFile="$(var.MergeModulesDir)\mkl.msm"/>
      <Merge Id="nianlys" Language="0" SourceFile="$(var.MergeModulesDir)\nianlys.msm"/>
      <Merge Id="niMetaUtils" Language="0" SourceFile="$(var.MergeModulesDir)\niMetaUtils.msm"/>
      <Merge Id="Microsoft_VC100_CRT_x86" Language="0" SourceFile="$(var.MergeModulesDir)\Microsoft_VC100_CRT_x86.msm"/>
      <Merge Id="Microsoft_VC100_ATL_x86" Language="0" SourceFile="$(var.MergeModulesDir)\Microsoft_VC100_ATL_x86.msm"/>
      <Merge Id="Microsoft_VC90_CRT_x86" Language="0" SourceFile="$(var.MergeModulesDir)\Microsoft_VC90_CRT_x86.msm"/>
      <Merge Id="Microsoft_VC90_MFC_x86" Language="0" SourceFile="$(var.MergeModulesDir)\Microsoft_VC90_MFC_x86.msm"/>
      <Merge Id="policy_9_0_Microsoft_VC90_CRT_x86" Language="0" SourceFile="$(var.MergeModulesDir)\policy_9_0_Microsoft_VC90_CRT_x86.msm"/>
      <Merge Id="policy_9_0_Microsoft_VC90_MFC_x86" Language="0" SourceFile="$(var.MergeModulesDir)\policy_9_0_Microsoft_VC90_MFC_x86.msm"/>
      <?endif?>
      
      <?if $(var.Platform) = "x64"?>
      <Merge Id="MStudioCommon.2012_x64.msm" Language="0" SourceFile="$(var.MergeModulesDir)\MStudioCommon.2012_x64.msm"/>
      <Merge Id="MStudioEnterpriseAnalysis.2012_x64.msm" Language="0" SourceFile="$(var.MergeModulesDir)\MStudioEnterpriseAnalysis.2012_x64.msm"/>
      <Merge Id="MStudioUIDesign.2012_x64.msm" Language="0" SourceFile="$(var.MergeModulesDir)\MStudioUIDesign.2012_x64.msm"/>
      <Merge Id="MStudioUI.2012_x64.msm" Language="0" SourceFile="$(var.MergeModulesDir)\MStudioUI.2012_x64.msm"/>
      <Merge Id="NIMesaDLL.msm" Language="0" SourceFile="$(var.MergeModulesDir)\NIMesaDLL.msm"/>
      <Merge Id="niMetaUtils.msm" Language="0" SourceFile="$(var.MergeModulesDir)\niMetaUtils.msm"/>
      <Merge Id="MStudioUIWinForms.2012_x64.msm" Language="0" SourceFile="$(var.MergeModulesDir)\MStudioUIWinForms.2012_x64.msm"/>
      <Merge Id="mkl64" Language="0" SourceFile="$(var.MergeModulesDir)\mkl64.msm"/>
      <Merge Id="nianlys_x64" Language="0" SourceFile="$(var.MergeModulesDir)\nianlys_x64.msm"/>
      <Merge Id="MStudioDAQmx.2013_x64.msm" Language="0" SourceFile="$(var.MergeModulesDir)\MStudioDAQmx.2013_x64.msm">
        <ConfigurationData Name="ReconfiguredDir.39EA4820_BBEB_48AD_B8AA_89A933155601" Value="[INSTALLDIR]"/>
      </Merge>
      <Merge Id="Microsoft_VC100_CRT_x64" Language="0" SourceFile="$(var.MergeModulesDir)\Microsoft_VC100_CRT_x64.msm"/>
      <Merge Id="Microsoft_VC100_ATL_x64" Language="0" SourceFile="$(var.MergeModulesDir)\Microsoft_VC100_ATL_x64.msm"/>
      <Merge Id="Microsoft_VC90_CRT_x86_x64" Language="0" SourceFile="$(var.MergeModulesDir)\Microsoft_VC90_CRT_x86_x64.msm"/>
      <Merge Id="Microsoft_VC90_MFC_x86_x64" Language="0" SourceFile="$(var.MergeModulesDir)\Microsoft_VC90_MFC_x86_x64.msm"/>
      <Merge Id="policy_9_0_Microsoft_VC90_CRT_x86_x64" Language="0" SourceFile="$(var.MergeModulesDir)\policy_9_0_Microsoft_VC90_CRT_x86_x64.msm"/>
      <Merge Id="policy_9_0_Microsoft_VC90_MFC_x86_x64" Language="0" SourceFile="$(var.MergeModulesDir)\policy_9_0_Microsoft_VC90_MFC_x86_x64.msm"/>
      <?endif?>
    </DirectoryRef>

    <FeatureGroup Id="MS2015">
      <?if $(var.Platform) = "x86"?>
      <MergeRef Id="niMetaUtils" />
      <MergeRef Id="MStudioCommon.2012.msm"/>
      <MergeRef Id="MStudioEnterpriseAnalysis.2012.msm"/>
      <MergeRef Id="MStudioDAQmx.2013.msm"/>
      <MergeRef Id="MStudioUIDesign.2012.msm"/>
      <MergeRef Id="MStudioUI.2012.msm"/>
      <MergeRef Id="NIMesaDLL.msm"/>
      <MergeRef Id="niMetaUtils.msm"/>
      <MergeRef Id="MStudioUIWinForms.2012.msm"/>
      <MergeRef Id="mkl" />
      <MergeRef Id="nianlys" />
      <MergeRef Id="Microsoft_VC100_CRT_x86" />
      <MergeRef Id="Microsoft_VC100_ATL_x86" />
      <MergeRef Id="Microsoft_VC90_CRT_x86" />
      <MergeRef Id="Microsoft_VC90_MFC_x86" />
      <MergeRef Id="policy_9_0_Microsoft_VC90_CRT_x86" />
      <MergeRef Id="policy_9_0_Microsoft_VC90_MFC_x86" />
      <?elseif $(var.Platform) = "x64"?>
      <MergeRef Id="MStudioCommon.2012_x64.msm"/>
      <MergeRef Id="MStudioEnterpriseAnalysis.2012_x64.msm"/>
      <MergeRef Id="MStudioUIDesign.2012_x64.msm"/>
      <MergeRef Id="MStudioUI.2012_x64.msm"/>
      <MergeRef Id="NIMesaDLL.msm"/>
      <MergeRef Id="niMetaUtils.msm"/>
      <MergeRef Id="MStudioUIWinForms.2012_x64.msm"/>
      <MergeRef Id="mkl64" />
      <MergeRef Id="nianlys_x64" />
      <MergeRef Id="MStudioDAQmx.2013_x64.msm"/>
      <MergeRef Id="Microsoft_VC100_CRT_x64" />
      <MergeRef Id="Microsoft_VC100_ATL_x64" />
      <MergeRef Id="Microsoft_VC90_CRT_x86_x64" />
      <MergeRef Id="Microsoft_VC90_MFC_x86_x64" />
      <MergeRef Id="policy_9_0_Microsoft_VC90_CRT_x86_x64" />
      <MergeRef Id="policy_9_0_Microsoft_VC90_MFC_x86_x64" />
      <?endif?>
    </FeatureGroup>
    
	</Fragment>
</Wix>

Kind regards,

Stephan

 

0 Kudos
Message 1 of 7
(3,520 Views)

Has there been any response from National Instruments on this?  We are seeing the same error, and it only occurs if we use the version of the common merge module (MStudioCommon.2012.msm) that came with DAQmx 17.6.

 

Thanks.

0 Kudos
Message 2 of 7
(3,403 Views)

Hi, I have the same error..

0 Kudos
Message 3 of 7
(3,359 Views)

In case this helps anyone else, here's the workaround that we found:

 

The 17.6/2015 common merge module is badly built. When running an installer created with this version, you get Error 2765 (it's reported by the WiX-built installer but seems universal to MSIs. The problem is that this version of the merge module lists a number of assemblies in the MSIAssembly table that aren't listed in the MSIAssemblyName Table.

 

The only solution appears to be to edit the merge modules (MStudioCommon.2012.msm and MStudioCommon.2012_x64.msm merge modules for us, in C:\Program Files (x86)\Common Files\Merge Modules) with Orca or similar.  In the MsiAssembly table, drop all the rows that don't have an entry in the MsiAssemblyName table (that's going to be everything but Retgrtable_Assembly_Common.XXXXX, Retgrtable_Assembly_MStudioCLM.XXXXX, Retgrtable_Assembly_NiLmClientDll.XXXXX).

 

All the policy assemblies we are dropping still end up copied over by the installer, and our software still works fine in our environments, for whatever that's worth.  But obviously your mileage may vary.

 

Hope this helps the next person to find this thread.

0 Kudos
Message 4 of 7
(3,351 Views)

Hi, I removed everything but the three rows you mentioned. Here is the result:

 

Untitled.png

 

Did I understood correctly? Now the Setup project fails in a build time:

 

Attempted to extract cab 'C:\Users\Ilkka\AppData\Local\Temp\ri1sau4q\109135.module.cab' from merge module 'C:\Program Files (x86)\Common Files\Merge Modules\MStudioCommon.2012_x64.msm' to directory 'C:\Users\Ilkka\AppData\Local\Temp\ri1sau4q\MergeId.109135'. The cab file was not found. This usually means that you have a merge module without a cabinet inside it. 

Before the build was OK but the error came when trying to install the packet.

 

BR,

Ilkka

0 Kudos
Message 5 of 7
(3,342 Views)

Ilka,

 

Your MsiAssembly table looks just like mine now, and we certainly haven't seen that issue.  I've done  this on a grand total of three PCs, so my experience is pretty limited.

 

The only other thought I can offer is that we did make a second (I thought unrelated?) change to the merge module -- we also turned off the flag that tells the system to leave the files behind on an uninstall (because we are putting all the files in the retargetable directory and not the GAC), which means setting all the Component attributes to 0/256 in the x86/x64 msm.  I suppose it's possible that we just got lucky and you need to do both to make the MsiAssemblyName table trick work.  For what's it's worth, I found the MsiAssdembly/MsiAssemblyName explanation on a forum unrelated to NI, so I thought it was a more generic solution.

 

Just in case it's useful to you, I've attached the two modified merge modules so you can inspect the changes I made.  We're on Visual Studio 2017 Community and the latest (as of about a week ago) version of WiX.

Download All
Message 6 of 7
(3,332 Views)

Thank you very much! 🙂 Your merge modules worked without any problems. I tested the both 32 and 64 bit versions.

 

Have a nice day.. Sunday maybe there 🙂
Ilkka

 

0 Kudos
Message 7 of 7
(3,328 Views)