Prerequiste file version test? Registry key test? - Advanced Installer Community

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!

kkkwj
Posts: 88
Joined: Thu Mar 01, 2007 10:45 pm

Prerequiste file version test? Registry key test?

Hi, I read the manual, but I still don't understand how to make up launch conditions to only install if (1) a file of a particular version exists on the target machine (I don't want to supply the file in my install package), or if (2) a particular registry key has a particular value (actually, this one is a .NET 2.0 registry key).

As far as I can see, to create the prereqs, I click Prerequisites, New (additional launch condition), and get the new Condition dialog box. I click the three little dots, and get the edit condition dialog. Now what?

How do I check for a registry key from this dialog? (Surely, I cannot?)

How do I check for a file version? (Not from this dialog, I think). Instead, I tried Prerequisites, Software Tab, New. But this dialog seems to want to force me to choose a file below the WINDOWS directory (to enable the file tab in the dialog), and appears to make me include this file in my installer package. Once I can see the file tab, I can specify the file that I want to test the version of. But what about the WINDOWS file stuff?

Am I way off track here? All I want to do is check a registry key value, and check for the existence of a particular file version somewhere on the installing machine. Help... :-)
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

The Launch Conditions page allows you to specify conditions that must be fulfilled before installing the package.

Prerequisite Software page allows you to specify products, frameworks or components that must be installed before installing the package.

When you choose "New" for a prerequisite AI ask you to choose the primary prerequisite file (the file that will be executed if the prerequisite condition does not meet). After you choose that file you can add other required files in the "Files" tab.

As a condition for a prerequisite you can choose between "File Version" (the version is taken from a file), "Registry Value" (the version is taken from a registry value) or "Registry Subkeys Enumeration". Read more about those options here:
http://www.advancedinstaller.com/user-g ... tions.html

In the next version of AI scheduled for release this week you will have the possibility to check the content of a specified registry value and also to specify multiple conditions for a prerequisite.

On what conditions you can use for .Net Framework detection please see:
http://www.advancedinstaller.com/forums ... php?t=2067

Hope this helps. Please let us know if you encounter any problems.

Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
kkkwj
Posts: 88
Joined: Thu Mar 01, 2007 10:45 pm

When you choose "New" for a prerequisite AI ask you to choose the primary prerequisite file (the file that will be executed if the prerequisite condition does not meet). After you choose that file you can add other required files in the "Files" tab.
Thanks for your response, but it does not really help---I figured all that stuff out from the documentation.

What if I don't want to execute any file if the prerequisite fails? All I want to do is look to see if a file exists, and if it does not, I want to stop the installation?
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,
All I want to do is look to see if a file exists, and if it does not, I want to stop the installation?
This can be done with a launch condition. Create a file search in the "Search" page. The search result is stored by default in the "RESULT_PROPERTY". Now switch to "Prerequisites->Launch Conditions" tab and add a new launch condition like this:

Condition: RESULT_PROPERTY (if this condition is not fulfilled the installation will stop)
Description: the text to be displayed to the user

http://www.advancedinstaller.com/user-guide/search.html
http://www.advancedinstaller.com/user-g ... tions.html

Also note that you can use the "Launch Condition" wizard from main menu.

Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
kkkwj
Posts: 88
Joined: Thu Mar 01, 2007 10:45 pm

Wow, very nice, that's exactly what I wanted. I wonder why I couldn't figure that out from reading all that documentation. Thank you very much for your help.

A suggestion for improving file searches is to let me choose one or more browse locations. The current dialog forces me to pick either (1) a single predefined folder (eg. [SystemFolder]) or <the entire set of hard drives on the destination machine> (which could be a HUGE search set).

It would be nicer if I could pick multiple predefined folders, and mix them with multiple folders that I want to specify (eg C:\my\own\folder\choice).
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,
It would be nicer if I could pick multiple predefined folders, and mix them with multiple folders that I want to specify (eg C:\my\own\folder\choice).
This already can be done. You can specify a path like this: [WindowsVolume]own\folder\choice witch is transplanted to: C:\my\own\folder\choice. Also you can specify how deep to search in subdirectories.

Note that you cannot schedule a search in a folder that is set during installation (like APPDIR).

Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
kkkwj
Posts: 88
Joined: Thu Mar 01, 2007 10:45 pm

Very good, thanks. You do a wonderful job of forum support. I can see that there is much to learn beyond the documentation. (Having written a ton of professional documentation over the years, I would say that your help doc could be improved by adding step-by-step examples. If you imagine taking the most common and most simple questions from this forum and putting them in the doc, that would probably reduce your forum support work. :-) )

Anyhow, thanks again for the wonderful support and very nice product. I'm a happy newbie user, for sure. AI is WAY better than the VS setup projects.

Return to “Common Problems”