viewer.exe failure to launch URL in .url file - 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!

shelmers
Posts: 63
Joined: Thu Sep 03, 2009 9:02 pm
Location: Andover, Massachusetts USA

viewer.exe failure to launch URL in .url file

In AI v7.3, I created a custom action to run viewer.exe in order to have it launch a URL stored in a file. When I select the URL file using the Command Line browse button on the custom actions page, AI generates this:
[#Activation_Email.url]
The setup program runs to completion but does not launch the url in the file. There is no error message.

Enclosing the command line in quotes, e.g.,
"[#Activation_Email.url]"
causes the url in the file to be launched correctly. The attached v7.3 aip file demonstrates this (I've also attached a sample .url file).

However, the setup created using the quoted syntax that works with AI v7.3 does not work with AI v7.5. The setup does launch the URL but it produces the error shown below:
error message from AI v7.5
error message from AI v7.5
AI error.jpg (37.65 KiB) Viewed 4403 times
How do I get viewer.exe to launch a URL in a file with v7.5?
Attachments
AI Test.zip
Contains v7.3 and v7.5 aip files, and .url file
(4.38 KiB) Downloaded 301 times
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: viewer.exe failure to launch URL in .url file

Hello,

Thank you for bringing this to our attention.
This indeed appears to be an issue with AI 7.5. I have added a fix on our TODO list which will be available in a future version of Advanced Installer.
In the meantime, you can directly input the url in the "Command line" field to launch the url.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: viewer.exe failure to launch URL in .url file

Hello,

Upon further investigation it turns out this is not a bug. There is additional functionality included that enables viewer.exe to return the same error code as the process it launches. It appears the process which launches the URL returns a return code different than 0, which Windows Installer interprets as an error. To get past this behavior, simply mark the viewer.exe custom action as "Asynchronous execution, do not wait for return". It should work as expected.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
shelmers
Posts: 63
Joined: Thu Sep 03, 2009 9:02 pm
Location: Andover, Massachusetts USA

Re: viewer.exe failure to launch URL in .url file

Thanks for the quick response, Gabriel. Your suggestion does work.

Two followup questions:

1) Is there a specific reason why you suggested "async, do not wait for return" rather than "sync, do not wait for return"? Both work in the test project I sent, presumably because the action is in response to a click of the Finish button on the end dialog. I'm just curious whether you recommended async because there are situations in which sync would not work.

2) The issue of the quotes still remains. AI creates the file property in the command line field without quotes, i.e.,
[#Activation_Email.url]
but the setup will not perform the action unless the property is enclosed in quotes. To be honest, I can't remember how I figured out that it worked with the quotes when I started using this technique 9 months ago, but shouldn't AI enclose the property string in quotes?

Regards,
Scott

Return to “Common Problems”