About organization features and components in a merge module - 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!

mat_bruges
Posts: 33
Joined: Tue Mar 11, 2008 12:28 am

About organization features and components in a merge module

Hi,

I want to distribute my software as a merge module so that partners and other developers that rely on it can distribute it in their setups.

It turns out that there are a lot of restrictions in merge modules:
- I can not reference another merge module
- I can not create features

The reason I wanted to use features is because I am deploying 2 versions of my software: one for .Net 1.1 and another for .Net 2.0. They both need to be installed, but only 1 of those will be active (i.e. will have the shortcuts pointing to it, will have a service set up etc..) I do not want to split this up into 2 separate installs, because most users don't know which version of .Net they have on their machine, and I want to make it as easy as possible for them and let my setup make the choice. (they are not compatible so the 1.1 assemblies do not run on the 2.0 CLR and vice-versa)

In order to detect which version of .Net will be active, I will have to put a condition on almost all of the components. I do not want to specify this condition (which could be fairly complex) manually on each and every component. That's why I wanted to organise them into a .Net 1.1 feature and a .Net 2.0 feature. Then I would only have to apply the condition on those 2 features and that would be done.

Since creating features is apparently not supported in a merge module, I tried to move all the files into the same component using drag and drop (is there an easier way to do this, because there are hundreds of files and this is very time-consuming?).

This appeared to work at first, but the I started to get this error when trying to add files from a different target folder: "The file you are trying to move should be key member in its component and in the new component it will not be key member! Are you sure you want to move it?"

What does that mean? Is this going to cause problems if I answer "yes"?

Is this the best approach for what I am trying to do, or will I run into further problems if I continue with the merge module?

Would it be better if I created this as a professional or enterprise project? If I do that though, will my partners still be able to distribute my software setup in their own setup?

Thanks

Mat
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,
Since creating features is apparently not supported in a merge module, I tried to move all the files into the same component using drag and drop (is there an easier way to do this, because there are hundreds of files and this is very time-consuming?).
You cannot create features in a merge module because a merge module represents a part of an installation. Basically, the entire merge module is a feature.

Also, when you add the merge module to a MSI package, you will add it under a feature. Therefore, the feature in the MSI will contain all the components in the merge module.

If you need multiple features in a merge module, the only solution is to use different merge modules (one for each feature) and add them under different features in your MSI.

An easier way of conditioning a large number of components is this:
- go to the "Organization" page of your merge module project
- select the feature
- press SHIFT+F4
- in the "Search Result" window which appears select all the components
- right-click them and set the "Condition" field

This way, you will set the same conditions for all the components you selected.
"The file you are trying to move should be key member in its component and in the new component it will not be key member! Are you sure you want to move it?"

What does that mean? Is this going to cause problems if I answer "yes"?
By default, Advanced Installer generates the components in your package by following the Windows Installer rules. If you modify the default structure, some problems may appear in some cases.

A key member is used like this:
- it is used to identify its component
- if it is deleted (after the installation), a repair of this component should be triggered automatically (this doesn't always work)

I'm not sure if moving a key member to another component will cause any problems because this varies from case to case. However, you should make sure that when you do this, you respect the Windows Installer rules:
http://msdn2.microsoft.com/en-us/librar ... S.85).aspx
Is this the best approach for what I am trying to do, or will I run into further problems if I continue with the merge module?
I'm not sure if this is the best approach for you, this can be decided only by you and your company. However, it would be recommended that you conditions all the components, not move all resources into one component.

Another approach for what you need to do is to build complete MSI packages. This way you can use features and all the other benefits. Also, your partners can use the MSI package as a prerequisite for their packages.

Also, you can try the approach with multiple merge modules (one for each feature you implement) and give your partners instructions on how to condition them.
Would it be better if I created this as a professional or enterprise project?
Please note that a Professional or Enterprise project allows you to build installation packages, not merge modules. However, you require an Enterprise license in order to be able to create merge module packages.
If I do that though, will my partners still be able to distribute my software setup in their own setup?
The Advanced Installer license gives you full control over the packages you create with Advanced Installer (basically, you own the packages). After you create some merge modules (for example), you can do anything you want with them (for example, give or sell them to your partners so they can use them).

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mat_bruges
Posts: 33
Joined: Tue Mar 11, 2008 12:28 am

Thanks Cosmin.

I did not know I could apply the same condition to multiple selected components. I'll give that a try..

Regards

Mat

Return to “Common Problems”