VolkerM
Posts: 1
Joined: Fri Jul 01, 2016 12:02 pm

Update with Auto Restart: Working Directory not set properly?

Hi all,

our application is reading initial settings from a configuration file in the working directory (where the executable resides). After an update with "auto restart" this configuration file is not found, what makes me believe that "auto restart" is not setting the applications working directory properly. Or maybe I miss something here?

Did anybody else had similar problems and found a workaround or a setting that I am missing?

thanks and regards
Volker
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Update with Auto Restart: Working Directory not set properly?

Hello Volker,

If you are using the "Restart Always" option from your updates configuration project -> Updates page -> Auto Close Application tab", then indeed this is a limitation of our Updater. We do not set the working directory to the parent folder of the launched application. I've added this improvement on our TODO list and hopefully it will be available in a future version of Advanced Installer. Thank you for your suggestion. We will notify you when the improvement will be out.

Until then, as a workaround you can try to close and restart the application from your upgraded setup package. For instance you can use a "Launch file" custom action to launch the application at the end of the installation.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
senthilkumar
Posts: 7
Joined: Mon Jan 30, 2017 11:08 am

Re: Update with Auto Restart: Working Directory not set properly?

Hi Daniel,
Until then, as a workaround you can try to close and restart the application from your upgraded setup package. For instance you can use a "Launch file" custom action to launch the application at the end of the installation.
Our product is an Office add-in and the same can be auto-updated from Outlook, Work, Excel or PowerPoint. Our requirement is to restart the source application, where the update was triggered. Say, if the auto update happens from Outlook, I need to restart only Outlook and not other applications. So, the path of the executable/process to be closed/restarted is dynamic. In this case, how should I handle? Is there a way out to pass the path dynamically? It is not possible to identify the source application from custom action; so, I rule out that option.

It's urgent please.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Update with Auto Restart: Working Directory not set properly?

Hello,
Our product is an Office add-in and the same can be auto-updated from Outlook, Work, Excel or PowerPoint. Our requirement is to restart the source application, where the update was triggered. Say, if the auto update happens from Outlook, I need to restart only Outlook and not other applications. So, the path of the executable/process to be closed/restarted is dynamic. In this case, how should I handle? Is there a way out to pass the path dynamically? It is not possible to identify the source application from custom action; so, I rule out that option.

It's urgent please.
Unfortunately, we don't have Updater support for this kind of scenario. Maybe we will add an Updater proprietary command to specify the application path (to be restarted after updates installation) at Updater run time. Thank you for your suggestion.

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

Return to “Common Problems”