Re: [winreg] How to access "(Default)" key value?

2022-05-03 Thread MRAB
On 2022-05-03 10:31, Nicolas Formichella wrote: Hello, I am encountering an issue with winreg, I can't figure out how to read the "(Default)" of a registry value ``` def get_chrome_version() -> str: with winreg.ConnectRegistry(None, winreg.HKEY_CURRENT_USER) as registry: with win

Re: Winreg

2020-07-31 Thread David L Neil via Python-list
On 31/07/2020 16:48, R Pasco wrote: Thanks for your extensive info. Its too bad this isn't published in the python winreg/_winreg modules' info. Ray Pasco Welcome to the world of documentation! Perhaps you have 'discovered' something, or maybe you're using the tool in an unusual way, or mayb

Re: Winreg

2020-07-31 Thread R Pasco
My code was just experimental and will be much refined in the future which will include specific exception catches. Connecting to the local registry is to 'go the last yard' for a full-blown implementation. I had a hard time grasping the Windows registry concept of having to first get a key handl

Re: Winreg

2020-07-30 Thread Eryk Sun
On 7/30/20, R Pasco wrote: > access rights must be set to [winreg.KEY_ALL_ACCESS | winreg.KEY_WOW64_64KEY It's a bad practice to request more access than you require, at the very least because the request may fail with access denied for no good reason. KEY_ALL_ACCESS includes all applicable s

Re: Winreg

2020-07-30 Thread dn via Python-list
On 31/07/2020 07:25, Barry Scott wrote: Use the Reply or Reply-To-All feature of your email program and it will do the rest for you. I can't find instructions for the proper way to reply to 'python list'. Is it simply a matter of keeping the message title identical to the original message and

Re: Winreg

2020-07-30 Thread Barry Scott
Use the Reply or Reply-To-All feature of your email program and it will do the rest for you. Barry > On 30 Jul 2020, at 20:14, R Pasco wrote: > > I can't find instructions for the proper way to reply to 'python list'. Is > it simply a matter of keeping the message title identical to the origi

Re: Winreg

2020-07-30 Thread Barry Scott
You left python list off your reply. > On 29 Jul 2020, at 23:38, R Pasco wrote: > > Hi, Barry, > > On Wed, Jul 29, 2020 at 5:12 PM Barry > wrote: > > > On 29 Jul 2020, at 19:50, R Pasco > > wrote: > > > > I'm running python 3.8 o

Re: Winreg

2020-07-29 Thread Barry
> On 29 Jul 2020, at 19:50, R Pasco wrote: > > I'm running python 3.8 on Windows 8.1 x64. Running the following code > produces no errors but does not add a key, name or value. I had no problems > doing this using _wirreg under python 2.7. Any insight will be helpful. How do you check that th

Re: winreg - access mask

2010-04-30 Thread Tim Roberts
Richard Lamboj wrote: > >if i want to read, write a key and set a value, does i only need to set >KEY_WRITE, or does i need to set KEY_READ, KEY_WRITE and KEY_SET_VALUE? > >This questions is related to the OpenKey Function. You need KEY_READ|KEY_WRITE|KEY_SET_VALUE. Those constants are straight

Re: winreg module, need help to understand why i'm getting exception

2008-04-19 Thread s0suk3
Sorry, the above post is not complete. This is the rest: # There should be a for or a while loop around here try: name = _winreg.EnumValue(key, index) except EnvironmentError: # It raises WindowsError, but the _winreg documentation # recommends catching EnvironmentError break else:

Re: winreg module, need help to understand why i'm getting exception

2008-04-19 Thread s0suk3
On Apr 19, 6:20 am, hellt <[EMAIL PROTECTED]> wrote: > HI all, i found winreg module > fromhttp://www.rutherfurd.net/python/winreg/index.html > very useful and simple, instead _winreg. > > But i have a problem with this module, in its iterable part. > > look at the following code > > key = Key(HKL