Component search is a better choice except that I won't know the old component guid. So instead I'm checking for the presence of this file. If it's there, I want to fail the install.
---------- Forwarded message ---------- From: "Wilson, Phil" <phil.wil...@wonderware.com> To: General discussion for Windows Installer XML toolset. < wix-users@lists.sourceforge.net> Date: Wed, 22 Jul 2009 11:09:47 -0700 Subject: Re: [WiX-users] filesearch not finding file What's the goal here? Are you looking for that file, or is it just a marker for a previous version of the product? If it was previously installed with an MSI package a component search would be more reliable - it doesn't depend on directory locations, and it works if the user changes the install folder from the default Program Files location. Phil Wilson -----Original Message----- From: Eric Napier [mailto:napi...@gmail.com] Sent: Wednesday, July 22, 2009 8:29 AM To: wix-users@lists.sourceforge.net Subject: [WiX-users] filesearch not finding file I want to fail an installation if a file (msi.ini) is present. My filesearch element doesn't seem to be finding my file. I've confirmed the file is there. If I remove the filesearch element, the directory search finds the directory and fails the install. However, when I include the filesearch element it never finds my file. Can you see my mistake? My code below.Thanks. <Property Id="PREVIOUSMSIINSTALLED"> <DirectorySearch Id="MsiIniSearchDir" Path="[HostDir]"> <FileSearch Id ="MsiIniSearch" Name="msi.ini"/> </DirectorySearch> </Property> <!-- Do not proceed if an MSI ini was found, unless this is an uninstallation.--> <Condition Message="Please remove the previous rep console MSI before installing.">(REMOVE ~= "ALL") OR (NOT PREVIOUSMSIINSTALLED)</Condition> ------------------------------------------------------------------------------ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users