Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am new to wix. I want to check whether a directory exist in bundle.wxs Is it possible?

The directory could be to anywhere
Posted
Updated 26-Dec-13 7:07am
v2
Comments
Sergey Alexandrovich Kryukov 26-Dec-13 0:46am    
What do you want to do if it exist and what if it doesn't?
—SA
tasinsahin 26-Dec-13 9:59am    
By the way, I dont want to use registry. Please dont suggest Smile | :)
The job is to create excel file in a custom action. If it fails to create, that means I need to launch my acccessdtabaseengine.exe . I try to look in that excel file from bootstrapper. Could I do that?
Or if you can suggest any other way to accomplish this.

1 solution

Here is an example of how you might accomplish this.

XML
<chain>
  .
  <packagegroupref id="AccessDB" />
  .
</chain>

<fragment>
  <util:filesearch id="AccessDBInstalled" xmlns:util="#unknown">
                   Variable="AccessDBInstalled"
                   Path="directory\path\to\check"
                   Result="exists" />
  <packagegroup id="AccessDB">
    <exepackage id="AccessDB">
                DisplayName="Microsoft Access"
                Compressed="yes"
                Cache="no"
                PerMachine="yes"
                Permanent="yes"
                Protocol="none"
                Vital="yes"
                SourceFile="path\to\accessdatabaseengine.exe"
                InstallCommand="/quiet /norestart"
                DetectCondition="AccessDBInstalled"
                InstallCondition="(VersionNT >= v5.1 OR VersionNT64 >= v6.0) AND (NOT AccessDBInstalled)" />
  </exepackage></packagegroup>
</util:filesearch></fragment>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900