Problem: Launch application at the end of installation - 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!

ales.hrodek
Posts: 65
Joined: Mon Jun 11, 2012 11:40 am

Problem: Launch application at the end of installation

I found that my application behave different when executed from installer and after exit setup. After investigation I found issue partly in Windows.

I have prerequisite SQL Server. When application is first time executed there are scripts to run. For executing scripts we use osql/sqlcmd.
Option 1) Application is installed and user close setup. Then run application shortcut and everything is working perfecly
Option 2) Application is installed and user Run application from setup. Scripts can't be executed !!! (osql/sqlcmd is not found)

Issue is environment variables (PATH). In Windows variables are read when process starts. When I run application directly from setup %PATH% value is without changes applied by SQL Server installation. I was surprised "Launch application at the end of installation" does not behave same like launch application by shortcut. I think this should start new process and not continue in existing one (idea: send system message to execute application and then close setup). Because I don't know how it works internally could you give me some workaround ideas. Have a possibility to run application immediately from setup is recommended for our users because we have same essential functionality integrated in application.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Problem: Launch application at the end of installation

Hello,

We are aware about this limitation and our development team already start working on it. We have added this improvement on our TODO list and it will be available in a future version of Advanced Installer.

Until then, as a workaround, you can create a custom action which will propagate the installation changes to the environment variables. Also, the custom action should be scheduled after "Install Execution Stage" -> "Finish Execution" action group. Please take a look on "How to propagate environment variables to the system" article.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ales.hrodek
Posts: 65
Joined: Mon Jun 11, 2012 11:40 am

Re: Problem: Launch application at the end of installation

Thank you. I knew that you must have some trick to deal with this issue.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Problem: Launch application at the end of installation

You're welcome. Glad to help.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
damien.epiphany
Posts: 3
Joined: Mon Oct 29, 2012 3:17 am

Re: Problem: Launch application at the end of installation

Hi, I'm having this issue too, and +1 the fix asap.
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Problem: Launch application at the end of installation

Hi,

Unfortunately the fix that my colleagues mentioned above applied to another similar problem, caused by us, when you were using Enhanced UI. We fixed that, but unfortunately it is not related to this OS limitation so it is not relevant to you. I apologize for the mix up.

Unfortunately, as ales. hrodek said, this is an OS limitation, regarding the reading of the list of variables, and we have no solution inside Advanced Installer for it at this moment.

A workaround would be to configure your application to receive the required paths as command line parameters, and set them from Advanced Installer, in the "Arguments", or "Action Data", field based on the method you have used to launch the application. Also, your application should be configured to list these parameters as optional, i.e. if they are not set from the command line than it will work as it did until know, by using the environment variables from the machine. Would this work for your scenarios?

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
damien.epiphany
Posts: 3
Joined: Mon Oct 29, 2012 3:17 am

Re: Problem: Launch application at the end of installation

Hi,

So the problem I'm having is that one of my prerequistes is adding a new path to the %PATH% environment variable, which holds a dll my application needs. At the end of the install when the app runs from the install program it fails to run as it's process hasn't seen this new path yet, but running it via Start menu etc afterwards its ok then. The above link to the MSDN site won't help me as it looks like code and I don't want to write a one line app just for that.

So are you saying that there is no solution at the moment (I am using enhanced UI)?
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Problem: Launch application at the end of installation

Hi,
So are you saying that there is no solution at the moment (I am using enhanced UI)?
I'm afraid yes, it does not matter if you are using Enhanced UI or not.

The bug we fixed for packages using Enhanced UI was for environment variables created by your package, i.e. the one using Enhanced UI. The problem you
are encountering is different and it applies to both packages using Enhanced UI or not.

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

Return to “Common Problems”