Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

How install/uninstall features via custom dialog?


1 reply to this topic

dpulaski

dpulaski
  • Full Members
  • 1 posts

Posted 15 June 2007 - 17:29

Does anybody understand and can explain what the CustomSetup dialog actually does for installing and uninstalling features in Maintenance Mode?

I have a need to replace the canned CustomSetup dialog with my own dialog that does not use the feature tree control. Instead, it uses checkboxes that correspond to my product's optional features, and the state of the checkboxes is supposed to indicate existing installed state, and drive wether the features are installed or uninstalled when the user clicks Next.

Now, I've got the first half of this working: I have created my new dialog with checkboxes and put it in the User Interface sequence in replacement of the canned CustomSetup dialog. The features set registry entries upon initial installation which are used to determine the initial state of the checkboxes when the installer is run again in Modify mode. So far, so good.

But, I cannot figure out what needs to happen to actually drive the install/uninstall of the features based on the values of the properties corresponding to the checkboxes. I have the features defined in Setup Design with a condition keyed to the checkbox properties - this works fine in detemining wether or not the features get installed on initial installation. But when I run the installer a second time in Modify mode, nothing happens even though the checkboxes and their properties are behaving properly. The install runs with no errors, but it neither installs nor uninstalls the features. I'm trying to reverse engineer the functionality by reading the logs, but I'm not getting anywhere and can't find any doc on this.

So, what am i missing that needs to happen behind the scenes to trigger install or uninstall of selected features based on my checkbox property values? This is a Basic MSI project, by the way.

Thanks in advance.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 18 June 2007 - 18:02

Take a look at the CntrolEvents like AddLocal, Remove etc. And you don't need registry entires to know which features are installed, you can use something like !FeatureName to detect if a feature is installed and set the check box property accordingly. See "conditional expressions" for details.