4

I recently separated our company installers in to two features (one enabled and one absent), to allow the user to select both, I've used UI_Mondo GUI to allow selection.

I've managed to get our custom action to work if the feature is selected:

<Custom Action="RestartIISForASPNet4" After="AspnetRegIIS"><![CDATA[(NOT INSTALLED) AND (&WebServiceFeature=3) AND NOT (!WebServiceFeature=3)]]></Custom

I tried but for some reason it's coming up with false (IMO, it can't as in the log the WixUI_InstallMode is set to InstallComplete.

<Custom Action="RestartIISForASPNet4" After="AspnetRegIIS"><![CDATA[((NOT INSTALLED) AND (&WebServiceFeature=3) AND NOT (!WebServiceFeature=3)) OR WixUI_InstallMode = "InstallComplete"]]></Custom>

Anybody have any ideas what I'm missing, it's probably really obvious.

Yan Sklyarenko
  • 31,557
  • 24
  • 104
  • 139
Jamie
  • 876
  • 1
  • 10
  • 28

1 Answers1

3

WixUI_InstallMode is a private property. This means it uses its default value during InstallExecuteSequence (when your custom action runs).

A solution is to use custom action to save its value in a public property. You can then use that public property in your condition.

Public properties don't have lowercase letters in their names.

Cosmin
  • 21,216
  • 5
  • 45
  • 60
  • Thanks, that sounds enlightening! Do you have an example of using that kind of custom action by any chance? Or a page to learn from, never done that before. – Jamie Sep 23 '11 at 08:35
  • Perhaps this will help: http://wix.sourceforge.net/manual-wix3/wix_xsd_setproperty.htm – Cosmin Sep 23 '11 at 08:38