Accessing the Current User Keys

The IBM BigFix Client runs as the LOCAL SYSTEM account and so its HKEY_CURRENT_USER branch does not match the logged in user’s branch. However, it is still possible to get the logged in user’s HKEY_CURRENT_USER branch of HKEY_USERS by searching through the Logon keys for the name of the current user:

Q: name of key whose ((it = name of current user as lowercase OR it starts with 
name of current user as lowercase & "@") of (it as string as lowercase) of value 
"Logon User Name" of key "Software\Microsoft\Windows\CurrentVersion\Explorer" 
of it) of key "HKEY_USERS" of registry
A: S-1-5-21-1214450339-2025729265-839522115-1013

Be sure to include the word "key" when you want to examine a registry key. It is easy to look at an expression like this and think you are getting a valid answer:

Q: exists "HKEY_LOCAL_MACHINE\Software\Microsoft\Active Setup\Installed Components
\{f502aef4-a754-4c82-9f12-a5149f71ea89}" of registry
A: True

However, what is true here is that the string literal exists, not the key. The correct expression is:

Q: exists key "HKEY_LOCAL_MACHINE\Software\Microsoft\Active Setup
\Installed Components\{f502aef4-a754-4c82-9f12-a5149f71ea89}" of registry
A: False