I am trying to figure out how to bundle a third party software .exe with my wpf app .msi. I created a wix installer project and have that building my .msi file correctly and now I want to bundle that with a third party exe. The only problem is that it requires a detect condition. I found the install product identifier in windows registry but I just need help building that into a condition that I can use. Here is what i have so far in my bundle.wxs file.
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal">
<Bundle Name="MyProject.Bundle" Manufacturer="Manufacturer" Version="1.0.0.0" UpgradeCode="f52749fb-8d37-4800-9913-e6ee897b50f9">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />
<Chain>
<ExePackage Id="ThirdPartySoftware" SourceFile="Drivers\ThirdPartySoftware.exe" Vital="yes" />
<MsiPackage SourceFile="MyProject.Installer\Installs\MyProject-1.0.0.0-Release-x64.msi" />
</Chain>
</Bundle>
<Fragment Id="Product_PreReqs">
<Property Id="ThirdParty" Secure="yes" Value="0">
<RegistrySearch Id="ThirdPartySearch"
Root="HKLM"
Key="SOFTWARE\ThirdParty"
Type="directory"
/>
</Property>
<Property Id="ThirdPartySub1" Secure="yes" Value="0">
<RegistrySearch Id="ThirdPartySub1Search"
Root="HKLM"
Key="SOFTWARE\ThirdParty\ThirdPartySub1"
Type="directory"
/>
</Property>
<Property Id="ThirdPartySub2" Secure="yes" Value="0">
<RegistrySearch Id="ThirdPartySub2Search"
Root="HKLM"
Key="SOFTWARE\ThirdParty\ThirdPartySub1\ThirdPartySub2"
Type="directory"
/>
</Property>
<Property Id="ThirdPartyVersion" Secure="yes" Value="0">
<!-- 3.07.0044 -->
<RegistrySearch Id="ThirdPartyVersionSearch"
Root="HKLM"
Key="SOFTWARE\ThirdParty\ThirdPartySub1\ThirdPartySub2"
Name="Version"
Type="raw"
/>
</Property>
<Property Id="ThirdPartyUninstallVersion" Secure="yes" Value="0">
<!-- 3.07.0044 -->
<RegistrySearch Id="ThirdPartyUninstallVersionSearch"
Root="HKLM"
Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{B122EBFB-4345-4AE3-90AE-99C8B9E3F02C}"
Name="DisplayVersion"
Type="raw"
/>
</Property>
</Fragment>
</Wix>
I have looked at the wix documentation on their website and searched all over Stack Overflow, Google, and YouTube. I have found results in all of these places that mention detect conditions but I havent found anything explaining how to create the condition or how to take these searches and put them into variables for the condition.