Jump to content

Unexpected Results Using Regenumkey.


Recommended Posts

I took the documentation script example for RegEnumKey. I modified the registry key I want to process:

$var = RegEnumKey("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", 1)
MsgBox(4096, "First SubKey: ", $var)
$var = RegEnumKey("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", 2)
MsgBox(4096, "Second SubKey: ", $var)

Take a look at the screenshot of the items in the Uninstall key in my XP registry. The product code GUIDs are not read and the first displayed item is that which follows them. Does anyone know why I'm not reading the registry items in the order they are displayed in the screenshot?

Edit: I need to read the GUID registry keys.

Edited by Peter Hamilton-Scott
Link to comment
Share on other sites

The treeview sorting that Regedit or Regedt32 does not prescribe, necessarily, to the same sorting rules that the registry API does.

Lar.

Larry, thanks. I should have checked the ascii collating sequence as { and } appear after the alpha characters so all I had to do was trawl further on and I would have found them. Doh! :">

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...