hodka
Posts: 6
Joined: Thu Apr 12, 2012 10:08 pm

Prerequisite [APPDIR] in Install Condition

Sat Apr 14, 2012 11:39 pm

I created a custom prerequisite. It should test whether a certain file is present in the APPDIR and install it if missing (file installed in a folder that is set to permanent so that it will not be removed at each reinstall of the installer package).

I have the following problem:
I created a new prerequisite and removed the "Continue even if not installed" tick.
I set a "Install Condition" with "Install prerequisite based on conditions" -> File Version "[APPDIR]permanentfolder\file.txt"
It seems as if the installer knows the [APPDIR] parameter only when verifying whether the prerequisite was correctly installed, but not when deciding whether to download and run the additional file. But that way it will always download my file even if it is already present. Can the behavior be changed so that I can use APPDIR at this stage too (I put the prerequsite under "Feature-based" package).

Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Re: Prerequisite [APPDIR] in Install Condition

Tue Apr 17, 2012 2:46 pm

Hi,

Please keep in mind that the install conditions for feature-based prerequisites are evaluated when "AI_AppSearchEx" action is performed. Also, the "APPDIR" value is set when "CostFinalize" action is performed. So, if you want to use the "APPDIR" property value in your scenario you must shedule the "AI_AppSearchEx" action after the "CostFinalize" action.
In order to obtain what you want, you should proceed as follows:
-go to "Table Editor" page from "Custom Behavior" group and select "InstallUISequence" table
-in the "InstallUISequence" table set the sequence number for "AI_AppSearchEx" action to a greater number than the "CostFinalize" sequence number (i. e. 1001)

Regards,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

hodka
Posts: 6
Joined: Thu Apr 12, 2012 10:08 pm

Re: Prerequisite [APPDIR] in Install Condition

Tue Apr 17, 2012 9:42 pm

Thanks. That works just great!

Return to “Common Problems”