Checking for existence and then checking for value if exists help

(imported topic written by tscott91)

I’m having a problem with this relevance… Basically I want to make sure a value name of a registry key exists and then see if the value data is equal to 1…

The relevance is returning false so I must have some wording wrong…

Here is what returns false in the API tester:

exists value “DisablePop3” whose (name of it as string as lowercase = “1”) of key “Software\Microsoft\Office\12.0\Outlook\Options” of current user key (logged on user) of registry

Here is the value returned in the API tester:

Q:value “DisablePop3” of key “Software\Microsoft\Office\12.0\Outlook\Options” of current user key (logged on user) of registry

A: 1

I’m guessing it has something to do with the wording “value” and “name” or “string” but don’t know how to fix it.

Thanks

(imported comment written by jeremylam)

Hi tscott,

Yes, the value, name, and key objects for registry keys are a bit confusing.

In your statement you were comparing the name of the registry key value “DisablePop3” to 1. The name is “DisablePop3” but the value (of the registry key value…) is 1.

Try changing the statement to:

exists value “DisablePop3” whose (it as string as lowercase = “1”) of key “Software\Microsoft\Office\12.0\Outlook\Options” of current user key (logged on user) of registry

(imported comment written by tscott91)

That works! Many thanks!!

Tom