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!

jstuardo
Posts: 88
Joined: Mon Nov 09, 2015 10:44 pm

Problem launching an external installer when a feature was selected

Hello,

I need to run a setup program when user selects to install certain feature. Call that feature "A".

Well... The external installer has several installation files whose entry point is "setup.exe". I have created a new folder inside Windows Volume\Temporary. Inside that new folder, I copied all installation files.

Finally, I have created a custom action as "Launch Installed File"... then, I selected the file setup.exe saved previously in temp folder. In the "Execute Stage Condition", I checked "Install" and in condition I wrote: "(&A = 3) AND NOT (!A = 3)".

The result: nothing happen when I run the installer, even if "A" feature was selected.

Any help will be apreciated.

Thanks
Jaime
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Problem launching an external installer when a feature was selected

Hello Jaime,

First of all, please keep in mind that, unlike Advanced Installer's regular files or resources, "Temporary Files" are copied on the target machine at the beginning of the installation and are deleted at the end of it, ensuring you have access to them throughout the entire install process. They are copied during the CostFinalize standard action, at the beginning of the setup and removed during the InstallFinalize standard action.

With that being said, you should place your custom action between "Paths Resolution" and "Finish Execution" action groups ("Custom Actions" page --> "Install Execution Stage")

Now, in what regards your scenario, I would suggest another approach. Instead of the "Launch Installed File" custom action, you could use the "Launch File" custom action configured as it follows:

-File to launch: [&setup.exe]

-Execution Time: Immediately

-Execution Stage Condition: Uncheck the "Uninstall" and "Maintenance" and set the condition as it follows:

Code: Select all

(&A = 3) AND NOT (!A = 3)
Also, in what regards the feature selection, you could use (if you are not already using) our predefined "OptionalFeatsDlg". To add this dialog to the dialog sequence, simply go to "Dialogs" page and press on the "Add Dialog" button from the toolbar and then select "OptionalFeatsDlg"

Please let me know if this helps.

Kind regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jstuardo
Posts: 88
Joined: Mon Nov 09, 2015 10:44 pm

Re: Problem launching an external installer when a feature was selected

Hello...

thanks for your reply, however, it did not work.

First of all, if I write [&setup.exe] in "File to launch", system tells that this is an invalid identifier. So I ricght click on the field and then, select "File" in the popup menu. Then, I choose the setup.exe file in Temp folder. After that, this is written in "File to launch" field: [#setup.exe]

Please see attached filed showing the actual scenario: Files and Folders, Organization and Custom Actions.

Actual feature is called "ARH".

Regards
Jaime
Attachments
feature selection.png
feature selection.png (85.49 KiB) Viewed 8071 times
jstuardo
Posts: 88
Joined: Mon Nov 09, 2015 10:44 pm

Re: Problem launching an external installer when a feature was selected

It seems other files were not uploaded correctly.
Attachments
custom action.png
custom action.png (42.23 KiB) Viewed 8065 times
feature selection.png
feature selection.png (85.49 KiB) Viewed 8065 times
jstuardo
Posts: 88
Joined: Mon Nov 09, 2015 10:44 pm

Re: Problem launching an external installer when a feature was selected

feature selection.png
The other file.
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Problem launching an external installer when a feature was selected

Hello Jaime,

I am not sure why you are encountering such a behavior. I have tested this on a newly created project and everything worked as expected.

In order for me to further investigate this, can you please send me a copy of the .aip file and an installation log by e-mail at suppport at advancedinstaller dot com?

Kind regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jstuardo
Posts: 88
Joined: Mon Nov 09, 2015 10:44 pm

Re: Problem launching an external installer when a feature was selected

Hello...

AIP sent.

Regards
Jaime
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Problem launching an external installer when a feature was selected

Hello Jaime,

Few things that need to be noticed here:

1- Since the .EXE you are trying to deploy is an installer, we have to change the custom action sequence. To do this, please proceed as it follows:

- Go to "Files and Folders" page --> "Temporary" folder --> right click on your exe --> "Properties" --> "Do not remove file when setup ends".

- Now please drag and drop your custom action after the "Finish Dialogs Stage".

We are doing the steps above because during the "Finish Dialogs Stage", the temporary files are already deleted, thus we can not run the setup.exe. We also can not run the custom action before the "Finish Dialogs Stage" because two setups can not be installed simultaneously. This is a Windows Installer limitation.

2- Also, in the "File to launch:" field, you should have the following line:

[&setup.exe]

not

[#setup.exe]

Please let me know if that helps.

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jstuardo
Posts: 88
Joined: Mon Nov 09, 2015 10:44 pm

Re: Problem launching an external installer when a feature was selected

Hello,

I have sent a reply to this message but I have just realized that the message was not saved.

Well... I told you that your suggestions worked, however, a new problem occured.

When the external installer is launched, it is launched in background (behind Advanced Installer window). It appears in task bar, so user should notice that and click on the task bar icon to show the new installer execution.

Is there a way to start the new installer in foreground?

Thanks
Jaime
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Problem launching an external installer when a feature was selected

Hello Jaime,

Can you please try to pass the "/f" (without quotes) parameter to the "Command Line" field ("Custom Action" page) and see if that helps?

Kind regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”