WIX: How to determine if a third-party application is installed without using a registry search?

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 .

+4
1

1

<util:FileSearch  
Id="CheckFile"
Path="[CommonAppDataFolder]thirdpartapp\thirdparty.dll"
Variable="THIRDPARTYFILE" 
Result="version" /> 

Adobe Air

<util:FileSearch  
Id="CheckAir"
Path="[CommonFilesFolder]\Adobe AIR\Versions\1.0\Adobe AIR.dll"
Variable="ADOBEAIRFILE" 
Result="version" />

,

DetectCondition='NOT Installed AND ADOBEAIRFILE>=v2.6.0'

, :)

2:

,

<util:FileSearch  
Id="CheckFile"
Path="[CommonAppDataFolder]thirdpartapp\thirdparty.dll"
Variable="THIRDPARTYFILE" 
Result="exists" /> 

DetectCondition='THIRDPARTYFILE'

, , .. http://wixtoolset.org/documentation/manual/v3/xsd/util/filesearch.html

+4

Source: https://habr.com/ru/post/1542154/


All Articles