Best method to combine two MSI files - 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!

msi_user
Posts: 4
Joined: Tue Sep 01, 2009 1:26 pm

Best method to combine two MSI files

I've had a look around and I can't find the best method for this. I have two MSI files, one is vendor supplied and cannot be modified, the other is a MSI file I have created with Adv Installer that makes a couple of customisations, by updating a two files. I have tried a chained install, and due to the Windows Installer 4.5 pre-req it's not an option. What would be the best way to accomplish this using one MSI file?
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Best method to combine two MSI files

Hi,

You have the following options:
1) you can use a custom action under the InstallFinalize phase in the second MSI to install the vendor supplied MSI. In the Execute Properties group you should select the "Asynchronous execution, do not wait for return code" radio button.

2) you can import the MSI file using the File -> Import -> Import MSI/MSM option.

3) you can try using the Prerequisites page. You can add the first MSI file to the Software Prerequistes tab and set the appropriate Install Conditions. This will make the package to install if it doesn't already exist on the target machine.

The other package, the one created with Advanced Installer, will be the main one. This is launched after the prerequistes(the first package) are installed.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
msi_user
Posts: 4
Joined: Tue Sep 01, 2009 1:26 pm

Re: Best method to combine two MSI files

Thanks for the reply. This is what I found.
Bogdan wrote: 1) you can use a custom action under the InstallFinalize phase in the second MSI to install the vendor supplied MSI. In the Execute Properties group you should select the "Asynchronous execution, do not wait for return code" radio button.
Using custom actions can I install the vendor supplied MSI before the main package?
Bogdan wrote: 2) you can import the MSI file using the File -> Import -> Import MSI/MSM option.
I've tried importing the vendor-supplied MSI, but the build is corrupt right after a default import.
Bogdan wrote: 3) you can try using the Prerequisites page. You can add the first MSI file to the Software Prerequistes tab and set the appropriate Install Conditions. This will make the package to install if it doesn't already exist on the target machine.
I tried this and it didn't install the prerequisite. After I added the prerequisite, Adv Installer ticked create .exe, which I deselected because I want an MSI, an EXE is not required.
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Best method to combine two MSI files

Hi,
Using custom actions can I install the vendor supplied MSI before the main package?
Yes, but only if you schedule the custom action under the InstallUISequence and not under the InstallExecute Sequence. Also in the Execute Properties group you should select the "Asynchronous execution, wait for return code at the end of the sequence" radio button.
ve tried importing the vendor-supplied MSI, but the build is corrupt right after a default import.
Please note that the import features in Advanced Installer (the Repackager, the Import MSI feature etc.) are intended to be used to get a starting point for your installation package, not to completely reproduce other installation packages.
I tried this and it didn't install the prerequisite. After I added the prerequisite, Adv Installer ticked create .exe, which I deselected because I want an MSI, an EXE is not required.
Please note that to install the prerequisites it is required that you create an .exe package. This will first install the prerequisite(your vendor supplied msi) and after that extract and install the main package.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
msi_user
Posts: 4
Joined: Tue Sep 01, 2009 1:26 pm

Re: Best method to combine two MSI files

Thanks for your help so far. This feature seems to be the one that is most likely to get a good result:
msi_user wrote:Using custom actions can I install the vendor supplied MSI before the main package?
Bogdan wrote: Yes, but only if you schedule the custom action under the InstallUISequence and not under the InstallExecute Sequence. Also in the Execute Properties group you should select the "Asynchronous execution, wait for return code at the end of the sequence" radio button.
When I attempt to add a custom action to the InstallUISeqence section the options are greyed out (unavailable). Any idea why?
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Best method to combine two MSI files

Hi,

To be able to add a custom action under InstallUISequence you need to display at least one standard action from that tree. For example you can display Begin standard action like this:
-- right click InstallUISequence
-- Show Standard Action -> Begin

Now you can right click on Begin phase and add the custom actions you desire.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
msi_user
Posts: 4
Joined: Tue Sep 01, 2009 1:26 pm

Re: Best method to combine two MSI files

Bogdan wrote: To be able to add a custom action under InstallUISequence you need to display at least one standard action from that tree. For example you can display Begin standard action like this:
-- right click InstallUISequence
-- Show Standard Action -> Begin

Now you can right click on Begin phase and add the custom actions you desire.
When I do that the MSI options are unavailable. Only ".exe", ".vbs", etc are available.
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Best method to combine two MSI files

Hi,
When I do that the MSI options are unavailable. Only ".exe", ".vbs", etc are available
You do not need to use the MSI options. Please follow these steps:
-- add the vendor supplied MSI as temporary file in the Files and Folders page
-- use the steps I've given in the previous posts to display the MigrateFeaturesStates standard action
-- under it add a "Launch File or Open URL" standard action
-- in the Command line field add the reference to the MSI file like this(you can use the [Edit] button):

Code: Select all

 "[&Vendor_Package.msi]" 
This custom action will run the vendor supplied package first after which the installation of the main one will continue.

Please note that this option will work only if you use Full User Interface, if you will run the package with Silent UI the first one will not be installed.

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

Return to “Common Problems”