[merge module] - File interaction with the MSI - 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!

Nico-D
Posts: 63
Joined: Mon Aug 18, 2008 2:34 pm

[merge module] - File interaction with the MSI

Hello,

I am currently integrating a MSM containing the "myApp.exe" file.

In the MSI including this MSM, I want to be able to launch "myApp.exe" at the end of installation, after http://www.advancedinstaller.com/user-g ... ation.html.

The problem is that I cannot access this file with a 'Browse...' button, and the interface do not allow me to set a fixed path. As the design of the MSI/MSM does not allow me to include "myApp.exe" inside the MSI, do you have any tip to make me launch "myApp.exe" at the end of the install?

Best regards,
-- Nicolas D.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: [merge module] - File interaction with the MSI

Hi Nicolas,

A solution would be to use a custom action inside the MSM to launch the file. This custom action can be scheduled under "InstallExecuteSequence" -> "InstallFinalize" standard action so the EXE is launched at the end of the install.

If you want to let the user decide if the EXE is launched or not, you can try this approach:
- in the MSI create a "Launch file or open URL" UI custom action which launches the EXE from the location in which it was installed
- use this custom action through a DoAction control event like explained in the how-to you mentioned

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Nico-D
Posts: 63
Joined: Mon Aug 18, 2008 2:34 pm

Re: [merge module] - File interaction with the MSI

Hi Cosmin,

Thanks for your reply and sorry for the delay.

Code: Select all

A solution would be to use a custom action inside the MSM to launch the file.
I am using this MSM inside several package, and intend to launch it automatically (without user permission) only in one package. If I define in the MSI that must launch the EXE a Property called LAUNCH_EXE = "Yes", can the CA inside the MSM understand to launch the EXE under the condition LAUNCH_EXE="Yes"?

Or will the MSM not be aware of the property "LAUNCH_EXE"?

Best regards,
-- Nicolas D.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: [merge module] - File interaction with the MSI

Hi Nicolas,
If I define in the MSI that must launch the EXE a Property called LAUNCH_EXE = "Yes", can the CA inside the MSM understand to launch the EXE under the condition LAUNCH_EXE="Yes"?
When it comes to custom properties, the merge module should use only properties defined in it (for example in the "Module Details" page). This is because the property needs to have the module GUID appended to its name. A solution would be to create a custom property in the merge module (LAUNCH_EXE) and set it to a default value ("No"). Inside the MSI you can set the custom property to the value which runs the custom action ("Yes").

You can set the property by using a "Property set with formatted" custom action. In the "Property Name" field of the "Custom Action Properties" page you can use the name of the property with the merge module GUID appended to it, for example:

Code: Select all

LAUNCH_EXE.73C95AB1_19D0_47F4_9A09_7F12116C116D
Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Nico-D
Posts: 63
Joined: Mon Aug 18, 2008 2:34 pm

Re: [merge module] - File interaction with the MSI

Hi Cosmin,

Thank you for your reply. I will try and I'll take you informed. It seems to be the best way to make it, thanks!

Regards,
-- Nicolas D.
Nico-D
Posts: 63
Joined: Mon Aug 18, 2008 2:34 pm

Re: [merge module] - File interaction with the MSI

Hi Cosmin,

I finally succeeded in launching once my application contained in the merge module. In fact, I did not succeeded in applying the method you explained to me.

I launched the application (which intended to open a proprietary file) by associating the file extension to the application (in the Registry menu), defining a CA in UI Custom Actions, and finally attach a DoAction to the Finish button of the ExitDialog.

Regards,
-- Nicolas D.

Return to “Common Problems”