I am trying to create an installer using WiX. My problem is that I should install third-party software only if it is not already installed or if its version is older than the current version included. See my example below. It would also be great if you would offer me some suggestions for this third-party software. How to prevent its removal if it is used by another program or just keep it constant?
I prefer not to use a registry search. This software that I am trying to add is the Dokan driver.
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<Bundle Name="MyApp" Version="1.2.0.0" Manufacturer="Me"
UpgradeCode="{GUID}" IconSourceFile="..\icon.ico">
<BootstrapperApplicationRef
Id="WixStandardBootstrapperApplication.RtfLicense" >
<bal:WixStandardBootstrapperApplication
LogoFile="..\lo64.png" LicenseFile="License.rtf"/>
</BootstrapperApplicationRef>
<Chain>
<PackageGroupRef Id="NetFx45Web"/>
<ExePackage
SourceFile="..\ThirdPartySoftware_0.6.0.exe"
Permanent="yes"
InstallCondition="NOT Installed"/>
<MsiPackage SourceFile="..\MyApp.msi"/>
</Chain>
</Bundle>
</Wix>
With this edit, I now have an installer that checks if Dokan is installed and if it is not installed.
, , NULL.
<util:FileSearch
Id="CheckDokan"
Path="[ProgramFilesFolder]Dokan\DokanLibrary\dokanctl.exe"
Variable="Dokan"
Result="exists"/>
<Chain>
<PackageGroupRef Id="NetFx45Web"/>
<ExePackage
SourceFile="Dokan.exe"
Permanent="yes"
InstallCommand="/q"
DetectCondition='Dokan'/>
<MsiPackage SourceFile="MyApp.msi"/>
</Chain>
, @Yawar .