I'm trying to build a simple installer with *Wix* that does some staff due to
a *RegistryValue* that I insert. I have a registry value called *Number*
with a value of 10.

![enter image description here][1]

I used a *string value* with *REG_SZ* type. With that, as far as I
understand, my variable will have the value *10* and not *#10*, like other
types seem to do.

So with my `WiX` installer I try to find that registry value like this:

     <?define myNumber="8" />
     <Property Id="CHECKNUMBER">
       <RegistrySearch Id="CheckNumber" Root="HKLM" 
                       Key="Software\MyNumbers"
                       Name="Number" Type="raw" Win64="no" />
     </Property>

     <Condition Message="Higher number">
       
     </Condition>
     <Condition Message="Lower number">
       
     </Condition>

So I guess this will do a basic comparison from the registry value like
this:

    if (<RegistryValue> > myNumber)    
         ShowEmergentWindow saying: "Lower number"
    else
         ShowEmergentWindow saying: "Higher number"

But this check doesn't work well. Even if I put the same value on the
registry and inside my *myNumber*, it always launches *the first written
condition*. I mean, if I change the order of the conditions, the first one
is *ALWAYS* launched.

I'm sure I'm misunderstanding something related with registry values
comparison using *WiX installer*, but I don't know why this doesn't work as
expected. Any idea?




--
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/How-to-compare-strings-from-a-Registrykey-tp7588946.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to