Hello,
I have a situation where I need to run a Custom Action only when a certain condition is false. I've attacked the first part of this by setting a public property if a certain file exists... <Property Id="DATABASE_EXISTS" Value="1"> <DirectorySearch Id="CheckDatabaseExists" Path="[STORAGE_LOCATION_LOCAL_FOLDER]" Depth="0"> <FileSearch Id="CheckDatabaseFile" Name="Database.gdb"/> </DirectorySearch> </Property> The custom action in question runs an external executable with a command line switch, and works fine at the moment. The custom action is defined... <Fragment> <CustomAction Id="CreateNewDataBase" FileKey="ComposerWin32.exe" ExeCommand="-i [INSTANCE_NAME] -createdatabase" Execute="commit"/> </Fragment> And the entry in the <InstallExecuteSequence> tag is... <Custom Action="CreateNewDataBase" Before="InstallFinalize" >$ComposerWin32.exe>2</Custom> The inner text was supplied by a colleague and apparently is to ensure that the custom action does not occur during uninstall. I haven't found any documentation on this. Indeed the only mention I have on the inner text of a custom action is in the Wix.chm help file which suggests that the inner text is only used for script... "The text node is only valid if the Script attribute is specified. In that case, the text node contains the script to embed." Assuming that the Wix help is out of date and that the inner text can be used for specifying conditions, how can I extend the condition to take account of my DATABASE_EXISTS property? I have tried... <Custom Action="CreateNewDataBase" Before="InstallFinalize" >![CDATA[($ComposerWin32.exe>2) AND (NOT DATABASE_EXISTS)]]</Custom> but this produces a 2717 error which aborts the installation. Alternatively if there is a different way to achieve the same thing, then please let me know! Thanks in advance, Carl AMX AMX UK Auster Road Clifton Moor York, North Yorkshire United Kingdom YO30 4GD +44 (0) 1904 343100 office +44 (0) 1904 343101 fax AMX South The Coach House Grange Court, Grange Road Tongham, Surrey United Kingdom GU10 1DW +44 (0) 1252 781769 office +44 (0) 8701 991661 fax AMX Belgium Boerenkrijglaan, 96a B-2260 Westerlo Belgium + 32 (0) 1454 2763 office + 32 (0) 1454 2766 fax ###################################################################### Attention: This e-mail message is privileged and confidential. If you are not the intended recipient please delete the message and notify the sender. Any views or opinions presented are solely those of the author. This email was scanned and cleared by NetIQ MailMarshal. ###################################################################### ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users