cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
RainMaker
Level 4

Major Upgrades and Features Selected

Hello all, (InstallScript MSI)

I just want to make sure what I did to resolve this issue is correct. I did a quick search on this forum, didn't come up with anything.

When my product gets installed for the first time (fresh) any of the features could be selected.

When I perform a major upgrade on that product, the features that were selected, aren't selected, and what is selected is just the default selection.I don't like that and I think there are dialogs other than the default dialog that I am using to resolve this, but I am not certain.

So, to resolve this I am keeping a LIST of productcodes (since I modify the product code for major upgrades) in installscript. I am checking to see if the product code is installed, and then I am executing another piece of installscript to mow down through the features associated with that product. From there I am selecting the appropriate features for the current (major upgrade) install. So to put this into code I am calling:

MsiQueryProductState(code from list) then
MsiQueryFeatureState(code, feature) then
FeatureSelectItem(media, feature, true or false based on what was returned from QueryFeatureState).

What I am trying to get at here, is by default InstallShield doesn't handle this for you. Is this a bug, and is my method the hard way or is it the only way. If it is the only way...I hope I helped someone !

Thank you in advance.
Labels (1)
0 Kudos

(2) Replies
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

The behavior you are seeing is a side effect of InstallScript MSI projects. Feature states in InstallScript MSI follow InstallScript behavior, not MSI behavior (Basic MSI would behave in a way that looks at the existing product's feature states). The method you have described for obtaining and setting feature states from a previous product is perfectly valid (I'm not sure there is any easier way).
0 Kudos
RainMaker
Level 4

joshstechnij wrote:
The behavior you are seeing is a side effect of InstallScript MSI projects. Feature states in InstallScript MSI follow InstallScript behavior, not MSI behavior (Basic MSI would behave in a way that looks at the existing product's feature states). The method you have described for obtaining and setting feature states from a previous product is perfectly valid (I'm not sure there is any easier way).


Makes sense. I upgraded to 2010 SP1. Hopefully I can avoid some other issues that may crop up even though SP1 wouldn't have fixed this. Thanks !
0 Kudos