Prerequisite problem. - 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!

dani_deepak
Posts: 13
Joined: Tue Oct 24, 2006 5:04 pm

Prerequisite problem.

Hi Team,
I have a project of java, in that i want to detect the enivironment for running the application. I have added the preruisite for JRE 1.5 and it works fine, first the prerquisite condition is checked and if it is satisfied the only the software is installed on the host system. Everything is fine till here but now i want to detect JDK also as JDK also includes a JRE in it. Hence i want to detect both of them and if either of them is available on the system then i want the software should be installed in the host.
Basically i want either JRE or the JDK should be checked in the preruisite, but wat i know till now i able to add both the prerequisite independently and hence it doesnt solve my problem.


I hope i am able to clarify my point.


Hoping for a quick reply...

Deepak dani
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

Add both JDK and JRE in the prerequisites list and use "Force installation of this prerequisite" option in the "Install Conditions" tab for the JRE.

If this is not what you are looking for then please give me more details.

Regards,
Gigi
_______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
dani_deepak
Posts: 13
Joined: Tue Oct 24, 2006 5:04 pm

Hi team,
I think i was not able to explain my problem clearly to you, i would like to reinstate my problem.
My project is a java project in which i want a prerequisite of JRE 1.5, i have added that frm the prerequisite page, but issue is that if a host had a JDK(java development tool kit) and it does not have a JRE then also it ask for a JRE to download. What i want is that it should check for both JRe and JDK if either of them is available, then it shouldnt ask for any download and should not show the prereuisite page to the host.

The issue is JDK has a jRE in it, and i think its entries in registry is seperate, so if a user has a jdk and does not have a JRE seperately installed, the installer ask for a JRE. I want that it should check for both JDK and JRE and if either of them is available then it should skip the prerequisite page.


I hope i expained my self in a lucid manner....

Thanks a lot
Deepak
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

I don't think that this can be done because the JRE that cames with JDK does not add any registry entry that can be used for its detection. Also to look only for the JDK is not a good approach because the user can select to installation of the JRE (JRE comes as feature in JDK kit).

Also the prerequisites are executed in order that they appear in the prerequisites list when the setup.exe is launched. And you cannot condition a prerequisite with the result of other.

My suggestion is to add only the JRE as prerequisite.

Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
dani_deepak
Posts: 13
Joined: Tue Oct 24, 2006 5:04 pm

Hi Team,
I got the point you are trying to make, is there any other way in which this can be achieved, like for Eg. can i search for a file(JVM.dll) in program folder and chk for its version and if the version is above say 1.5 then there is no need for the prerequisite other wise download it from the site, as JVM.dll is a system file that comes with jre.

Other possibility, that i dont include any prerequisite but add a custom action which searches for the jre files on the system and if found chks for the version and if above 1.5 then continue other wise just download a file bundled with package which is a off line bootstrap of JRe which automatically downloads the JRE and then continue with the installation process.

Its extremely important for me to chk for both JRe and JDK and if either is found then there should be not need to download . I would like you to suggest some approach to accomplish this task. If this is not possiable then i would like you to plz give a clear explanation of why this cant be achieved .


Waiting eagerly for your reply....


Thank a lot
Deepak dani
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,
can i search for a file(JVM.dll) in program folder and chk for its version and if the version is above say 1.5 then there is no need for the prerequisite other wise download it from the site, as JVM.dll is a system file that comes with jre
This can be done, choose "File Version" as search criteria and type the path where to search in the "File To Search" field. But note that a user can install the JDK on any drive so to type a specific path is dangerous. You can search on all fixed drives for example. To do this leave the "File To Search" field empty.

I don't recommended the custom action approach because is more complicated and does the same thing like with prerequisite.

Hope this helps.

Regards,
Gigi
_______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”