microsoft / microsoft/winget-pkgs
[Package Issue]: Python.Python SYSTEM account context issues
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 11.1k
- Forks
- 9.7k
- Avg merge
- 1h 32m
- Merged PRs (30d)
- 376
Description
Please confirm these before moving forward
- I have searched for my issue and not found a work-in-progress/duplicate/resolved issue.
- I have not been informed if the issue is resolved in a preview version of the winget client.
Category of the issue
Installation issue.
Brief description of your issue
The python installer package has multiple issues when being silently installed/uninstalled under the system account.
ISSUE 1: After installing Python thru winget, a winget list does NOT show Python as installed.
The installer logic being used when installing system wide (iow, not per user) adds registry entries into the HKEY_USERS.DEFAULT\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall registry hive.
The installer should be adding these registry entries to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall when installing system wide.
ISSUE 2: Attempting to uninstall Python thru winget (after successfully install thru winget under the SYSTEM account context) will fail with application not found.
This can cause major issues that require manual intervention and running the cached python msi. This issue is related to ISSUE 1.
Ultimately, this is a BUG in the Python installer and NOT the package info. This needs to be resolved by the vendor.
Steps to reproduce
Install any Python package within a SYSTEM account context.
Actual behavior
Machine-wide installation is installing to the HKEY_USERS.DEFAULT\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall registry hive.
Expected behavior
Machine-wide installation should be installing to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
Environment
Windows Package Manager v1.8.1911
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Server v10.0.20348.2655
System Architecture: X64
Winget Directories
------------------------------------------------------------------------------------------------------
Logs %TEMP%\WinGet\defaultState
User Settings %LOCALAPPDATA%\Microsoft\WinGet\Settings\defaultState\settings.json
Portable Links Directory (User) %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User) %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root C:\Program Files\WinGet\Packages
Portable Package Root (x86) C:\Program Files (x86)\WinGet\Packages
Installer Downloads %USERPROFILE%\Downloads
Links
---------------------------------------------------------------------------
Privacy Statement https://aka.ms/winget-privacy
License Agreement https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale
Admin Setting State
--------------------------------------------------
LocalManifestFiles Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride Disabled
LocalArchiveMalwareScanOverride Disabled
ProxyCommandLineOptions Disabled
DefaultProxy Disabled
Screenshots and Logs
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No repository files or tests are named; the report concerns Python installer behavior under the SYSTEM account. Start by reproducing installation and uninstallation of a Python package with winget on Windows Server, then compare the registry entries in HKEY_USERS.DEFAULT and HKEY_LOCAL_MACHINE. Done would require the vendor to correct machine-wide registration so winget list and uninstall work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 25/100