tags:

views:

58

answers:

2

Hi,All. I have the following Wix code,that checks if some registry entry exist it doesn't launch Custom Action.A Question is what is wrong in Custom Action condition defined as inner element?

<Property Id="MYSERVER">  
  <RegistrySearch Id="MyServer" Root="HKLM" Key="SOFTWARE\My Technologies\MyServer" Type="raw" Name="InstallLocation" />  
</Property> 

<CustomAction Id='LaunchMyServer'   BinaryKey="MyServer.exe" ExeCommand="" /> 

<InstallUISequence>


<Custom Action="LaunchMyServer" Before="CostInitialize">MYSERVER>0 </Custom>
</InstallUISequence>
+1  A: 

You are using the > character in the content. It should be html escaped to &gt;

So try MYSERVER&gt;0 instead.

Hope it helps.

/Klaus

klausbyskov
+2  A: 

You have used >, so you have to use a CDATA-block:

<Custom Action="LaunchMyServer" Before="CostInitialize"><![CDATA[MYSERVER>0]]> </Custom>
martin