This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Major Upgrades and Features Selected
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎Jan 08, 2010
11:30 AM
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.
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.
(2) Replies
‎Jan 08, 2010
11:56 AM
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).
‎Jan 08, 2010
12:54 PM
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 !