This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Windows register keys
Type: Stage:
Components: Windows Versions: Python 3.8
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: ToKa, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2020-01-10 22:28 by ToKa, last changed 2022-04-11 14:59 by admin.

Files
File name Uploaded Description Edit
python-reg1.jpg ToKa, 2020-01-12 00:48
Messages (6)
msg359765 - (view) Author: Tony (ToKa) Date: 2020-01-10 22:28
It would be more practical to name the Windows main registry keys 'python', with for example 'python32' or 'python64'. This would make searching the registry for registered python versions (single and/or multi users) a lot easier.
msg359806 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2020-01-11 16:30
Have you read PEP 514? Does that help?

If not, can you provide specific suggestions in terms of that standard to help us understand what you are suggesting?
msg359824 - (view) Author: Tony (ToKa) Date: 2020-01-12 00:45
Hello Steve,

I just red the PEP 514.
Thank you for pointing this out.
However, when installing the latest version (3.8.1), the multi-user install is registered under key 
“HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\” as the PEP describes.
The key “HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Python\PythonCore\3.8-32”
Is a bit confusing, because since I know I have to search the registry for 32bit apps installed on a 64bit OS in “..\WOW6432Node”,
the versionsuffix “-32” is a bit overdone in my opinion because have to write extra code to extract the version number only, as you can see in the screenshot of the registry (See attachment).
The single user option however, is registered different. Here the key is not registered  like the multi-user option under key “..\WOW6432Node”, but in key “HKEY_CURRENT_USER\Software\” while I would expect the same as the Multi-user option: “..\WOW6432Node”.
I hope I explained enough about this.

Greetings, Tony.

Van: Steve Dower
Verzonden: zaterdag 11 januari 2020 17:30
Aan: factoryx.code@gmail.com
Onderwerp: [issue39296] Windows register keys

Steve Dower <steve.dower@python.org> added the comment:

Have you read PEP 514? Does that help?

If not, can you provide specific suggestions in terms of that standard to help us understand what you are suggesting?

----------

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue39296>
_______________________________________
msg359825 - (view) Author: Tony (ToKa) Date: 2020-01-12 00:48
The attachment I forgot..

Greetings, Tony.

Van: Steve Dower
Verzonden: zaterdag 11 januari 2020 17:30
Aan: factoryx.code@gmail.com
Onderwerp: [issue39296] Windows register keys

Steve Dower <steve.dower@python.org> added the comment:

Have you read PEP 514? Does that help?

If not, can you provide specific suggestions in terms of that standard to help us understand what you are suggesting?

----------

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue39296>
_______________________________________
msg359924 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2020-01-13 18:49
You should read the version number from the Version or SysVersion values, rather than from the tag.

Having -32 in the key name is a compatibility requirement. Without it, if you installed 32-bit and 64-bit versions for the current user (which is now the default), they would overwrite each other.

The Wow6432Node key is due to Windows, not Python. We don't decide the name or when it is used, and Windows determined that HKEY_CURRENT_USER is not subject to registry redirection. That's why you don't see it there.

Hope that helps clarify what's going on.
msg359988 - (view) Author: Tony (ToKa) Date: 2020-01-14 19:58
Hi Steve,

Thank you for this. 
I know about the working of WOW64 and the redirection to the (HKEY_LOCAL_MACHINE) ..\Wow6432Node, that is explained on md.docs.
The HKEY_CURRENT_USER redirection is not well explained, and so it appears I’m not the only one (Google) who was confused about this behavior.
So, again, many thanks for your explanation!

Tony Kalf.

Van: Steve Dower
Verzonden: maandag 13 januari 2020 19:49
Aan: factoryx.code@gmail.com
Onderwerp: [issue39296] Windows register keys

Steve Dower <steve.dower@python.org> added the comment:

You should read the version number from the Version or SysVersion values, rather than from the tag.

Having -32 in the key name is a compatibility requirement. Without it, if you installed 32-bit and 64-bit versions for the current user (which is now the default), they would overwrite each other.

The Wow6432Node key is due to Windows, not Python. We don't decide the name or when it is used, and Windows determined that HKEY_CURRENT_USER is not subject to registry redirection. That's why you don't see it there.

Hope that helps clarify what's going on.

----------

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue39296>
_______________________________________
History
Date User Action Args
2022-04-11 14:59:25adminsetgithub: 83477
2020-01-14 19:58:28ToKasetmessages: + msg359988
2020-01-13 18:49:12steve.dowersetmessages: + msg359924
2020-01-12 00:48:42ToKasetfiles: + python-reg1.jpg

messages: + msg359825
2020-01-12 00:45:02ToKasetmessages: + msg359824
2020-01-11 16:30:21steve.dowersetmessages: + msg359806
2020-01-10 22:28:07ToKacreate