How is the simpler way to verify if the value is already created or create Windows registry values ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use the standard Python library module _winreg (it’s renamed to
winreg, no leading_, if you’re using Python 3).You always start with one of the constant keys named
_winreg.HKEYsomething; to see them all, do:and repeatedly use (to navigate down the keys’ tree) functions such as _winreg.Openkey (in a
try/exceptto catch theWindowsErrorit raises when a key is not present).