exclude dll in msm from msi - visual-studio-2010

I have a .MSI installer project created in vs2010. This .MSI includes many *.msm (merge module file). Is there a way to select specific *.msm based on different windows platform(ex: xp, win7, vista..)during installation?
For instance, if the target platform to install this .MSI is winXP, my .MSI will know what .msm to choose instead of choosing all .msm during installation.
BTW, is there a way for .MSI to access a specific *.dll which resides in .msm ? Again, for instance, if the .MSI project includes a .msm and this .msm includes many *.dll, is there a way to select a specific *.dll in .msm during installing this .MSI ?
my main purpose is to have my .MSI knowing what .dll/.msm to use under different windows platform during installing my .MSI.

What you basically need is to assign each merge module to a new feature and set install conditions on that feature. I don't think this is possible with VS 2010 however, but there are some commercial setup authoring tools that can do it.

Merge modules (.msm) are similar in structure to a simplified Windows Installer file (.msi). A merge module cannot be installed alone, it must be merged into a .msi file. The best alternative is to obtain a freely distributed merge tool or purchase one of the merging tools available from independent software vendors. You can then use the functionality provided by Mergemod.dll.
The intended use of merge modules was to provide a standard method for developers to deliver shared Windows Installer components and setup logic to their applications. Merging is therefore something typically done by the author of the installation package prior to deployment. Trying to determine and perform the correct merge when the application is being installed does not seem like the best approach.
You could instead create a separate .msi for each target platform. Merge the appropriate .dll into each package. Then include logic in your setup application to check the user’s system and then install the correct package.
As was suggested by the previous answer, you could merge all the .dlls into a single installation package which you have authored such that the installation of certain features and components are conditional upon Operating System Property Values .
You can consider Using Transitive Components in your package. The typical use for transitive components is to prepare a product to reinstall during a system upgrade. The author of the installation package specifies those components that need to be swapped out during a system upgrade as having the transitive attribute. When the user later upgrades the system, the product must be reinstalled. Upon this reinstall, the installer removes the earlier components and installs the later components, without having to install the entire product. This might serve your scenario well if you expect your users to upgrade their systems.

Related

What files do I need to distribute as an alternative to MS Visual C++ 2005 ATL merge modules?

Currently I'm distributing a software product that includes three merge modules:
Microsoft_VC80_CRT_x86.msm
ATL.msm
policy_8_0_Microsoft_VC80_ATL_x86.msm
Some customers use packaging technology that doesn't like these MSM files (I think because they have technical problems with them writing to WinSxS). Can I just distribute the dll files directly into my application's Program Files folder, and if so which dlls do I need? Is it just atl80.dll?
Your alternative is to run the VC_redist.exe for that version of Visual Studio, run it from the bootstrapper with whatever setup tool you're using.
I don't know what you mean about packaging technology. The only way merge modules (msm files) can be installed is to add them at build time to an MSI file build. In other words, the only packaging technology that's relevant is Windows Installer and MSI files. So you need to find out exactly what this issue is. Everyone uses the merge modules or the VC_redist.exe because it's the only reliable thing to do.
One issue with doing it yourself in an unofficial way is that Windows Update can't find them (and that applies to static linking to). So when Microsoft applies a security fix to those Dlls then you are leaving your customers vulnerable.

How to create an Installer for multiple applications

My problem is the following:
I have multiple applications that I want pack in one installer so when the user runs it, they will be installed automatically instead of installing or copying each single application.
I have a program that's already a setup file (.exe) and two .exe files which can be executed manually and do not need an installation. So what I want is:
Build an installer so when the user opens it - the .exe file of the setup program gets installed and the other applications which dont need to be installed will be copied somewhere in a path.
Whats the best solution?
I think you need a packaging programs to create an installation package, such as:
AdvancedInstaller
InstallShield
InstallAnyware
The first two of them have a freeware version. Maybe you can see if the required features are available in the freeware version.
I would suggest Advanced Installer (allows easy chaining of installs) if you have no significant deployment experience. Otherwise I would suggest Wix and its "Burn" feature (ability to chain installers in sequence). Please read the following answers for context:
What installation product to use? InstallShield, WiX, Wise, Advanced Installer, etc
Windows Installer and the creation of WiX
Wix to Install multiple Applications
Read this if you want to get going with Wix quickly

