In order to achieve this you can, indeed, go in the Search page, create a "File Version" extended search, then go in the "Launch Conditions" page and create a custom launch condition in the "Custom" tab. The Set launch conditions tutorial describes exactly what you need.
I'm not sure why it does not work. Can you please send us the .AIP (project file) to support at advancedinstaller dot com or attach it to this thread, so we can investigate it?
<COMPONENT cid="caphyon.advinst.msicomp.MsiLaunchConditionsComponent">
<ROW Condition="(VersionNT <> 400)" Description="[ProductName] cannot be installed on the following Windows versions: [WindowsTypeNT40Display]" DescriptionLocId="AI.LaunchCondition.NoNT40" IsPredefined="true" Builds="DefaultBuild"/>
<ROW Condition="SETUPEXEDIR OR (REMOVE="ALL")" Description="This package can only be run from a bootstrapper." DescriptionLocId="AI.LaunchCondition.RequireBootstrapper" IsPredefined="true" Builds="DefaultBuild"/>
<ROW Condition="VersionNT" Description="[ProductName] cannot be installed on [WindowsType9XDisplay]" DescriptionLocId="AI.LaunchCondition.No9X" IsPredefined="true" Builds="DefaultBuild"/>
<ROW Condition="WORLDOFTANKS.EXE EQV TARGETDIR" Description="WorldofTanks.exe n'as pas été trouvé"/>
</COMPONENT>
I looked over your AIP file, but there is not search and launch condition defined in it. Are you sure that you followed the steps described in the Set launch conditions tutorial?
I looked over your AIP file and I noticed that there is no folder set for your file search. To achieve this you can right-click on your search, select the "Add Location -> Folder" option then write the appropriate folder for your search (i.e. [WindowsVolume]).
In the "Launch Conditions" page I saw that you created the following custom launch condition: WOT = TARGETDIR. In this case, the application will be installed only if the values of those properties are identical, otherwise it will be blocked. The installation is not blocked because your search is not found (as long as it does not have a folder assigned) and the "TARGETDIR" property is not set at that point, so they are both empty.
Also, please note that the installation path of the package is stored in the "APPDIR" property in an Advanced Installer package.
i did a search called WOT to find xxxx.exe
i added a folder : [appdir]
in custom lauch i made WOT = APPDIR
the problem is installer search for the file at launch
i would like installer search this xxxx.exe after user choose the path of installation to allow installer searching this file inside the user's path choice
(sorry for my english i'm french) and thanks a lot for help
Indeed, the searches and the launch conditions are performed before the user to choose the installation path and I'm afraid that you cannot achieve what you want through the predefined support. This is the Windows Installer normal behavior.
However, you can create your own custom action (C++, C#, VBS) with this functionality and execute it after the user chose the installation path.
FOLLOW US
Get the latest news in Application Packaging