Enumerate registry keys, subkeys, and values

P

paulo

please,

what is "enumerate"?

i am trying to understand a wireless routine here that according to a
Registry activity trace does whats shown below (well, part of it is
shown below).

My question is:

what does the "EnumerateValue" do?
and why does it "enumerate" the same thing twice before setting a
value - for example in lines 11 and 12 before setting a value in line
13.

i can find lots of info on the internet about HOW to enumerate keys,
etc but nobody explains what "to enumerate" means :(

tIA for any explanation you could give me
--
paulo

10 21.38810349 RaConfig2500.ex:1952 OpenKey
HKLM\System\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0010\Profile\Station\RAD3
SUCCESS Access: 0xF003F

11 21.38818359 RaConfig2500.ex:1952 EnumerateValue
HKLM\System\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0010\Profile\Station\RAD3\SSID
SUCCESS "Station3"

12 21.38820076 RaConfig2500.ex:1952 EnumerateValue
HKLM\System\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0010\Profile\Station\RAD3\SSID
SUCCESS "Station3"

13 21.38844681 RaConfig2500.ex:1952 SetValue
HKLM\System\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0010\SSID
SUCCESS "Station3"

14 21.38847733 RaConfig2500.ex:1952 EnumerateValue
HKLM\System\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0010\Profile\Station\RAD3\Channel
SUCCESS "1"

15 21.38849258 RaConfig2500.ex:1952 EnumerateValue
HKLM\System\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0010\Profile\Station\RAD3\Channel
SUCCESS "1"

16 21.38857079 RaConfig2500.ex:1952 SetValue
HKLM\System\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0010\Channel
SUCCESS "1"

17 21.38859177 RaConfig2500.ex:1952 EnumerateValue
HKLM\System\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0010\Profile\Station\RAD3\NetworkType
SUCCESS "1"

18 21.38860703 RaConfig2500.ex:1952 EnumerateValue
HKLM\System\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0010\Profile\Station\RAD3\NetworkType
SUCCESS "1"

19 21.38866234 RaConfig2500.ex:1952 SetValue
HKLM\System\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0010\NetworkType
SUCCESS "1"

20 21.38868141 RaConfig2500.ex:1952 EnumerateValue
HKLM\System\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0010\Profile\Station\RAD3\PreambleType
SUCCESS "2"

21 21.38869667 RaConfig2500.ex:1952 EnumerateValue
HKLM\System\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0010\Profile\Station\RAD3\PreambleType
SUCCESS "2"

22 21.38875008 RaConfig2500.ex:1952 SetValue
HKLM\System\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0010\PreambleType
SUCCESS "2"
 
W

Wesley Vogel

Enumerate
1 : to ascertain the number of : COUNT
2 : to specify one after another : LIST

"to enumerate" means to list. An exhaustive list.

To retrieve information from the Registry.

How To Enumerate the Values of a Registry Key
http://support.microsoft.com/kb/178755

How To Enumerate the Subkeys of an Open Registry Key
http://support.microsoft.com/kb/267908

How To Use the Registry API to Save and Retrieve Setting
http://support.microsoft.com/kb/145679

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
P

paulo

Enumerate
1 : to ascertain the number of : COUNT
2 : to specify one after another : LIST

"to enumerate" means to list. An exhaustive list.

To retrieve information from the Registry.

How To Enumerate the Values of a Registry Key
http://support.microsoft.com/kb/178755

How To Enumerate the Subkeys of an Open Registry Key
http://support.microsoft.com/kb/267908

How To Use the Registry API to Save and Retrieve Setting
http://support.microsoft.com/kb/145679

Thanks for your reply Wes.
I THINK that I understand a bit more now - THINK being the operative
word :(
I looked at the kb articles you quoted but they assume that one knows
what enumerate does - they just show you HOW to do it in VB :-(
I still cant understand the example listing I gave.
Here is an extract:

11 21.38818359 RaConfig2500.ex:1952 EnumerateValue
HKLM\System\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE
10318}\0010\Profile\Station\RAD3\SSID SUCCESS "Station3"

12 21.38820076 RaConfig2500.ex:1952 EnumerateValue
HKLM\System\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE
10318}\0010\Profile\Station\RAD3\SSID SUCCESS "Station3"

13 21.38844681 RaConfig2500.ex:1952 SetValue
HKLM\System\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE
10318}\0010\SSID SUCCESS "Station1"

Question:
1. here it appears that "EnumerateValue" is returning a VALUE, not a
COUNT - why not use Read (QueryValue?) ?
2. the Wireless program does "EnumerateValue" TWICE before setting a
new value. Why twice?

