Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

_winreg.EnumValue chaos

Status
Not open for further replies.

bdowen

Programmer
Jun 10, 2003
12
US
I am trying to enumerate the values inside of a key. I am trying to use _winreg.EnumValue. EnumValue takes two inputs, key and index.
key is an already open key, or any one of the predefined HKEY_* constants.
index is an integer that identifies the index of the key to retrieve.

I want to start at the first value in the key and go to the end, so I use 0 ( or various integers) as the index, but
it seems to have no rhym or rhythm to it. If I use 10 for the index I don't get the 10th value I get the 11th, if I use 9 for the index i don't get the 9th value but the 3rd.

I know I am probably not being clear but hopefully somebody understands my question.
 
I figured it out.

I was looking at(referenceing from) the registry Editor and the vaules are listed alphabetically in here but this may not be the order they were created. What seemed like chaos really wasn't.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top