|
From: James R. <jr...@ca...> - 2005-06-29 17:18:06
|
I have an older desktop application (called CM) that relies on an existing terminal emulator that supports EHLAPI. The interface is supported by a suite of products often from different vendors. The decision of what vendor and what version emulator to be run is not up to me (ie cannot be embedded with my applications install). When testing against a new o/s image with a new version of the emulator, our customer ran against an issue where the latest version failed to add the path for ehlapi32.dll to the system path. Since my CM app couldn't find the DLL it needed; it couldn't function properly. It is not enough that the dll exist on the machine but that the components that use it can find it. I'd like to search the system path on the target machine for ehlapi32.dll as a LaunchCondition. I can get the targeted search (single Path) to work and display an appropriate error messagebox. =20 METHOD A) But when I attempted to have it use the system PATH with the following WIX source: *** <Property Id=3D"EHLAPI_EXISTS" > <DirectorySearch Id=3D'PATH_DIRS' Path=3D'[%PATH]' Depth=3D'0' > <FileSearch Id=3D'SEARCH_EHLAPI' Name=3D'ehlapi32.dll' /> </DirectorySearch> </Property> <Condition Message=3D'Missing EHLAPI32.DLL! Please Install "Rumba" = before the "[ProdShortName]"'>Installed OR EHLAPI_EXISTS</Condition> *** I get the following error: *** AppSearch: Property: EHLAPI_EXISTS, Signature: SEARCH_EHLAPI MSI (c) (F0:70): Note: 1: 1324 2: system32;C: 3: 1=20 Info 1324. The folder path 'system32;C:' contains an invalid character. Action ended 11:13:42: AppSearch. Return value 1. *** So, using the above method, is there a way to do a FileSearch against all entries in the system path? If so, what is the syntax? METHOD B) I have a utility that enumerates through the working and %PATH% searching for a filename provided on the command line. I can execute it using a Custom Action: *** <CustomAction Id=3D"AbortRUMBA" Error=3D"25000"/> <CustomAction Id=3D"ValidRUMBA" BinaryKey=3D"LocateFileBinary" ExeCommand=3D"ehlapi32.dll" Execute=3D"deferred"/> <Error Id=3D"25000">Missing EHLAPI32.DLL! Please Install "Rumba" before the "[ProdShortName]"</Error> <InstallExecuteSequence> <Custom Action=3D"ValidRUMBA" After=3D"InstallInitialize">NOT Installed</Custom> <Custom Action=3D"AbortRUMBA" After=3D"ValidRumba" Error=3D"25000">Not Installed AND ???</Custom> </InstallExecuteSequence> <Binary Id=3D"LocateFileBinary" src =3D "LocateFile.EXE" /> *** But with this method; the problem becomes how do I make the AbortRUMBA action be conditional on the return value of the ValidRUMBA action? =20 Without the needed condition; AbortRUMBA always executes regardless of the outcome of the path search, aborting the installation. =20 I'd prefer to keep things in EXE (rather than DLL) format; as I use this tool (and many others) in my build process. If there is one thing I hate doing it is duplicating functionality. Any ideas/feedback is as always greatly appreciated. Thanks, James A. Renton Castel, Inc. |