delay when launching application at end of install - 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!

toddpatt
Posts: 111
Joined: Fri Jan 08, 2010 1:36 am

delay when launching application at end of install

G'day,

I'm using AI 7.6 build 27499

I have enabled the "Launch application at the end of installation" option on the ExitDialog,
- Application: [#MyApp.exe]
- Arguments: <null>

This functionality is working fine, but there is a significant delay between clicking "Finish" (on the ExitDialog) and when our application finally starts. I know the obvious answer is "well, your application must be doing a lot of things when it is launched, so that's why it is slow". However, when I launch our application from the Desktop shortcut (after installation is complete) it is very fast to load.
- launched from ExitDialog: average time to load is 5-15 secs
- launched from shortcut: average time to load is 1-3 secs

The other obvious answer is "your application must be doing several things on 'first run' / 'first launch' that causes this behavior". However, that is not the case. I have checked the code and verified that we have no special behavior for "first run". Also, if deselect the the "Launch MyApp" checkbox on the ExitDialog, finish the install, and then run for the first time from the shortcut, it is very fast to load.

The reason this is a concern is because after users click the "Finish" button on the ExitDialog, the install exits and then nothing is shown for N secs until the application starts. I tried adding a splash screen to see if that helped, but it did not - there is still a significant delay between finishing the installer and loading the splash-screen.

I have enabled verbose logging. Here is everything that happens *after* the "Finish" button is clicked:

Action ended 15:19:47: ExitDialog. Return value 1.
MSI (c) (B8:80) [15:19:47:078]: Doing action: AI_LaunchApp
Action 15:19:47: AI_LaunchApp.
Action start 15:19:47: AI_LaunchApp.
MSI (c) (B8:A8) [15:19:47:078]: Invoking remote custom action. DLL: C:\DOCUME~1\<TheUser>\LOCALS~1\Temp\MSI9C.tmp, Entrypoint: LaunchApp
Action ended 15:19:47: AI_LaunchApp. Return value 1.
MSI (c) (B8:80) [15:19:47:171]: Doing action: ExitDialog
Action 15:19:47: ExitDialog.
Action start 15:19:47: ExitDialog.
Action ended 15:19:47: ExitDialog. Return value 1.
MSI (c) (B8:80) [15:19:47:171]: Doing action: AI_CleanPrereq
Action 15:19:47: AI_CleanPrereq.
Action start 15:19:47: AI_CleanPrereq.
MSI (c) (B8:BC) [15:19:47:203]: Invoking remote custom action. DLL: C:\DOCUME~1\<TheUser>\LOCALS~1\Temp\MSI9D.tmp, Entrypoint: CleanPrereq
Action ended 15:19:47: AI_CleanPrereq. Return value 1.
MSI (c) (B8:80) [15:19:47:234]: Doing action: ExitDialog
Action 15:19:47: ExitDialog.
Action start 15:19:47: ExitDialog.
Action ended 15:19:47: ExitDialog. Return value 1.
MSI (c) (B8:E8) [15:19:47:250]: Destroying RemoteAPI object.
MSI (c) (B8:9C) [15:19:47:250]: Custom Action Manager thread ending.
=== Verbose logging stopped: 5/4/2010 15:19:47 ===

According to the log, the total time spent here is less than 1 second. However, we are still observing a significant delay before our app actually starts. This behavior happens on multiple machines, using WinXP with various hardware configurations. Meaning, it is not a machine-specific problem.

Any insight or suggestions you can offer would be appreciated. Thanks!
-Todd
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: delay when launching application at end of install

Hi Todd,

It might be related to the working directory for your application. Try creating your own functionality for running the application at the end of install, meaning:
- create another checkbox
- create an Exe with Working Dir custom action to launch your application
- create a DoAction event on the Finish button to start the Exe with working dir custom action previously created. Condition it to run when the checkbox you created is ticked.
- make sure you set a proper working directory for your custom action.

The above steps might fix the issue.
Please let me know how this went.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
toddpatt
Posts: 111
Joined: Fri Jan 08, 2010 1:36 am

Re: delay when launching application at end of install

Hi Gabriel,

I followed your steps and used the How do I execute a custom action when a button is pushed tutorial for some extra help.

Everything worked fine and my application was launched properly, but the behavior was the same. After further investigation and testing, this lag / delay seems to be a problem within our application and its initialization sequence.

Sincere apologies for wasting your time!

Thanks very much for the help,
-Todd

Return to “Common Problems”