I am trying to configure and analyses and in one of my columns I would like to.
Have it look for a specific value of a registry key if it exists then true if not then false.
I was trying something like this:
if (exists value “TestValue” of keys “HKEY_CURRENT_USER\TestKey” of registry) AND (it contains “TestData”) then “Yes” else “No”
In a nutshell I want it to look into the data of a value and if the data is there then yes
Below are a couple I have working already if anyone is interested.
If either of the 2 folders exist Then YES
if (exists folder “C:\Program Files (x86)\IBM\Lotus”) or (exists folder “C:\Program Files\IBM\Lotus”) then “Yes” else “No”
If both of the folders exist then YES
if (exists folder “C:\Program Files (x86)\IBM\Lotus”) and (exists folder “C:\Program Files\IBM\Lotus”) then “Yes” else “No”
If registry key is present then YES
if (exists value “ProductName” of keys “HKEY_CLASSES_ROOT\Installer\Products\717AF7A29B5F303489661F1CF60984E2” of registry) then “Yes” else “No”
If registry key is present return it’s value else display N/A
if (exists value “ProductVersion” of keys “HKEY_CURRENT_USER\Software\Microsoft\Communicator” of registry) then (values “ProductVersion” of key “HKEY_CURRENT_USER\Software\Microsoft\Communicator” of registry as string) else “N/A”
I didn’t think that the HKEY_Current_User key existed for the BESClient since it runs under the SYSTEM context.
You can query the HKEY_USERS key. Below is a retrieved property I use to locate users who have installed DropBox under their Profile.
if (exists values “InstallLocation” of keys “Software\Microsoft\Windows\CurrentVersion\Uninstall\Dropbox” of keys of key “HKEY_USERS” of registry) then (“Installed”) else “N/I”
If (value “UserAuthentication” of key “HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Terminal Server\WinStations\RDP-Tcp” of registry) = “1” Then “True” Else “False”
It’s a Hexadecimal DWOORD Value 32bit. Not sure if that makes a difference.
The inspector “value … of key … of registry” returns a “registry key value” type which is different than a string. It needs to be cast to a string before it can be compared to a string.
q: value
"DeploymentType" of key
"HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\BigFix\EnterpriseClient\Office2003Control" of registry A: 3 T: 0.046 ms I: singular registry key value q: (value
"DeploymentType" of key
"HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\BigFix\EnterpriseClient\Office2003Control" of registry) as string A: 3 T: 0.056 ms I: singular string q: (value
"DeploymentType" of key
"HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\BigFix\EnterpriseClient\Office2003Control" of registry) =
"3" A: False T: 0.055 ms I: singular
boolean q: ((value
"DeploymentType" of key
"HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\BigFix\EnterpriseClient\Office2003Control" of registry) as string) =
"3" A: True T: 0.070 ms I: singular
boolean