cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Tim_Mayert
Level 9

Building 2 product installs from the same basic MSI project

I would just like some advice here.

We have this one product install using the IS 2009 basic MSI and now we have to make a small split to handle an OEM product.

So the install will be basically exactly the same except for maybe a component or two under a different feature.

So instead of creating 2 install project that are basically the same I figured I would look at generating a new release type with media files that will build in everything except for whatever is not suppose to be in that media build.

so I have this all done and I also figured that I would like this new release to have a different Product/Upgrade code so that they can remain seperate. Okay so far.

But now I want to make it so that if you install one of the products and then you try to install the other one that it will simply display a message stating you can not do that. So I went into the upgrade table and started adding checks in there for the other Upgrade code. I looked and figured that I needed one for Major Upgrades, ISPreventDowngrades as standard ones. But I needed to add the detections ones. I could set one up to detect the OEM one as I stated I force a new Upgrade Code, but the detection of the main one when I set that one up IS will complain the something already exists for that.

So is this a good way of going about adding for an OEM of our product using the same project, just different release media?

Also how do you go about setting up so that each will correct detect if the other exists on the machine during the install so that it correctly reports back to the user about the other product already existing on the machine?

Sorry for the longer description, but I am hoping someone has done this before and can give me some hints on this and the best way to do it.

Thanks,
Labels (1)
0 Kudos
(6) Replies
Lurean
Level 8

you can do a system search for a registry entry or a specific file placed by a given install, and then if it is found set the value of a property. Using that property in an install condition would allow you to prevent one installing if the other is present.
0 Kudos
gbaltazar
Level 6

Adding upgrade table entries is probably the best way to do this. Add an entry to detect the other ProductCode in each of your releases. Set the entries to detect-only and to set a specific property. Then, check for that property in the beginning of the installation.:cool:
0 Kudos
Tim_Mayert
Level 9

I would like to use the upgrade table, but it states to enter the Upgrade Code and not the Product Code. Can the Product Code be used here as well?
If it can then that would mean that everytime the Product Code gets updated, say to do a major upgrade then a new entry would have to be added to the upgrade table.

So this is what I did the first time. I have my main Upgrade Code and Product Code associated with my main media types. The initial entries in the Upgrade Table are MajorUpgrade and ISPreventDowngrade. These use the "Products sharing my Upgrade Code"

I then create the new release media section with forced Product and Upgrade Codes. I then tried creating a new Major Upgrade entry (MajorUpgrade2), but using the "Products having another Upgrade Code".

When I build the install project it will complain that there is a duplicate entry in the Upgrade table and it will state the MajorUpgrade. Looking at the Upgrade Table the MajorUpgrade entry will have {00000000-0000-0000-0000-000000000000} for the Upgrade Code and the other one will be the one that is the second media release upgrade code. So they look different, but I guess that when you build it will equate the second media release upgrade code as the same.

So am I entering the information wrong in the upgrade table or does this mean that I can not do it this way?
0 Kudos
Tim_Mayert
Level 9

Lurean wrote:
you can do a system search for a registry entry or a specific file placed by a given install, and then if it is found set the value of a property. Using that property in an install condition would allow you to prevent one installing if the other is present.


Thanks Lurean, but currently the only difference would be 1 file, which can be installed by some of our other product installs as well as all the registry keys would be the same. So the only real difference would be the Upgrade and Product Codes.

So I would have to only look for those in the registry, so basically the same change that the Upgrade table does. I would like to use the Upgrade table to do this, but at the moment it does not like the entries that I am making and therefore I may have to find the location in the registry where the upgrade code exists and use that in the Search.
0 Kudos
gbaltazar
Level 6

Hmmm...it looks like it may not be possible that way then. You may need to check the ProductCodes programatically, maybe by searching through the Uninstall key...
0 Kudos
Tim_Mayert
Level 9

Okay I think I have it working now from the Upgrade Table.

I thought that I had to create a 2nd Major Upgrade entry and 2nd Prevent downgrade entry for the new upgrade code that I set for the other media release type, but it seems that the ones that are there will work for either of them as when it build the media type it uses the Upgrade Code of what is being built and therefore they will work.

So then I just added the detection upgrade entries supplying the Upgrade Codes and making sure the Detect Only has been set to yes. So far this has worked for at least having the main app installed and then installing the secondary app. It did the correct detection, displayed the correct message and then exited.

Now I just have to make sure that it works the other way around, where I install the secondary app first and then try to install the main app.

Thanks for the help.
0 Kudos