Problem with command line args in secondaryMain - 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!

graemehook
Posts: 3
Joined: Thu Mar 22, 2012 9:29 am

Problem with command line args in secondaryMain

I have set up a single instance Java product and registered a file extension against that product that launches with the arguments -f "%1" to pass in the selected file name. All works ok on the initial launch, but on subsequent launches the secondaryMain method does not get the full argument list. I get only the first character ( - ).

Graeme
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Problem with command line args in secondaryMain

Hi Graeme and welcome to Advanced Installer forums,

I just tested this with Advanced Installer 8.9 and the java product successfully gets the arguments you mentioned on consecutive subsequent launches:
Java Virtual Machine Tab
arguments.jpg
arguments.jpg (12.01 KiB) Viewed 8236 times
Are your java product settings different?

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
graemehook
Posts: 3
Joined: Thu Mar 22, 2012 9:29 am

Re: Problem with command line args in secondaryMain

Hi Mihai,

I'm using the command line options in the file association settings rather than on the application itself:

verb : open
arguments : -f "%1"
CiprianComsa
Posts: 110
Joined: Thu Aug 19, 2010 10:11 am
Contact: Website

Re: Problem with command line args in secondaryMain

Hi,

I tested with a simple java application using arguments -f "%1" for the file association and it works correctly.
Please make sure that your code handled correctly the arguments.

Regards,
Ciprian
__________________________________________________________________________________________________________________________________________________
Ciprian Comsa
Advanced Installer Team
http://www.advancedinstaller.com/
Ciprian Comsa - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
graemehook
Posts: 3
Joined: Thu Mar 22, 2012 9:29 am

Re: Problem with command line args in secondaryMain

Hi Ciprian,

I have created a new project in v9.0 and created a very simple test case which recreates the problem. I have attached a zip containing the aip, jar file,source files and two screen captures. I am creating and installing this on a Windows 7 x64 machine.

Regards,
Graeme
Attachments
smtest.zip
(17.58 KiB) Downloaded 456 times
CiprianComsa
Posts: 110
Joined: Thu Aug 19, 2010 10:11 am
Contact: Website

Re: Problem with command line args in secondaryMain

Hi Graeme,

Using "Single Instance" option checked from Java Product page we can reproduce your behavior.
Thank you for bringing it to our attention, the fix will be out in a future version.

Regards,
Ciprian
__________________________________________________________________________________________________________________________________________________
Ciprian Comsa
Advanced Installer Team
http://www.advancedinstaller.com/
Ciprian Comsa - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
CiprianComsa
Posts: 110
Joined: Thu Aug 19, 2010 10:11 am
Contact: Website

Re: Problem with command line args in secondaryMain

Hi Graeme,

A fix has already been implemented by our development team and will be available very soon. If you would like a RC version of the fix please write us an e-mail at support at advancedinstaller dot com.

Regards,
Ciprian
__________________________________________________________________________________________________________________________________________________
Ciprian Comsa
Advanced Installer Team
http://www.advancedinstaller.com/
Ciprian Comsa - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Problem with command line args in secondaryMain

This has been fixed in version 9.1 available for public release since May 02, 2012.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”