Wix Bootstrapper - difficulty detecting if software is already installed c++ redistributable, sql server ce 3.5 sp2

Posted by gdeck on Stack Overflow See other posts from Stack Overflow or by gdeck
Published on 2014-05-29T22:14:44Z Indexed on 2014/06/01 3:26 UTC
Read the original article Hit count: 302

Filed under:
|
|
|

I apologize if this is answered elsewhere. So far (thanks to a post from Rob Mensching), my code will detect .NET 4.0 if it's installed and it'll pass right over it. I'm not able to correctly detect Microsoft Visual C++ 2010 x86 Redistributable OR Microsoft SQL Server Compact 3.5 Service Pack 2.

My code is below. I'm learning, so I would appreciate as much constructive criticism as possible.

<!--Search for .NET 4.0-->
<util:RegistrySearch Id="NETFRAMEWORK40"
                     Root="HKLM"
                     Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full"
                     Value="Install"
                     Variable="NETFRAMEWORK40"
                     Result="value"/>
<!--Search for Microsoft Visual C++ 2010 x86 Redistributable-->
<util:RegistrySearch Id="SearchForCPP2010X86"
                     Root="HKLM"
                     Key="SOFTWARE\Microsoft\VisualStudio\10.0\VC\VCRedist\x86"
                     Value="Install"
                     Variable="CPP2010Redist"
                     Result="exists"/>
<!--Search for Microsoft SQL Server Compact 3.5 Service Pack 2-->
<util:RegistrySearch Id="SearchForSQLSvrCE35SP2"
                     Root="HKLM"
                     Key="SOFTWARE\Microsoft\Microsoft SQL Server Compact Edition\v3.5\ENU"
                     Value="Install"
                     Variable="SQLSvrCE35SP2"
                     Result="exists"/>

<Chain>
  <!-- Install .Net 4 Full -->
  <PackageGroupRef Id="Net4Full"/>
  <!-- Install Microsoft Visual C++ 2010 x86 Redistributable -->
  <PackageGroupRef Id="MSVisCPP2010x86Redist"/>
  <!-- Install Microsoft SQL Server Compact 3.5 Service Pack 2 -->
  <PackageGroupRef Id="SQLExpressCE"/>      
</Chain>


<!--Install .NET 4.0-->
<PackageGroup Id="Net4Full">
  <ExePackage Id="Net4Full"
              Name="Microsoft .NET Framework 4.0 Setup"
              Cache="no"
              Compressed="yes"
              PerMachine="yes"
              Permanent="yes"
              Vital="yes"
              SourceFile="BootstrapperLibrary\dotNetFx40_Full_setup.exe"
              DetectCondition="NETFRAMEWORK40"/>
</PackageGroup>

<!--Install Microsoft Visual C++ 2010 x86 Redistributable-->
<PackageGroup Id="MSVisCPP2010x86Redist">
  <ExePackage Id="MSVisCPP2010x86Redis"
              Name="Microsoft Visual C++ 2010 x86 Redistributable "
              Cache="no"
              Compressed="yes"
              PerMachine="yes"
              Permanent="yes"
              Vital="yes"
              SourceFile="BootstrapperLibrary\vcredist_x86.exe"
              DetectCondition="CPP2010Redist"/>
</PackageGroup>

<!--Install Microsoft SQL Server Compact 3.5 Service Pack 2-->
<PackageGroup Id="SQLExpressCE">
  <ExePackage Id="SQLExpressCE"
              Name="Microsoft SQL Server Compact 3.5 Service Pack 2 Setup"
              Cache="no"
              Compressed="yes"
              PerMachine="yes"
              Permanent="yes"
              Vital="yes"
              SourceFile="BootstrapperLibrary\SSCERuntime-ENU.exe"/>
</PackageGroup>

© Stack Overflow or respective owner

Related posts about c++

Related posts about wix