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: Component not installed in Maintenance Mode
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 06, 2007
11:27 AM
Component not installed in Maintenance Mode
I have a Basic MSI project where two of the components, call them Component1 and Component2 have conditions attached to them. The conditions are properties. So, if Property1 has a value, Component1 will be installed, and if Property2 has a value, Component2 will be installed.
During an initial install, Property1 and Property2 are set based on the state of two different checkboxes. If the user selects the checkbox for Property1, Component1 will be installed. Likewise for Component2.
The initial install works fine. But during the maintenance install, I call an InstallScript custom action after CostFinalize, and the custom action sets the values of Property1 and Property2 based on whether Component1 and Component2's files are installed on the hard drive.
I know the custom action is setting the properties correctly, however, the components files are or are not being installed during the maintenance install. For example, if during the initial install, if Property1 is set, then Component1's files will be installed to the hard drive. Then during maintenance install, if the user chooses Property2, then Component2's files should be installed to the hard drive. However this part is not happening.
I thought that if the properties are set according to the user's wishes, then the components will be installed or uninstalled accordingly. However, this is not happening during the maintenance install.
Does anyone have any ideas?
During an initial install, Property1 and Property2 are set based on the state of two different checkboxes. If the user selects the checkbox for Property1, Component1 will be installed. Likewise for Component2.
The initial install works fine. But during the maintenance install, I call an InstallScript custom action after CostFinalize, and the custom action sets the values of Property1 and Property2 based on whether Component1 and Component2's files are installed on the hard drive.
I know the custom action is setting the properties correctly, however, the components files are or are not being installed during the maintenance install. For example, if during the initial install, if Property1 is set, then Component1's files will be installed to the hard drive. Then during maintenance install, if the user chooses Property2, then Component2's files should be installed to the hard drive. However this part is not happening.
I thought that if the properties are set according to the user's wishes, then the components will be installed or uninstalled accordingly. However, this is not happening during the maintenance install.
Does anyone have any ideas?
(6) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 06, 2007
03:26 PM
I believe that any evaluation of condition that will control a component's installation has to be done BEFORE CostFinalize, since that's the final determination of what will get installed or not.
If you move your maintenance CA to before CostFinalize, does that work for you?
If you move your maintenance CA to before CostFinalize, does that work for you?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 06, 2007
03:52 PM
That's a good point. However, I don't think I've given enough information for you to understand what I am doing.
I display a dialog (that I created) during the Maintenance UI sequence that has two checkboxes. Each checkbox points to a property, and each property is the condition for installing a component.
So, the idea is that the user would be able to signal (via the checkboxes) how he wants to change the installation during the maintenance install. In other words, the user will indirectly install or uninstall a component based on whether it's corresponding checkbox is selected or unselected.
The process would never be able to be done before CostFinalize, because the UI elements have not occurred yet that allow the user to make his install choices.
Actually, I have everything working except for one thing. The dialog works and the checkboxes set the properties correctly. It's just that the component's state is not changing after the user signals what he wants. So evidentally, the right thing is not occuring during the execute sequence.
I display a dialog (that I created) during the Maintenance UI sequence that has two checkboxes. Each checkbox points to a property, and each property is the condition for installing a component.
So, the idea is that the user would be able to signal (via the checkboxes) how he wants to change the installation during the maintenance install. In other words, the user will indirectly install or uninstall a component based on whether it's corresponding checkbox is selected or unselected.
The process would never be able to be done before CostFinalize, because the UI elements have not occurred yet that allow the user to make his install choices.
Actually, I have everything working except for one thing. The dialog works and the checkboxes set the properties correctly. It's just that the component's state is not changing after the user signals what he wants. So evidentally, the right thing is not occuring during the execute sequence.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 06, 2007
05:16 PM
I am wondering if you set the components as transitive if that would work. I think that the component condition would be reevaluated then. You can set this in the component's "Reevaluate Condition" property. Does that work?
(If my reply answers a question you have raised, please click "ACCEPT AS SOLUTION".)
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 07, 2007
10:40 AM
In addition to the information provided by Sheryl, there needs to be a request for the component to be installed or removed. A request is typically only made at the feature level; if no requests are made to the features containing these components (Request: Null for the feature in a verbose log), the reevaluate condition setting and the values of your properties will likely not have any effect. You could try adding a Reinstall event to the dialog containing the two checkboxes, and set the argument to the feature(s) containing these components, or All for all features.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 07, 2007
08:02 PM
I just now got back to work on this.
I will try both of your suggestions and report back. Thanks.
I will try both of your suggestions and report back. Thanks.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 08, 2007
09:08 AM
I first tried Sheryl's suggestion and that did not work on its own. I then tried Josh's suggestion and that worked. Just so you know, I first tried tying the Reinstall event to the checkboxes, but that did not work. So, I had to tie the Reinstall event to the Next button of the dialog I created as the IS Help (actually the Windows Installer Help in the IS Help) states that the Reinstall event only works with push buttons and selection tree controls.
Thank you very much for the help. I think I will be able to complete the rest of this now.
Thank you very much for the help. I think I will be able to complete the rest of this now.