WIX UI Installer Project in Visual Studio, Now Mange Updates?

I have a fresh WIX UI Install project in VS which compiles down into an MSI. Everything is working great with it.
It installs/uninstalls the files I want successfully. For example, it drops 3 DLLs into a Program Files folder, installs a Windows Service, and GAC's a DLL.
Now let's say I install on this in a given environment. Then one of our DLLs change and we need to upgrade this install without affecting other files already installed (such as the service) So my thought would be I would need a patch/upgrade MSI that would target that one DLL and just overwrite that particular file.
What is the simplest way to accomplish this? Do I need VS projects essentially for each patch/update MSI? Below is my current 2 WIX related projects (installer + custom action)
For updating just the DLL a patch is recommended. Visual Studio doesn't support patches, but you can try using WiX: http://wix.sourceforge.net/manual-wix2/patch_building.htm
Please note that patches have some restrictions: http://msdn.microsoft.com/en-us/library/aa367850(VS.85).aspx
A MSI which overwrites just one file is a bad mistake because you are not using the Windows Installer update mechanism.
If you want a MSI, it will have to be a major upgrade. A major upgrade will automatically uninstall the old version before installing the current one.

I need a WIX Bootstrapper Project that installs MY software and prerequisites

Greetings!
I have a solution in VS2010 that defines 3-4 individual applications.
These 3-4 apps are individual (but related) components that I need to have individually installed on our production servers during deployment. I toyed with using WIX mondo to generate a multi-feature WIX installer, but found that it would be more beneficial to allow that these applications be able to be installed individually as well as via a single-source for all of them, preferably configurable to choose which to install during an installation.
I noticed that there is a WIX project type called "Bootstrapper Project" but I cannot find much documentation around it on the web, and do not know if it is a project type that will actually assist me in creating a deployment installation bootstrapper for my projects. (i.e. a setup.exe file that will install, one after the other, each project as either defined in the installer, or optionally selectable via the installer as it runs)...
what is the best method to do this within WIX, using pre-existing WIX installers for individual programs?
In Wix, the support to create a bootstrapper is through a tool called "Burn". Burn has been pushed out to v4.0 (or version 3.6). So that isn't much help.
You can use an open source tool like dotNetInstaller: http://dotnetinstaller.codeplex.com/
Here is an overview on how to create a setup installer that checks for the .NET Framework (which in and of itself is not very useful, but shows you how to work with dotNetInstaller):
http://www.lostechies.com/blogs/gabrielschenker/archive/2010/05/19/creating-a-bootstrapper-with-dotnetinstaller.aspx
Or you can follow the instructions here: http://msdn.microsoft.com/en-us/library/ms165429(v=VS.100).aspx
And use the Bootstrapper Manifest Generator here (although there appear to be 64-bit issues): http://code.msdn.microsoft.com/bmg

How to upgrade from a .msi installer to a .msm for new version?

Say I have a component which is made up of a bunch of DLLs. And the component was released using a .msi installer for several versions.
Now, we need it to be a .msm so that it can be included in other msi installers. So we need to build a merge module that can upgrade from .msi installations.
How to do that? Or it cannot be done?
We are using Wix.
As long as you maintain the same GUIDs and set the components to be shared then it should be possible to move the components into a MSM instead. The MSM will just cause the components to be included into the installers it is included in the same as if the components had been added to the installer so it's more like just copying the components into several installers.
Granted I haven't tried out any of this, only had to the reverse of fixing a mistake when multiple installers shared GUIDs for components when i did not want that behavior.

Resources