can call java methods and store in the installer variable - 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!

siddaraj.nj
Posts: 3
Joined: Sun Mar 10, 2013 7:17 pm

can call java methods and store in the installer variable

Hi ,

How we can call java methods and store in the installer variable while installing the application which has been generated from the Advanced Installer .

Please let me know for any solution

Thanks !
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: can call java methods and store in the installer variabl

Hello and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.
How we can call java methods
If you want to run a java application through a custom action, then you can take a look on our "Invoke a JAVA PROGRAM during Updating" thread which debates a similar issue.
and store in the installer variable while installing the application which has been generated from the Advanced Installer .
I'm afraid that you cannot set an installer property within a java custom action. Please keep in mind that you cannot set up a package installation behavior through a java custom action.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
siddaraj.nj
Posts: 3
Joined: Sun Mar 10, 2013 7:17 pm

Re: can call java methods and store in the installer variabl

Hi , Thanks for inputs .

Basically i am looking for following action for licencing validation , steps are below

I need following steps to perform

1. Browse and get 'Licence file' from Local disk
2. Input that 'Licence file' to Java Program which stored in 'Files and Folders' for validation ( we will write our own java code for validation with respect to 'Licence file' )
3. Run the Java Program with input 'Licence file'
4. Display the Java Program output in dialog window and proceed the installation


In above , we will have our own 'Licence file' which will take from Local disk and validate that file with Java Program and display the output in Dialog window and continue the installation process .

I got how to run the java program by storing in 'Files and Folders' but no idea how to send inputs dynamically while installation process and get the output and display in Dialog window

Please let me know is there anyways to do above steps .

or any other ways to perform the above steps while installation process

Thanks and Regards
Raj
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: can call java methods and store in the installer variabl

Hi Raj,

The following article explains how to select an external file during the install. You can pass its path to the custom action by passing the public property mentioned in the article in the Action Data field.

As Daniel said, you cannot send back from the Java program information to the install process, so you cannot populate the MSI dialog. You can show text from your Java code only if you draw your own custom dialog.

The only way to communicate with the installer is to use a C#/C++ DLL or an VBS script. Using one of these methods you can set one or more properties with the desired text that should be displayed on the MSI dialog.

Best regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
siddaraj.nj
Posts: 3
Joined: Sun Mar 10, 2013 7:17 pm

Re: can call java methods and store in the installer variabl

Thanks , then i cannot consider java method approach as "not possible to send back from the Java program information to the install process"

So considering the VB/Java script , please , is it possible to do the below steps ?

1. Browse and get 'Licence file' from Local disk

2. Input that 'Licence file' to VB/Java Script which stored in 'Files and Folders' for validation ( we will write our own java code for validation with respect to

'Licence file' )

3. Run the VB/Java Script with input as 'Licence file'

4. Display the output in dialog window and proceed the installation


please , is it possible to do the above steps ? because i am not getting how to do the STEP 2 and display the output in dialog window
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: can call java methods and store in the installer variabl

Hello,

In order to achieve this you can store the license file path in an installer property (i.e. MY_FILEPATH) and then get the above property value within your VBScript custom action. Also, in order to display the output in a dialog window you can use another property which will be set within your VBScript custom action.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”