Problem Integrating Updater - Advanced Installer Community
bojosiri
Posts: 4
Joined: Thu Jan 08, 2015 11:07 am

Problem Integrating Updater

Hi All,

I have been following the tutorial "How to integrate the Updater without writing code?" and I cant seem to get it working.

The first example states that the following snippet:
/silent -startappfirst -restartapp <application_executable_path> -restartappcmd <application_command_line_params>

Should launch the application and check for the updates. If the customer cancels the update then the previously installed application is launched instead.

The snippet works as long as I dont put the path to my exe. The path contains spaces and as such I am surrounding it with quotes, however it still silently fails.

The following fails: "C:\Program Files (x86)\MyApp\updater.exe" /checknow -minuseractions -startappfirst -restartapp "C:\Program Files (x86)\MyApp\app pro.exe" -restartappcmd
If i remove all the spaces and quotes then the update check works, however the app doesn't launch as it obviously has the wrong path.

Any help would be appreciated.

Thanks
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Problem Integrating Updater

Hi and welcome to Advanced Installer forums.

Thank you for your interest in Advanced Installer.

I tested the command line that you mentioned (with only one modification) and it worked well to me. The spaces do not cause any problem if the path is enclosed into quotes.

The only thing that I added, was a command line argument after the "-restartappcmd" switch. That switch is required only if you want to send a command line to your application, otherwise you should not use it. Also, please make sure that all the paths (to the updater and to the application) are correct.

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

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
bojosiri
Posts: 4
Joined: Thu Jan 08, 2015 11:07 am

Re: Problem Integrating Updater

Thanks for your reply. That was indeed the problem...

The application is running correctly only if I have the -startappfirst argument...

From the tutorial, the way I understood it was that the process was like this:
Scenario 1:
1. User clicks the icon and a update window is opened
2. The User Cancels the update request
3. Old version of the application is opened.

Scenario 2:
1. User clicks the icon and a update window is opened
2. The User Accepts the Update and the Download is installed
3. The Application starts...


Scenario 2 works fine. Is there a way for Scenario 1 to work, without having to start the app in the first place?

Thanks again for your help.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Problem Integrating Updater

Hi,

To have the "Scenario 1", you should not use the "-startappfirst" switch. For details about each switch, you can take a look on the Auto Updater article.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
bojosiri
Posts: 4
Joined: Thu Jan 08, 2015 11:07 am

Re: Problem Integrating Updater

Hi Eusebiu

I have tried that however if the user cancels the update then nothing happens...
bojosiri
Posts: 4
Joined: Thu Jan 08, 2015 11:07 am

Re: Problem Integrating Updater

This is the arguments which I am using:

/silentall -nofreqcheck-restartapp "veestudio pro.exe"

Works fine for the update check.
Works fine if software up to date. It starts the software fine.
It fails if the user cancels the update, i.e. nothing happens. I would expect the old version of the software to run...
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Problem Integrating Updater

Hi,

Please note that as mentioned in the Auto Updater article, the "full path to the executable" should be written after the "-restartapp" switch. The updater runs from the temp folder sometimes and it will not find the executable if you write a relative path there.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”