blueeagle69
Posts: 2
Joined: Tue Apr 11, 2006 2:53 pm

Install criteria

Hi

Sorry for what must be an easier answer, but it is driving me nuts.

I know you can use Prerequisites to tell the installer to check if a file is already on the users system, before the installer will continue.

However, I have also been trying to use Custom Actions (Search), to display a custom error message if a certain file isn't found, but havent had any joy.

Could someone explain to me what I need to set up to do this?
I added AppSearch/Error mesage, but don't know what criteria to use.
I am obviously using the wrong criteria, but either my error message shows regardless, even if the file is on the users system, or it doesn't show, and installs anyway, even if the file isn't there! Depending on what (wrong) criteria I use

Sorry :oops:
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,
I know you can use Prerequisites to tell the installer to check if a file is already on the users system, before the installer will continue.
You should use Prerequisites only if you need to install another application prior to installing your program.
I have also been trying to use Custom Actions (Search), to display a custom error message if a certain file isn't found, but havent had any joy.
Could someone explain to me what I need to set up to do this?
In order to create a file search you can use the Search Wizard from Wizard Menu, or create the search in the Search Page(select "New File Search" and then "Add Location" from ToolBar). I would recommend using the wizard since it is more simple to use.

If you want your setup to stop if the search failed you may use a Launch Condition. In order to do this go to Launch Conditions page and add a new launch condition. In the "Condition" field enter the name of property you have defined in the search page (default is RESULT_PROPERTY) and in the "Description" field type the message to be displayed as an error message.

It may be useful to know what is the result of the search. In order to do this you can use the following ScriptInLine custom action:

Code: Select all

MsgBox Session.Property("RESULT_PROPERTY")
Replace RESULT_PROPERTY with the property you have defined in the search page. Put the custom action on InstallUISequence->AppSearch standard action.

Hope this helps you.

All the best,
Gigi
_________________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
blueeagle69
Posts: 2
Joined: Tue Apr 11, 2006 2:53 pm

Thanks

Hi

I got it to go, finally, just before the reply came. Typical!

The idea you have shown though, is great thanks.
I will try that.

Return to “Common Problems”