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!

kuradeel
Posts: 7
Joined: Tue May 24, 2016 11:07 am

Launching application after silent update

Hello,

I'm bluiding a installer with silent update (with update service), the only way to restart the application is by using the tab "auto close application" in the updater proyect, otherwise it runs in service level and does not show the interface.

The problem is that when my application is launched with this option it fails to load some libraries in the APPDIR. Seems that the updater is launching it with a diferent path, or with different permissions... Is there a way to workarround this?

Thanks in advance.
kuradeel
Posts: 7
Joined: Tue May 24, 2016 11:07 am

Re: Launching application after silent update

I'm trying the following:

I've created a .exe to act like a launcher. So it changes the path to the installation path, depending on the architecture and type of installation watching in the register, and then it runs the main app. It works...
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Launching application after silent update

Hello,

This may happen if the install location (APPDIR property) is changed during the new setup version installation. In this case the Updater will launch your application using the old install location (APPDIR).

As a workaround you can define an environment variable (APPDIR_PATH) in all of your installation projects and set it to the [APPDIR] property reference. Then, in the updates configuration project use a path like this:

Code: Select all

%APPDIR_PATH%myApp.exe
Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Launching application after silent update

Hello,

I've further debated this scenario (restart app when the APPDIR is changing) with our development team and it seems the workaround when using an environment variable won't work either. This is because on Windows the environment variable list is loaded when a process start. Therefore the Updater will load the environment variable when its process start (before the updates installation process) and therefore the updated value of the env variable won't be available.

Therefore, unfortunately when the install location of your application is changing from old to new version the "Restart always" flag will be pointless.

Thank you for your understanding.

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

Return to “Building Installers”