Created
June 19, 2015 11:10
-
-
Save vpetrigo/eb8d3104cbbec6a52017 to your computer and use it in GitHub Desktop.
Python retrieve data from windows registry
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Passing through a Windows registry key entry | |
Provide a needed registry key and a sub_key you want to retrieve values from | |
""" | |
path = r'HARDWARE\DEVICEMAP...' | |
with winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, path) as key: | |
sub_keys, values, modified = winreg.QueryInfoKey(key) | |
for i in range(values): | |
print(winreg.EnumValue(key, i)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment