RobertvanderHulst
Posts: 22
Joined: Wed Mar 04, 2009 4:09 pm

Including MSM or MSI files and not uninstalling them

My installation package includes some MSM and MSI files that need to be installed as resources on the users machine
(Our product is meant for developers, that will also have to build installers). The files contain runtime files for our product.

I also want to install these runtime components on the target machines, but they should not be uninstalled with the product when a new version of our product is installed
(to make sure that EXE files and DLL files that were created by our users which require an older version of our product, will still work).

I am seeing the following problems:
- when I include the MSMs as Merge Module requirement and also as Resource under Files & Folders they seem to be included in the installer twice.
- when I include the MSIs as Chained Package and also as Resource under Files & Folders they seem to be included in the installer twice too.
- In both occasions the contents of the MSMs and the MSIs are uninstalled when my product is uninstalled. I do not want that.

I have two questions:
1. Can I avoid including the files twice in the package
2. How can I prevent them from being uninstalled.

Robert van der Hulst
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Including MSM or MSI files and not uninstalling them

Hi Robert,
when I include the MSMs as Merge Module requirement and also as Resource under Files & Folders they seem to be included in the installer twice.
Adding the MSMs in "Merge Modules" page will make Advanced Installer merge them with the main installer. If you just want to copy them on the target machine, add them only in the "Files and Folders" page.
when I include the MSIs as Chained Package and also as Resource under Files & Folders they seem to be included in the installer twice too.
Adding MSI files as chained packages will make Windows Installer launch them after your main installation. If you just want to copy them on the target machine, add them only in the "Files and Folders" page.
In both occasions the contents of the MSMs and the MSIs are uninstalled when my product is uninstalled. I do not want that.
I'm not sure I understand what you need to do with the MSM and MSI files. Do you want to install them or just copy them on the target machine?

If you are just copying them, you can mark their components as Permanent in the "Organization" page. If you want to install them, here's what you can try:
- add the MSI files as prerequisites so they are not removed when you product is uninstalled
- modify the merge modules to use Permanent components

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
RobertvanderHulst
Posts: 22
Joined: Wed Mar 04, 2009 4:09 pm

Re: Including MSM or MSI files and not uninstalling them

Cosmin,

cosmin wrote:
when I include the MSMs as Merge Module requirement and also as Resource under Files & Folders they seem to be included in the installer twice.
Adding the MSMs in "Merge Modules" page will make Advanced Installer merge them with the main installer. If you just want to copy them on the target machine, add them only in the "Files and Folders" page.
when I include the MSIs as Chained Package and also as Resource under Files & Folders they seem to be included in the installer twice too.
Adding MSI files as chained packages will make Windows Installer launch them after your main installation. If you just want to copy them on the target machine, add them only in the "Files and Folders" page.
In both occasions the contents of the MSMs and the MSIs are uninstalled when my product is uninstalled. I do not want that.
I'm not sure I understand what you need to do with the MSM and MSI files. Do you want to install them or just copy them on the target machine?

If you are just copying them, you can mark their components as Permanent in the "Organization" page. If you want to install them, here's what you can try:
- add the MSI files as prerequisites so they are not removed when you product is uninstalled
- modify the merge modules to use Permanent components
My installer installs a development language. I need to both copy the MSM files and MSI files to the users machine (so they can include them in their products) and I also need to install them on their machine.

I did not know about the 'Permanent' flag. That will help me to leave the MSM and MSI files on their machines.

I also tried to include our MSI files as prerequisite, but I noticed that these file are then included twice in the setup exe. Can that be avoided (it adds an extra 4 Mb to our 43Mb installer). In other words: can I run a prerequisite from a file that is already included as resource ? Or do I need a custom action to do that ?

Robert
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Including MSM or MSI files and not uninstalling them

Hi Robert,

You could work around this by adding your msi only as a prerequisite. Then, on the Media page->Bootstrapper tab use the path found in the "Extract location" field inside a custom action that manipulates the prerequisite wherever you need it: copies it, launches it etc. If you need it copied, you could try using a File Copy Operation to copy it from the extract location to wherever you need it.

Let me know if this helpes.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
madnik7
Posts: 6
Joined: Sun Aug 21, 2011 1:47 am

Re: Including MSM or MSI files and not uninstalling them

Hi
I have same issue, i need to
    • Install some msi as a prerequisites
madnik7
Posts: 6
Joined: Sun Aug 21, 2011 1:47 am

Re: Including MSM or MSI files and not uninstalling them

Hi
I have same issue, i need to
1) Install some msi as a prerequisites
2) Install the same msi as a file in target marchine
3) I don't want to add those huge msi twice (in both prerequisites and in file and folders)

I tried to copy the prerequisites to target machine with File Copy Operation and SOURCEDIR but the issue raised when I use single exe bootstrapper, my problem is that bootstrapper does not extract prerequisites when the prerequisites already installed so there it is not possible to copy prerequisites files to target machine as resource. there is no options in prerequisites to force the single exe bootstrapper always extract prerequisites without install them again.

So how can I copy the prerequisites to target machine as file and folder if they already installed on my developer user machine?
Bogdan
Posts: 2792
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Including MSM or MSI files and not uninstalling them

Hi,

What you try is one of the following solutions:

1) is to set your prerequisite to an URL, so it is not include in the package, but download and launched automatically from the specified URL.
This requires that your users have an internet connection when installing the package.

2) You can add the prerequisite as a normal file in Files and Folders page and then install it as a "prerequisite" at the end of the install process, using custom actions.
The following article presents how to use custom actions for installing your MSI. You just need to modify to use the path of your installed file, not a temporary one.

Also, you will need to create searches in Search page, to determine if the prerequisite is already installed, therefore if you launch or not the custom action.

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

Return to “Common Problems”