I can't get the "<>" comparison to work in the CDATA statement for my
Condition elements and trying to set a default value on the property
that is being tested is breaking them as well.

I have a radio button selection during the setup that determines
whether the service that is being installed will be run by the system
or a user, with elements such as this:

<Control Id="AccountName" Type="Edit" X="120" Y="85" Width="150"
Height="18" TabSkip="no" Property="SVCACCOUNTNAME">
  <Condition Action="disable">SVCLOGONTYPE = "System"</Condition>
  <Condition Action="enable">SVCLOGONTYPE = "User"</Condition>
</Control>

I haven't determined a better way to handle the actual installation
than to have two almost identical components,  one with Account and
Password attributes in the ServiceInstall element and the other
without.

In the feature I have two sub-features that I'm trying to choose
between using Condition elements. I've gotten the following code which
works:

<Feature Id="SystemService" Display="hidden" TypicalDefault="install" Level="1">
  <ComponentRef Id="SystemServiceComponent"/>
  <Condition Level="0"><![CDATA[SVCLOGONTYPE = "User"]]></Condition>
</Feature>
<Feature Id="UserService" Display="hidden" TypicalDefault="install" Level="1">
  <ComponentRef Id="UserServiceComponent"/>
  <Condition Level="0"><![CDATA[SVCLOGONTYPE = "System"]]></Condition>
</Feature>

There are two changes I'd like to make, I'd like to change it so that
the condition for disabling the SystemService feature is that
SVCLOGONTYPE is not set to "System", rather than disabling it if it is
set to "User." However if I change the "=" to "<>" and swap the names
then no matter which option I select neither gets installed. The log
file shows

Feature: SystemService; Installed: Absent;   Request: Null;   Action: Null
Feature: UserService; Installed: Absent;   Request: Null;   Action: Null

but as far as I can tell there's no logging of the evaluation of the
Condition statement so I can't tell what's going wrong.

Second I want to have the radio buttons default to "System" rather
than neither being selected when I get to that page. However if I add

<Property Id="SVCLOGONTYPE">System</Property>

then again neither element gets installed and the same messages show
up in the log. There are also messages like

PROPERTY CHANGE: Modifying SVCLOGONTYPE property. Its current value is
'System'. Its new value: 'User'.

So I know that the default is being used and then getting overridden,
but again there's no debug info about the Condition evaluation so I
don't know why neither feature is being installed.

Any help on how to fix this, especially the default property value, or
some other workaround on how to make the dialog start with "System"
selected, would be greatly appreciated!

Thanks!

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to