Login | |
|
 |
Find and read registry subkeys - 1/30/2006 8:14:34 AM
|
|
 |
|
| |
bernar
Posts: 6
Score: 0
Joined: 1/30/2006
Status: offline
|
Hi. I am trying to find a way to read value "displayname" from the registry without having to specify users. As seen below I have a subkey named abetan, abigal and about 200 other names. I would like to extract the subkey name via script and then use that to read the value "displayname" automatically. I know how to do it if I specify the subkey but I would like to atomate this. Thanks in advance Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Interactive Intelligence\EIC\Directory Services\Root\BHMSCIC\Production\Users] "snCreated"=dword:000007f4 "Date Created"=hex(7):31,00,36,00,00,00,00,00 "snModified"=dword:000007f4 [HKEY_LOCAL_MACHINE\SOFTWARE\Interactive Intelligence\EIC\Directory Services\Root\BHMSCIC\Production\Users\abetan] "snCreated"=dword:000007f5 "Date Created"=hex(7):31,00,30,00,39,00,31,00,31,00,30,00,36,00,38,00,33,00,30,\ 00,00,00,00,00 "snModified"=dword:000007f5 "NT Domain User"=hex(7):42,00,4f,00,52,00,53,00,43,00,48,00,4f,00,57,00,5c,00,\ 61,00,62,00,65,00,74,00,61,00,6e,00,00,00,00,00 "Pop Client"=hex(7):4e,00,6f,00,00,00,00,00 "Ring Phone"=hex(7):59,00,65,00,73,00,00,00,00,00 "Pager Active"=hex(7):4e,00,6f,00,00,00,00,00 "Chat Chat Play Sound"=hex(7):59,00,65,00,73,00,00,00,00,00 "Attribute 2"=hex(7):34,00,31,00,37,00,30,00,00,00,00,00 "Attribute 3"=hex(7):34,00,31,00,37,00,30,00,00,00,00,00 "Mailbox Display Name"=hex(7):41,00,6e,00,67,00,65,00,6c,00,20,00,42,00,65,00,\ 74,00,61,00,6e,00,63,00,6f,00,75,00,72,00,74,00,20,00,46,00,65,00,72,00,6e,\ 00,61,00,6e,00,64,00,65,00,7a,00,00,00,00,00 "Ring Computer"=hex(7):59,00,65,00,73,00,00,00,00,00 "Chat Chat Pop Window"=hex(7):59,00,65,00,73,00,00,00,00,00 "Extension"=hex(7):34,00,31,00,37,00,30,00,00,00,00,00 "Auto-Answer Call"=hex(7):4e,00,6f,00,00,00,00,00 "ACD Agent Greeting"=hex(7):4e,00,6f,00,00,00,00,00 "Chat Client Play Sound"=hex(7):59,00,65,00,73,00,00,00,00,00 "Focus"=hex(7):4e,00,6f,00,00,00,00,00 "Date Last Modified"=hex(7):31,00,30,00,39,00,31,00,31,00,30,00,36,00,38,00,35,\ 00,34,00,00,00,00,00 "Status Text"=hex(7):41,00,76,00,61,00,69,00,6c,00,61,00,62,00,6c,00,65,00,00,\ 00,00,00 "Mailbox"=hex(7):45,00,58,00,3a,00,2f,00,4f,00,3d,00,42,00,6f,00,72,00,73,00,\ 63,00,68,00,6f,00,77,00,2f,00,4f,00,55,00,3d,00,42,00,4f,00,52,00,53,00,43,\ 00,48,00,4f,00,57,00,2f,00,63,00,6e,00,3d,00,52,00,65,00,63,00,69,00,70,00,\ 69,00,65,00,6e,00,74,00,73,00,2f,00,63,00,6e,00,3d,00,61,00,62,00,65,00,74,\ 00,61,00,6e,00,00,00,00,00 "Chat Chat Set Focus"=hex(7):4e,00,6f,00,00,00,00,00 "Exclude From Directory"=hex(7):4e,00,6f,00,00,00,00,00 "Chat Client Set Focus"=hex(7):4e,00,6f,00,00,00,00,00 "Chat Client Pop Window"=hex(7):59,00,65,00,73,00,00,00,00,00 "Fax Capability"=hex(7):59,00,65,00,73,00,00,00,00,00 "MWI Enabled"=hex(7):4e,00,6f,00,00,00,00,00 "displayName"=hex(7):41,00,6e,00,67,00,65,00,6c,00,20,00,42,00,65,00,74,00,61,\ 00,6e,00,63,00,6f,00,75,00,72,00,74,00,20,00,46,00,65,00,72,00,6e,00,61,00,\ 6e,00,64,00,65,00,7a,00,00,00,00,00 "emailAddress"=hex(7):45,00,58,00,3a,00,2f,00,4f,00,3d,00,42,00,4f,00,52,00,53,\ 00,43,00,48,00,4f,00,57,00,2f,00,4f,00,55,00,3d,00,42,00,4f,00,52,00,53,00,\ 43,00,48,00,4f,00,57,00,2f,00,43,00,4e,00,3d,00,52,00,45,00,43,00,49,00,50,\ 00,49,00,45,00,4e,00,54,00,53,00,2f,00,43,00,4e,00,3d,00,41,00,42,00,45,00,\ 54,00,41,00,4e,00,00,00,00,00 [HKEY_LOCAL_MACHINE\SOFTWARE\Interactive Intelligence\EIC\Directory Services\Root\BHMSCIC\Production\Users\abigal] "NT Domain User"=hex(7):42,00,4f,00,52,00,53,00,43,00,48,00,4f,00,57,00,5c,00,\ 61,00,62,00,69,00,67,00,61,00,6c,00,00,00,00,00 "snCreated"=dword:000007f6 "Date Created"=hex(7):31,00,30,00,38,00,32,00,30,00,38,00,38,00,32,00,38,00,39,\ 00,00,00,00,00 "snModified"=dword:000007f6 "Mailbox"=hex(7):45,00,58,00,3a,00,2f,00,6f,00,3d,00,42,00,6f,00,72,00,73,00,\ 63,00,68,00,6f,00,77,00,2f,00,6f,00,75,00,3d,00,42,00,4f,00,52,00,53,00,43,\ 00,48,00,4f,00,57,00,2f,00,63,00,6e,00,3d,00,52,00,65,00,63,00,69,00,70,00,\ 69,00,65,00,6e,00,74,00,73,00,2f,00,63,00,6e,00,3d,00,61,00,62,00,69,00,67,\ 00,61,00,6c,00,00,00,00,00 "emsExtensionAttribute5"=hex(7):30,00,00,00,00,00 "displayName"=hex(7):41,00,62,00,69,00,67,00,61,00,69,00,6c,00,20,00,52,00,69,\ 00,76,00,65,00,72,00,61,00,00,00,00,00 "departmentName"=hex(7):43,00,72,00,65,00,64,00,69,00,74,00,6f,00,00,00,00,00 "emailAddress"=hex(7):45,00,58,00,3a,00,2f,00,4f,00,3d,00,42,00,4f,00,52,00,53,\ 00,43,00,48,00,4f,00,57,00,2f,00,4f,00,55,00,3d,00,42,00,4f,00,52,00,53,00,\ 43,00,48,00,4f,00,57,00,2f,00,43,00,4e,00,3d,00,52,00,45,00,43,00,49,00,50,\ 00,49,00,45,00,4e,00,54,00,53,00,2f,00,43,00,4e,00,3d,00,41,00,42,00,49,00,\ 47,00,41,00,4c,00,00,00,00,00
|
|
| |
|
|
|
 |
RE: Find and read registry subkeys - 1/31/2006 1:09:41 AM
|
|
 |
|
| |
bernar
Posts: 6
Score: 0
Joined: 1/30/2006
Status: offline
|
Thanks for the quick reply. Very nice code...but only lets me read the values under a given subkey. In your example the key "Shell folders". In my case I have various keys which may be added or deleted daily. Because of this I would like a way to read the keys (to find out their names) then search for specific values under their names.
|
|
| |
|
|
|
 |
RE: Find and read registry subkeys - 1/31/2006 2:13:58 AM
|
|
 |
|
| |
bernar
Posts: 6
Score: 0
Joined: 1/30/2006
Status: offline
|
Thanks this is exactly what I want though it generates an Error: Object not a collection Code: 800A01C3 Runtime error en Line: 16 Char: 4 I will post the correction when done. Thank You very much
|
|
| |
|
|
|
 |
RE: Find and read registry subkeys - 1/31/2006 3:36:42 AM
|
|
 |
|
| |
Cybex
Posts: 412
Score: 0
Joined: 9/14/2005
From: Florida
Status: offline
|
What type of data is "displayName"? MultiString, what? Cybex
_____________________________
Common sense is not so common.
|
|
| |
|
|
|
 |
RE: Find and read registry subkeys - 1/31/2006 5:41:04 AM
|
|
 |
|
| |
bernar
Posts: 6
Score: 0
Joined: 1/30/2006
Status: offline
|
Multi String REG_MULTI_SZ
|
|
| |
|
|
|
 |
RE: Find and read registry subkeys - 1/31/2006 7:17:30 AM
|
|
 |
|
| |
bernar
Posts: 6
Score: 0
Joined: 1/30/2006
Status: offline
|
Excellent it works fine I modified it to export to a file. If I may trouble you with one last question (newbie dude). How can I read multiple values say displayname and Extension or another known value?
|
|
| |
|
|
|
 |
RE: Find and read registry subkeys - 1/31/2006 8:51:31 AM
|
|
 |
|
| |
bernar
Posts: 6
Score: 0
Joined: 1/30/2006
Status: offline
|
Excellent!!! I had tried something similar but it generated an error. When I tried ours I received the same error but then it hit me. The problem was that the first key did not have a value "Extension" I added it and then it worked. Thanks for all your help
|
|
| |
|
|
|
|
|