How to stop the application before the pre requisites check?

Need help authoring your installer? Ask the community for tips and advice.

How to stop the application before the pre requisites check?

Postby Fazeem.Mohammed » Wed Aug 08, 2012 3:24 am

Hi,

I am maintaining a Java-Product Installer.So currently we are planning for a JRE version Upgrade.
But we have to stop the OLD version of Our product before Upgrading JRE Prerequisites.
How to Implement this behaviour?
Fazeem.Mohammed
 
Posts: 12
Joined: Mon Jun 18, 2012 11:37 am

Re: How to stop the application before the pre requisites ch

Postby CiprianComsa » Thu Aug 09, 2012 9:07 am

Hi,

If you want to prevent your application from running you can use one of the predefined custom actions: Close application (This custom action allows you to close an application which uses a user Interface.) or Terminate process (This custom action allows you to stop a running process on the target machine.). This will be achieved from Custom Action Page.
Also, If you want to run a custom action before a prerequisite (JRE in your case) , you must add the prerequisite as feature-based.

Regards,
Ciprian
__________________________________________________________________________________________________________________________________________________
Ciprian Comsa
Advanced Installer Team
http://www.advancedinstaller.com/
CiprianComsa
 
Posts: 110
Joined: Thu Aug 19, 2010 10:11 am

Re: How to stop the application before the pre requisites ch

Postby Fazeem.Mohammed » Thu Oct 25, 2012 8:43 am

Hi CiprianComsa,

Could you please explain in a detailed manner regarding .
How to call Terminate Process before running Prerequisite ?

Thanks,
Fazeem.Mohammed
 
Posts: 12
Joined: Mon Jun 18, 2012 11:37 am

Re: How to stop the application before the pre requisites ch

Postby Daniel » Thu Oct 25, 2012 11:20 am

Hello,

In order to achieve this you can add the related package prerequisite as a feature-based prerequisite to your project. Then, in the "Custom Action" page you can add a "Terminate Process" custom action with sequence scheduled before "Install Execution Stage -> Searches" action group.

Let us know if this helped.

All the best,
Daniel
Daniel Radu
Advanced Installer Team
http://www.advancedinstaller.com/
Daniel
 
Posts: 3314
Joined: Mon Apr 02, 2012 1:11 pm

Re: How to stop the application before the pre requisites ch

Postby Fazeem.Mohammed » Fri Oct 26, 2012 9:35 am

Daniel,

I have updated my project accordingly.
But it seems JRE Detection not working.Do I have change any settings in Organization screen?
Thanks
Fazeem.Mohammed
 
Posts: 12
Joined: Mon Jun 18, 2012 11:37 am

Re: How to stop the application before the pre requisites ch

Postby Daniel » Fri Oct 26, 2012 11:17 am

Hello,

I'm not sure why you are encountering this behavior. Please keep in mind that if you are using the 64-bit version of JRE, then from "Prerequisites -> Install Conditions" tab you should enable the "Use 64-bit locations when evaluating conditions on a 64-bit machine" option.

Also, please keep in mind that by default the registry searches use 32-bit locations no matter on what operating system (32-bit or 64-bit) your application runs. You can take a look on our article about the Wow6432Node registry key. If you want to search (on 64-bit machines) in 64-bit registry section then you should use "Search the 64-bit portion of the registry" option.

Let us know if this helps, otherwise please give us more details about your scenario.

All the best,
Daniel
Daniel Radu
Advanced Installer Team
http://www.advancedinstaller.com/
Daniel
 
Posts: 3314
Joined: Mon Apr 02, 2012 1:11 pm

Re: How to stop the application before the pre requisites ch

Postby Fazeem.Mohammed » Fri Oct 26, 2012 12:09 pm

Hi,

It seems this is not the issue of JRE detection.
If If unchecked "Continue with main installation ..." in Prerequisite dialogue or Checked "run installation from Installer source" in Organisation page,the error dialog is displaying but the option to install the bundled JRE is not coming

Thanks,
Fazeem Mohammed
Fazeem.Mohammed
 
Posts: 12
Joined: Mon Jun 18, 2012 11:37 am

Re: How to stop the application before the pre requisites ch

Postby Daniel » Fri Oct 26, 2012 12:44 pm

Hello Mohammed,

I'm not sure why you are encountering this behavior. Can you give us more details about your scenario (maybe exemplify)? Also, please keep in mind that in order to clearly report an issue you can take a look on our How to report a problem for a faster resolution article.

All the best,
Daniel
Daniel Radu
Advanced Installer Team
http://www.advancedinstaller.com/
Daniel
 
Posts: 3314
Joined: Mon Apr 02, 2012 1:11 pm

Re: How to stop the application before the pre requisites ch

Postby Fazeem.Mohammed » Mon Oct 29, 2012 7:23 am

Problem description: Pre-Requisite Install request dialog is not Displaying when the JRE-PreRequisite is moved to the Feature Based PreRequisite

The situation which made us the installer change
As per the Current settings we have mainly 2 Pre-PreRequisite 1) Postgres-sql 2) JRE.Both these pre requisite are "Pre-Install " package

Now we are Planning to Update the minimum version JRE of JRE required to run our product to to JRE 1.6.0_31
But we are Faced one issue in this implementation.
While we upgrading our product.Installer tries to install the JRE 1.6.0_31 but if our product is running the back ground JRE installation will fail as our product is using the already existing JRE in the environment
So We decided to stop the our product from Installer before the Pre-requisite check

Change Points:

1) Moved JRE-Prerequisite to Feature Based Prerequisite
2) In the Organization Page we changed the Installation settings of JRE pre-Requisite by selecting Radio Button "Run Feature from installation Source"
3) We placed the the custom action to Stop our product (using net.exe stop command) before the "Search" custom action in Install execution stage

