Comparing values with '#'' returned from RegistrySearch

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Comparing values with '#'' returned from RegistrySearch

mmenon
This post has NOT been accepted by the mailing list yet.
Problem with the below code is, even if Connector exists, Value is set to 1. But I want Value to be 0 if Connector is found and 1 if not found. How do I get this right? Thanks in advance

<Property Id="PREVENT_OPERATION">
    <RegistrySearch Id="PREVENT_OPERATION"
                    Key="SOFTWARE\Policies\X\Y\Z\AddIns\Connector"
                    Name="(Default)"
                    Root="HKLM"
                    Type="raw"
                    />
  </Property>

<Condition>PREVENT_OPERATION = "#1"</Condition>
  Add registry key with Value set to 0
<Condition>NOT PREVENT_OPERATION = "#1"</Condition>
  Add registry key with Value set to 1