The fixlet below does work fine when i check it under the actual user account, but drops the following EM:“Singular expression refers to nonexistent object” when the BF Client checks this using SYSTEM Account.
So what i have so far is the following: (this gives back a TRUE or FALSE depends on the Cachemode is enabled )
“19” = (first 2 of following text of position 2 of(value “00036601” of key “13dbb0c8aa05101a9bb000aa002fc45a” of key ( value “DefaultProfile” of key “Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles” 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)as string) of key “HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles” of registry as string))
I can query the name of the DefaultProfile using the following formula. This will give back the name of the DefaultProfile fine both under SystemAccount and any userAccounts.
(value “DefaultProfile” of key "Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging
Subsystem\Profiles" 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) as string)
Somehow the two codes should have been put together in order to get the correct values when it is checked by the BF client using SystemAccount but it seems i can not.
Does anybody have any idea how to merge these codes?
This is quite tricky… I was going to change it to use the “logged on user” inspector, but since there could be multiple users logged in, I kept running into the dreaded “double it” problem… So I rewrote your expression to look through the HKEY_USERS branch to see all the users… See if this works for you (you probably should test it out some):
// returns true if ANY user has cachemode enabled
q: exist (first 2 of following text of position 2 of it) whose (it = “19”) of (value “00036601” of key “13dbb0c8aa05101a9bb000aa002fc45a” of keys of keys “Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles” of keys of key “HKEY_USERS” of registry as string)
// returns true if ALL users have cachemode enabled
q: not exist (first 2 of following text of position 2 of it) whose (it != “19”) of (value “00036601” of key “13dbb0c8aa05101a9bb000aa002fc45a” of keys of keys “Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles” of keys of key “HKEY_USERS” of registry as string)
Another problem that there are several Outlook profile as well (not just user-profiles), but not all of them are used. So before i could read whether the cache mode is enabled have to read the Deafult Profile name, and according to this value should find the proper key to check. Yes…additionally everything is stroed in the HKCU. not easy.
So i think i will focus on your first example, and will try to modify this accordingly.
I heard that the BF version 7 has some improvements to read HKCU more easily, so will take a look on the documentation as well
Finally i made it to work. The relevance below queries the status (True/False) of Cached Mode of the default Outlook profile of the Outlook 2007 under System context.
“19” = (first 2 of following text of position 2 of(value “00036601” of key “13dbb0c8aa05101a9bb000aa002fc45a” of key ( value “DefaultProfile” of key “Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles” 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)as string) of key “Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles” 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) of registry as string))
If anybody would be interested in i am sharing the same query but for Outlook 2003
“01” = (first 2 of following text of position 2 of(value “00036601” of key “13dbb0c8aa05101a9bb000aa002fc45a” of key ( value “DefaultProfile” of key “Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles” 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)as string) of key “Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles” 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) of registry as string))