Relevance returns TRUE regards of registry key value

(imported topic written by joe9165)

Can anyone explain why both of these return true? The key exists and is set to 1.

Q: (exists value “EnableTCPChimney” whose (“0” != it as string as hexadecimal) of key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters” of native registry)

A: True

Q: (exists value “EnableTCPChimney” whose (“1” != it as string as hexadecimal) of key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters” of native registry)

A: True

Thanks,

Joe

(imported comment written by NoahSalzman)

The problem is that

whose (“1” != it as string as hexadecimal)

isn’t actually doing what you think it is doing. You’ll see what I mean if you change the “not equals” to “equals”… you will get False for each example.

It might be easier to just approach the problem like this:

((value “EnableTCPChimney” of key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters” of native registry) as string) != “01”

That’s an illustrative example, of course, you’ll need to adjust the string depending on what is stored in EnableTCPChimney.

(imported comment written by NoahSalzman)

By the way, here is the way to deal with registry keys that are dwords:

(exists value “EnableTCPChimney” whose (“1” != it

as integer

as hexadecimal) of key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters” of native registry)

(imported comment written by joe9165)

Thanks, Noah. The relevance I was using was right from the Windows Registry Wizard so I had assumed that it was correct.

(imported comment written by NoahSalzman)

Interesting… I’ll go take a look at the wizard… thanks for pointing that out.

(imported comment written by NoahSalzman)

In case anyone is following this issue: this bug (#32386) in the Registry Wizard has been fixed. Your console should pick up the fix automatically from the content feed.

(imported comment written by joe9165)

Don’t I get a t-shirt or something for finding a bug? :wink:

Thanks for the update, Noah!

Joe

hahaha! yes you deserves :stuck_out_tongue:

Holy thread necromancy, Batman! I think 9 years may be a record…

1 Like

There have been longer :slight_smile:

2 Likes