We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

Antony
Posts: 15
Joined: Sun Nov 16, 2014 11:02 am

install my app only if a file exist on target computer

i need to make a condition:
my program will be installed only if xxxx.exe is on target computer
i tried with search but it don't work
any ideas??
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: install my app only if a file exist on target computer

Hi and welcome to Advanced Installer forums.

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.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Antony
Posts: 15
Joined: Sun Nov 16, 2014 11:02 am

Re: install my app only if a file exist on target computer

i create a search file xxxx.exe
i create a launch condition xxxx.exe = targetdir
it don't works i think i did a mistake in my launch condition

thanks you very much for help
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: install my app only if a file exist on target computer

Hi,

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?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Antony
Posts: 15
Joined: Sun Nov 16, 2014 11:02 am

Re: install my app only if a file exist on target computer

<COMPONENT cid="caphyon.advinst.msicomp.MsiAppSearchComponent">
<ROW Property="AI_SETUPEXEPATH" Signature_="AI_EXE_PATH_CU" Builds="DefaultBuild"/>
<ROW Property="AI_SETUPEXEPATH" Signature_="AI_EXE_PATH_LM" Builds="DefaultBuild"/>
<ROW Property="WORLDOFTANKS.EXE" Signature_="FileSearchSign"/>
</COMPONENT>

<COMPONENT cid="caphyon.advinst.msicomp.MsiControlConditionComponent">
<ROW Dialog_="SetupTypeDlg" Control_="Next" Action="Enable" Condition="WORLDOFTANKS.EXE =Installed"/>
</COMPONENT>

<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&apos;as pas été trouvé"/>
</COMPONENT>

<COMPONENT cid="caphyon.advinst.msicomp.MsiSignatureComponent">
<ROW Signature="FileSearchSign" FileName="WorldOfTanks.exe" MinDate="1159837999" MaxDate="1180781673"/>
</COMPONENT>

<COMPONENT cid="caphyon.advinst.msicomp.MsiSignatureComponent">
<ROW Signature="FileSearchSign" FileName="WorldOfTanks.exe" MinDate="1159837999" MaxDate="1180781673"/>
</COMPONENT>
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: install my app only if a file exist on target computer

Hi,

Can you please attach the AIP file itself because I cannot get to much information from its content?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Antony
Posts: 15
Joined: Sun Nov 16, 2014 11:02 am

Re: install my app only if a file exist on target computer

here aip attached ;)
Attachments
Mods Pack 9.4.e.aip
my aip
(838.85 KiB) Downloaded 340 times
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: install my app only if a file exist on target computer

Hi,

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?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Antony
Posts: 15
Joined: Sun Nov 16, 2014 11:02 am

Re: install my app only if a file exist on target computer

sorry i upload the correct aip
Attachments
Mods Pack 9.4.e.aip
(839.29 KiB) Downloaded 297 times
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: install my app only if a file exist on target computer

Hi,

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.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Antony
Posts: 15
Joined: Sun Nov 16, 2014 11:02 am

Re: install my app only if a file exist on target computer

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
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: install my app only if a file exist on target computer

Hi,

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.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Antony
Posts: 15
Joined: Sun Nov 16, 2014 11:02 am

Re: install my app only if a file exist on target computer

ok ty i will search how to create this script because i'm not a programmer
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: install my app only if a file exist on target computer

Hi,

There should be many examples on the net, maybe this thread can help you.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”