(imported comment written by SystemAdmin)
Looks like my original response wasn’t looking at the right place in the registry. I have an x64 win7 machine. I had to change “registries” to “native registry” and then did the same tests:
//key does not exist
q: exists (values “securitylevel” of keys “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Setup\RecoveryConsol” of native registry as string)whose (it as integer != 0)
A: False
T: 0.059 ms
I: singular boolean
q: not (exists (values “securitylevel” of keys “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Setup\RecoveryConsol” of native registry as string)whose (it as integer = 0))
A: True
T: 0.069 ms
I: singular boolean
- The key does but the value does not exist
//The key does but the value does not exist
q: exists (values “securityleve” of keys “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Setup\RecoveryConsole” of native registry as string)whose (it as integer != 0)
A: False
T: 0.079 ms
I: singular boolean
q: not (exists (values “securityleve” of keys “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Setup\RecoveryConsole” of native registry as string)whose (it as integer = 0))
A: True
T: 0.101 ms
I: singular boolean
- The value exists but is empty
//The value exists but is empty
q: exists (values “securitylevel” of keys “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Setup\RecoveryConsole” of native registry as string)whose (it as integer != 0)
A: False
T: 0.089 ms
I: singular boolean
q: not (exists (values “securitylevel” of keys “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Setup\RecoveryConsole” of native registry as string)whose (it as integer = 0))
A: False
T: 0.090 ms
I: singular boolean
- The value is 0
q: exists (values “securitylevel” of keys “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Setup\RecoveryConsole” of native registry as string)whose (it as integer != 0)
A: False
T: 0.074 ms
I: singular boolean
q: not (exists (values “securitylevel” of keys “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Setup\RecoveryConsole” of native registry as string)whose (it as integer = 0))
A: False
T: 0.077 ms
I: singular boolean
- The value is != 0
//The value exists but is empty
q: exists (values “securitylevel” of keys “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Setup\RecoveryConsole” of native registry as string)whose (it as integer != 0)
A: True
T: 0.078 ms
I: singular boolean
q: not (exists (values “securitylevel” of keys “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Setup\RecoveryConsole” of native registry as string)whose (it as integer = 0))
A: True
T: 0.079 ms
I: singular boolean