Following a related post, We have identified the reg keys that contain the information for a user’s PST file that is currently set as delivery. We are trying to come up with the proper relevance to identify this on BigFix.
Here is what we need:
We need to find out the current defaultprofile for a user, this is by obtaining the “DefaultProfile” value of the following key:
keys whose (value “00033009” of it as string =“02100000” )
of
key (value “DefaultProfile” of it as string) of key “HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles” of registry
E: Singular expression refers to nonexistent object.
is what you asked for, but I have to mention that it gives a “nonexistant” error on my box even though I use Outlook.
And, you probably want to insert a bunch of existance checking to avoid errors.
Part one is bold, part 2 is italic and part 3 is plain.
If you’re using your BES Client to retrieve this information from your endpoints, there is a slight modification to Brolly33’s script that you have to consider. Since BES Client runs as a local system account, querying HKEY_CURRENT_USER will not get you information on currently logged in user but rather on local system account that BES Client runs under. Note this thread on this subject: http://forum.bigfix.com/viewtopic.php?id=11
So in your case instead of writing:
value “001e6700” of keys whose (value “00033009” of it as string =“02100000” ) of key (value “DefaultProfile” of it as string) of key “HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles” of registry
try:
value “001e6700” of keys whose (value “00033009” of it as string =“02100000” ) of key (value “DefaultProfile” of it 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)
Also, make sure to check for the existence of logged in user when you run this query…
values “00036601” of keys “13dbb0c8aa05101a9bb000aa002fc45a” of keys of keys “Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles” of keys of key “HKEY_USERS” of registry