Result

The JRE Pre-requisite Installation request dialog is not displaying,but a warning dialog is displaying
Please find the attached screen shot for more information
Attachments
InstallerWarning.jpg
InstallerWarning.jpg (22.85 KiB) Viewed 2242 times
Fazeem.Mohammed
 
Posts: 12
Joined: Mon Jun 18, 2012 11:37 am

Re: How to stop the application before the pre requisites ch

Postby Daniel » Mon Oct 29, 2012 12:48 pm

Hello Mohammed,

Problem description: Pre-Requisite Install request dialog is not Displaying when the JRE-PreRequisite is moved to the Feature Based PreRequisite

In order to achieve this you can add the "PrerequisitesDlg" dialog in your project. Here's the steps to proceed:
- Go to "Dialogs" page and select the "First Time Install -> WelcomeDlg" dialog.
- From its context menu choose "Add Dialog..." option. In the "Add Dialog" select the "PrerequisitesDlg".
- Build and run your project.

The JRE Pre-requisite Installation request dialog is not displaying,but a warning dialog is displaying

Please keep in mind that searches from "Prerequisites Install Condition" tab are performed twice:
- first to determine whether the prerequisite should be installed ( if the conditions are false)
- and second time, after the prerequisite has been installed, to determine whether the prerequisite install was successful ( when the conditions should be evaluated as true )
The reason you are getting this issue is because when your conditions were evaluated second time, they failed. So, in order to avoid the related issue you should reevaluate your conditions for the prerequisite whose install was reported to have failed. Please take a look on our "Why do I receive the 4154 warning?" article.

Let us know if this helped.

All the best,
Daniel
Daniel Radu
Advanced Installer Team
http://www.advancedinstaller.com/
Daniel
 
Posts: 3314
Joined: Mon Apr 02, 2012 1:11 pm

Re: How to stop the application before the pre requisites ch

Postby Fazeem.Mohammed » Mon Nov 05, 2012 3:33 am

Dear Daniel,

It is working , Thank you for your support
But we are facing one more issue ,As I mentioned we need to stop our application before Installing Prerequisite.
If I Placed custom action terminate the application( (using net.exe stop command)) just before the "Install Execution Stage -> Searches",terminate application is executed only after the Pre-requisite installation is done.
So Please advice me on how to run the "terminate the application" before the Pre-requisite Installation in Install execution stage.

Thanks,
Fazeem Mohammed
Fazeem.Mohammed
 
Posts: 12
Joined: Mon Jun 18, 2012 11:37 am

Re: How to stop the application before the pre requisites ch

Postby mihai.petcu » Mon Nov 05, 2012 1:53 pm

Hello Mohammed,

Feature-based prerequisites are installed right after the ProgressDlg standard action. To run a custom action before that you should schedule it without sequence and trigger it when the user clicks on a button.
For example you can try running the custom action when the user clicks on the "Install" button.

All the best,
Mihai
Mihai Petcu
Advanced Installer Team
http://www.advancedinstaller.com/
mihai.petcu
 
Posts: 3582
Joined: Thu Aug 05, 2010 8:01 am

Re: How to stop the application before the pre requisites ch

Postby Fazeem.Mohammed » Wed Dec 05, 2012 7:43 am

Hi,

I am facing one issue in our new installer.while installation in progress it is showing extracting prerequisite and installing pre-requisite software message.
But it seems the software is actually extracted successfully and showing the "warning 4154.Java Runtime Environment 1.7 prerequisite software was not
correctly installed".Could you please support me in solving this issue?

Changes Done:
1) Moved JRE Pre requisite to "Feature-based" Pre requisite
2) Added Prerequisite Dialogue under " "First Time Install -> WelcomeDlg""
3) Added StopService Custom Action to "Install Button Action"
6) disable JRE check in Launch Condition

FYI: Our Installer is Single EXE setup(Resource Inside)
Fazeem.Mohammed
 
Posts: 12
Joined: Mon Jun 18, 2012 11:37 am

Re: How to stop the application before the pre requisites ch

Postby Daniel » Wed Dec 05, 2012 1:09 pm

Hello,

Please keep in mind that searches from "Prerequisites Install Condition" tab are performed twice:
- first to determine whether the prerequisite should be installed ( if the conditions are false)
- and second time, after the prerequisite has been installed, to determine whether the prerequisite install was successful ( when the conditions should be evaluated as true )

The reason you are getting this issue is because when your conditions were evaluated second time, they failed. So, in order to avoid the related issue you should reevaluate your conditions for the prerequisite whose install was reported to have failed. Please take a look on our "Why do I receive the 4154 warning?" article.

All the best,
Daniel
Daniel Radu
Advanced Installer Team
http://www.advancedinstaller.com/
Daniel
 
Posts: 3314
Joined: Mon Apr 02, 2012 1:11 pm

Re: How to stop the application before the pre requisites ch

Postby Fazeem.Mohammed » Thu Dec 06, 2012 2:18 am

Hello,
It seems the issue is not related with pre-requisite checking but pre-requisite extraction and Installation.
When I changed the Installer file type to "Exe SetUp with resource next to it" the JRE installer is launching properly.
As I mentioned in the my previous post currently it is been set in to "Our Installer is Single EXE setup(Resource Inside)" and while installation is in progress
it is showing Extracting and Installing pre-requisite software message,but it never launches the pre-requisite

Thanks,
Fazeem Mohammed
Fazeem.Mohammed
 
Posts: 12
Joined: Mon Jun 18, 2012 11:37 am

Next

Return to Building Installers

Who is online

Users browsing this forum: Yahoo [Bot] and 8 guests

cron