Launch attached file with resource - Advanced Installer Community
spearsp
Posts: 9
Joined: Thu Nov 14, 2013 2:28 pm

Launch attached file with resource

I have an executable that needs to be executed as part of the installation process. The executable requires an external resource file, that needs to be included in the installation somehow. After the executable has finished executing, I need to display a few more custom dialogs. The executable is a database synchronisation tool, and the resource file it requires is an XML representation of the database at the time of the build. Once the database has been brought up to date, the user can then write some initialization settings to the database using the dialogs that follow.

I have tried tackling this from two directions, with varying degrees of success but neither really doing what I want.

First, I tried doing this all in the setup process, between the Welcome screen and the Progress dialog. I created a "Launch attached file" non-sequenced custom action, and called the action on the database configuration dialog. The application launched fine, but the resource file was not available so it could not continue.

Then I managed to get a dialog between the progress dialog and the exit dialog, by adding a new sequenced dialog after the Progress dialog - this seems to be the only way to get anything between progress and completion. Not ideal, but I can live with it. I then included the executable and its resource file into the Common Files feature, and changed the custom action to "Launch installed file". This does something wierd. After the progress dialog, I get the new dialog, which is currently empty. Click Next, and the database configuration dialog comes up. Spot on. Click on the button to launch the database updater, and it jumps to the Exit screen. Click on Close on the exit screen, and nothing happens. Click on Close another 2 times, and the database updater appears, with its resource file intact. Cancel out of the database updater, and it returned to the database configuration screen. Click on the Configure button again, and this time the updater launches immediately without doing anything funny.

This is bizarre. I can't see why it is jumping to the exit screen. This is the ideal place to do the settings, after installation but before completion, preferably without the redundant in-sequence dialog but I can do something clever with that, but I'm hoping you can guide in the right direction to get this fixed. I have reproduced this same behaviour using "Launch attached file" and using a different executable, with the same results.

I have attached the .aip file. Please let me know if there is any further information you require.

Thanks,
Peter
Attachments
License Maestro.aip
(44.08 KiB) Downloaded 338 times
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Launch attached file with resource

Hi,
First, I tried doing this all in the setup process, between the Welcome screen and the Progress dialog. I created a "Launch attached file" non-sequenced custom action, and called the action on the database configuration dialog. The application launched fine, but the resource file was not available so it could not continue.
In order to have the file available throughout the installation, you can go in the Files and Folders page and add it as a temporary file using the [Temporary Files] toolbar button.
Then I managed to get a dialog between the progress dialog and the exit dialog, by adding a new sequenced dialog after the Progress dialog - this seems to be the only way to get anything between progress and completion. Not ideal, but I can live with it. I then included the executable and its resource file into the Common Files feature, and changed the custom action to "Launch installed file". This does something wierd. After the progress dialog, I get the new dialog, which is currently empty. Click Next, and the database configuration dialog comes up. Spot on. Click on the button to launch the database updater, and it jumps to the Exit screen. Click on Close on the exit screen, and nothing happens. Click on Close another 2 times, and the database updater appears, with its resource file intact. Cancel out of the database updater, and it returned to the database configuration screen. Click on the Configure button again, and this time the updater launches immediately without doing anything funny.
This behavior is encountered because of an Advanced Installer limitation, however as a workaround you can try the steps below:
- go in the Dialogs page add a "New Dialog In Sequence" before the "ExitDialog" dialog
- go in the Custom Actions page, select the added dialog from the "Finish Dialogs Section" and set a false condition for it (i.e. 1=2)
- if you want to get rid of the "dialog in sequence" that is added under the "ProgressDlg" dialog, you can remove it from the Dialogs page
- build and run the project

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
spearsp
Posts: 9
Joined: Thu Nov 14, 2013 2:28 pm

Re: Launch attached file with resource

Thanks, Eusebiu
This behavior is encountered because of an Advanced Installer limitation, however as a workaround you can try the steps below:
- go in the Dialogs page add a "New Dialog In Sequence" before the "ExitDialog" dialog
- go in the Custom Actions page, select the added dialog from the "Finish Dialogs Section" and set a false condition for it (i.e. 1=2)
This didn't do quite what I was expecting: It bypasses the dialog and any dialogs following it completely, and finishes the installation. After playing around with it a bit further, it seems that a reasonable workaround is to have only in-sequence dialogs after the installation has been completed, or at least to have any out-of-sequence dialogs sandwiched between two custom in-sequence dialogs. However, I'm not sure what unknowns remain down that path, and the temp files solution is working well so I'm taking the route of using the temp folder for these.

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

Re: Launch attached file with resource

Hi Peter,

I also think that using the temporary files method is more suitable and it is also used in most similar cases.

Just let us know if you have any other question.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Launch attached file with resource

Hello,

This was fixed in version 11.0 of Advanced Installer released on March 13th, 2014.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”