Thanks for your patience - I'm struggling here with both a lack of
knowledge of Windows and of English :(

Yours
 
R

Ramesh, MS-MVP

paulo,

EnumerateValue can return the value names / data / data type. QueryValue can
be used by an application if it already knows the name of the registry
branch and the value name.

RegEnumValue:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/regenumvalue.asp
(See what else it returns.)

lpData
[out] A pointer to a buffer that receives the data for the value entry. This
parameter can be NULL if the data is not required.


Sorry! No idea on this one. Might be a program specific thing.

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


Enumerate
1 : to ascertain the number of : COUNT
2 : to specify one after another : LIST

"to enumerate" means to list. An exhaustive list.

To retrieve information from the Registry.

How To Enumerate the Values of a Registry Key
http://support.microsoft.com/kb/178755

How To Enumerate the Subkeys of an Open Registry Key
http://support.microsoft.com/kb/267908

How To Use the Registry API to Save and Retrieve Setting
http://support.microsoft.com/kb/145679

Thanks for your reply Wes.
I THINK that I understand a bit more now - THINK being the operative
word :(
I looked at the kb articles you quoted but they assume that one knows
what enumerate does - they just show you HOW to do it in VB :-(
I still cant understand the example listing I gave.
Here is an extract:

11 21.38818359 RaConfig2500.ex:1952 EnumerateValue
HKLM\System\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE
10318}\0010\Profile\Station\RAD3\SSID SUCCESS "Station3"

12 21.38820076 RaConfig2500.ex:1952 EnumerateValue
HKLM\System\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE
10318}\0010\Profile\Station\RAD3\SSID SUCCESS "Station3"

13 21.38844681 RaConfig2500.ex:1952 SetValue
HKLM\System\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE
10318}\0010\SSID SUCCESS "Station1"

Question:
1. here it appears that "EnumerateValue" is returning a VALUE, not a
COUNT - why not use Read (QueryValue?) ?
2. the Wireless program does "EnumerateValue" TWICE before setting a
new value. Why twice?

Thanks for your patience - I'm struggling here with both a lack of
knowledge of Windows and of English :(

Yours
 
P

paulo

thanks for the reply, ramesh
much appreciated.
i'll try the link and see if i can make sense of it.
--
paulo

paulo,

EnumerateValue can return the value names / data / data type. QueryValue can
be used by an application if it already knows the name of the registry
branch and the value name.

RegEnumValue:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/regenumvalue.asp
(See what else it returns.)

lpData
[out] A pointer to a buffer that receives the data for the value entry. This
parameter can be NULL if the data is not required.


Sorry! No idea on this one. Might be a program specific thing.

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


Enumerate
1 : to ascertain the number of : COUNT
2 : to specify one after another : LIST

"to enumerate" means to list. An exhaustive list.

To retrieve information from the Registry.

How To Enumerate the Values of a Registry Key
http://support.microsoft.com/kb/178755

How To Enumerate the Subkeys of an Open Registry Key
http://support.microsoft.com/kb/267908

How To Use the Registry API to Save and Retrieve Setting
http://support.microsoft.com/kb/145679

Thanks for your reply Wes.
I THINK that I understand a bit more now - THINK being the operative
word :(
I looked at the kb articles you quoted but they assume that one knows
what enumerate does - they just show you HOW to do it in VB :-(
I still cant understand the example listing I gave.
Here is an extract:

11 21.38818359 RaConfig2500.ex:1952 EnumerateValue
HKLM\System\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE
10318}\0010\Profile\Station\RAD3\SSID SUCCESS "Station3"

12 21.38820076 RaConfig2500.ex:1952 EnumerateValue
HKLM\System\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE
10318}\0010\Profile\Station\RAD3\SSID SUCCESS "Station3"

13 21.38844681 RaConfig2500.ex:1952 SetValue
HKLM\System\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE
10318}\0010\SSID SUCCESS "Station1"

Question:
1. here it appears that "EnumerateValue" is returning a VALUE, not a
COUNT - why not use Read (QueryValue?) ?
2. the Wireless program does "EnumerateValue" TWICE before setting a
new value. Why twice?

Thanks for your patience - I'm struggling here with both a lack of
knowledge of Windows and of English :(

Yours
 
P

paulo

Sorry! No idea on this one. Might be a program specific thing.

Here's the answer:

"RegEnumValue
Enumerates the values for the specified open registry key.
The function copies one indexed value name
and data block for the key each time it is called."

repeating:

"and data block for the key each time it is called."

thanks very much for the link - helped a lot : )
 
R

Ramesh, MS-MVP

You're welcome paulo.

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


Sorry! No idea on this one. Might be a program specific thing.

Here's the answer:

"RegEnumValue
Enumerates the values for the specified open registry key.
The function copies one indexed value name
and data block for the key each time it is called."

repeating:

"and data block for the key each time it is called."

thanks very much for the link - helped a lot : )
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top