For per-user installs, the same structure appears under HKCU\Software\Python\PythonCore\3.12.
File association ProgID (HKCR\Python.File)
Key Path
Type
Description
(Default)
REG_SZ
Python File
shell\open\command\(Default)
REG_SZ
"C:\Python312\python.exe" "%L" %*
shell\Edit with IDLE\command\(Default)
REG_SZ
"C:\Python312\pythonw.exe" "...\idle.pyw" -e "%L"
📝 Notes
Multiple Python versions can coexist on the same machine; each registers under its own PythonCore\<major.minor> key (e.g., 3.11, 3.12).
The Python Launcher for Windows (py.exe) reads the PythonCore keys to find installed interpreters. It is installed to %SystemRoot% and adds its own uninstall entry.
The Add Python to PATH option in the installer modifies the system or user PATH environment variable — this is stored in the registry at HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\Path.
Per-user installs (default for non-admin) write to HKCU; admin installs write to HKLM.
Virtual environments (venv) do not create registry entries.
🗑️ Cleanup
# Per-user installRemove-Item-Path"HKCU:\Software\Python\PythonCore\3.12"-Recurse-Force-ErrorActionSilentlyContinue# System install (run as Administrator)Remove-Item-Path"HKLM:\SOFTWARE\Python\PythonCore\3.12"-Recurse-Force-ErrorActionSilentlyContinue# File associationsRemove-Item-Path"HKCR:\Python.File"-Recurse-Force-ErrorActionSilentlyContinueRemove-Item-Path"HKCR:\Python.CompiledFile"-Recurse-Force-ErrorActionSilentlyContinue# Uninstall entry (GUID varies — use dynamic lookup)Get-ChildItem"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"|Where-Object{$_.GetValue("DisplayName")-like"Python 3.12*"}|ForEach-Object{Remove-Item$_.PSPath-Recurse-Force}