I can successfully extract 5 sub-keys from my Windows 7 registry hive "HKEY_LOCAL_MACHINE" with the code below.
from _winreg import * try: i = 0 while True: subkey = EnumKey(HKEY_LOCAL_MACHINE, i) print subkey i += 1 except WindowsError: pass
My question is: how can I list the keys under these? I want to finish listing all the keys in the SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ NetworkList \ Signatures \ Unmanaged folder, but I canβt figure out what to do there.
In response to the first comment, I ran this code on my machine, and although it did not exit the system, it did not produce results.
from _winreg import * aReg = ConnectRegistry(None,HKEY_LOCAL_MACHINE) aKey = OpenKey(aReg, r"SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\Unmanaged") for i in range(1024): try: keyname = EnumKey(aKey, i) asubkey = OpenKey(aKey, keyname) val = QueryValueEx(asubkey, "Description") print val except WindowsError: break
The regedit or reg query shows 6 values ββin this folder, but I cannot get a python script to show me these six.
source share