开发者

Loop through Registry Python

开发者 https://www.devze.com 2023-03-06 18:26 出处:网络
I am trying to write a small application that checks each value in the Windows Registry for valid file paths, provided it is a REG_SZ. I need to be able to loop through all of the keys and subkeys rea

I am trying to write a small application that checks each value in the Windows Registry for valid file paths, provided it is a REG_SZ. I need to be able to loop through all of the keys and subkeys reading each v开发者_如何学Calue as I go. I looked in to _winreg, but couldn't find any clear examples for this task. Any help would be great!


_winreg.OpenKey to open a given registry key. _winreg.EnumKey to enumerate the sub-keys of a given registry key.

And you have the _winreg.HKEY_CLASSES_ROOT and friends key constants.

What else do you need?

0

精彩评论

暂无评论...
验证码 换一张
取 消