Wild cards for Reistry keys?

(imported topic written by Marty23)

I’m trying to write a task to change the Junk email setting in Outlook. I need to edit the following reg key.

HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\PROFILENAME\0a0d020000000000c000000000000046

The problem I’m having is that some of our users have a different or multiple PROFILRNAME entrée. I was hoping to find a wildcard that I could use that would be something like this.

exists key “HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles*.*\0a0d020000000000c000000000000046” of registry

and modify the value name “0003041b to FF:FF:FF:FF

(imported comment written by BenKus)

Hey Marty,

Since this issue deals with the HKEY_CURRENT_USER branch of the registry, you will need to deal with the complications of different users logged in:

http://forum.bigfix.com/viewtopic.php?id=1909

Here is some relevance to help:

Lookup the value in the “Outlook” profile for the current user:

q: values “0003041b” of keys “HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Outlook\0a0d020000000000c000000000000046” of registry

Same as above, but adapted for any profile:

q: values “0003041b” of keys “0a0d020000000000c000000000000046” of keys of keys “HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles” of registry

Same as above, but adapted to run looking for the logged in user (because if the agent ran this, then it would return results for the “SYSTEM” account branch):

q: values “0003041b” of keys “0a0d020000000000c000000000000046” of keys of keys “Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles” of current user keys (logged on users) of registry

Same as above, but adapted to report if any profile doesn’t have the value “FFFFFF”:

q: exist values “0003041b” whose (it as string != “FFFFFFFF”)of keys “0a0d020000000000c000000000000046” of keys of keys “Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles” of current user keys (logged on users) of registry

Note that the last two won’t work in QnA because of permissions issues (see http://forum.bigfix.com/viewtopic.php?id=1098 or http://forum.bigfix.com/viewtopic.php?id=2756 for info on how to get around this).

Ben