WinGet fails with 0x80070005 (Access Denied) on install after uninstallation is prompted when the package installer type changes (Win32 to MSIX). This can result in a corrupted system
Les mainteneurs répondent en général sous 2 jours
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 42/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- cpp, powershell
- Domaine
- cli, operating-systems
Piste de recherche
Commencez par reproduire la transition de Slack avec les commandes winget indiquées et capturez des journaux détaillés. Suivez l’échec signalé à travers external/pkg/src/AppInstallerCommonCore/Deployment.cpp:54 et AppInstallerCLICore/Workflows/InstallFlow.cpp:239, en comparant les chemins Win32 et MSIX. Le travail est considéré comme terminé lorsque la transition ne laisse plus la machine ni l’état de suivi de WinGet dans un état irrécupérable après l’échec 0x80070005.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Relevant area(s)
WinGet CLI
Relevant command(s)
No response
Brief description of your issue
Duplication / Disambiguation
- Mostly tracked under #2883
- That does not cover the potential for the system to end up in an unrecoverable state
Description
When a third-party application package repository shifts its primary deployment manifest architecture mid-lifecycle (specifically from a traditional Win32 .exe/.msi to a modern virtualized .msix container), the Windows Package Manager fails to resolve the transition state when using --scope machine.
Even when executing within an elevated administrative terminal (Run as Administrator), WinGet downloads, verifies, and stages the deployment to 92%, before crashing with Installer failed with exit code: 0x80070005 : Access is denied.
This happens because the background AppX Deployment Service (AppXSvc via COM loopback interfaces) detects a structural system namespace collision between the legacy Win32 execution footprints/registry keys and the incoming MSIX provision request (ProvisionPackageOperation). WinGet cannot automatically reconcile this cross-context upgrade boundary.
Related Issue Trackers
This bug intersects with several verified tracking items on the Microsoft WinGet repository regarding cross-technology upgrades and installer scope mismatch logic:
- #3817 : Tracks why the winget upgrade --all script pipeline silently skips packages or flags warnings when an underlying installer technology transitions mid-lifecycle.
- #2826 : Details the tracking thread where manual package overrides encounter installer technology mismatches or return structured permission blocks.
- #4677 : Focuses on the current architectural limitations of flags like --uninstall-previous when attempting to purge legacy Win32 executable footprints prior to staging an MSIX container package.
Steps to reproduce
-
Have an older version of Slack installed system-wide via WinGet (historically distributed as a Win32 standalone payload). All of the following are in an elevated terminal for
--scope machineoperations. -
Execute a global upgrade sweep:
winget upgrade --all. -
WinGet includes Slack in the list of packages to install, but then silently skips it. The numerical difference between the two is summarised.
-
Slack could be discovered by manual reconciliation, or by following up with any of:
winget list --upgrade-available --include-unknownfollowed bywinget upgrade --id SlackTechnologies.Slack --exact --include-unknownwinget upgrade --all --include-unknown
-
That will fail, indicating "A newer version was found, but the install technology is different from the current version installed. Please uninstall the package and install the newer version."
-
Uninstall the asset to allow a fresh installation:
winget uninstall --all-versions --id SlackTechnologies.Slack --exact -
Attempt a clean machine-scoped deployment:
winget install --id SlackTechnologies.Slack --exact --source winget --scope machine -
Result: The process fails at exactly 92% staging completion with error 0x80070005. That is repeatable between cleanup attempts.
-
Note: Despite numerous cleanup strategies, I have been unable to reinstall Slack in
--scope machine.
Context
- https://github.com/microsoft/winget-pkgs/commits/master/manifests/s/SlackTechnologies/Slack
- Replacement version: 4.51.191
- Prior version: unknown
- The following does not help:
PS C:\Users\simon\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir> Get-ChildItem *.log | Select-String -Pattern 'slack' -List | ForEach-Object { Select-String -Path $_.Path -Pattern 'Reading cached file.*manifests' }
WinGet-2026-08-23-13-09-18.472.log:1101:2026-08-23 13:09:19.613 <V> [CORE] Reading cached file [C:\Users\simon\AppData\
Local\Temp\WinGet\cache\V2_M\Microsoft.Winget.Source_8wekyb3d8bbwe\manifests/s/SlackTechnologies/Slack/4.51.191/4b4a]
WinGet-2026-08-23-16-45-10.476.log:533:2026-08-23 16:45:11.300 <V> [CORE] Reading cached file [C:\Users\simon\AppData\L
ocal\Temp\WinGet\cache\V2_M\Microsoft.Winget.Source_8wekyb3d8bbwe\manifests/s/SlackTechnologies/Slack/4.51.191/4b4a]
WinGet-2026-08-23-16-46-05.341.log:1101:2026-08-23 16:46:06.505 <V> [CORE] Reading cached file [C:\Users\simon\AppData\
Local\Temp\WinGet\cache\V2_M\Microsoft.Winget.Source_8wekyb3d8bbwe\manifests/s/SlackTechnologies/Slack/4.51.191/4b4a]
PS C:\Users\simon\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir>
Other candidates for experimentation
winget upgrade --id Pingman.PingPlotter --exact --include-unknown
Expected behavior
Technical Conclusion & Desired Feature Request
The 0x80070005 error is triggered because WinGet's packaging framework lack the capability to seamlessly step down, decouple, or cleanly scrub system component references when a package tracking target transitions from a legacy Win32 executable registry mapping to an active AppX provision model.
Proposed Resolution Steps for WinGet:
- Introduce automated validation hooks to handle the "install technology is different" warning smoothly.
- Implement a native --uninstall-previous-native switch capable of calling deep cleanup procedures to release active App Execution Aliases and clear background registry namespaces before initiating a machine-scoped ProvisionPackage operation.
Actual behavior
Detailed Logs & Diagnostics
When capturing the failure via --verbose-logs, the breakdown occurs precisely at the handoff transition from file verification to the Windows provision environment loopback:
2026-08-23 16:46:06.507 <V> [CLI ] Starting installer selection.
2026-08-23 16:46:12.125 <I> [CORE] Successfully completed #0
2026-08-23 16:46:12.125 <I> [CORE] Starting ProvisionPackage operation #1: com.tinyspeck.slackdesktop_8yrtsj140pw4g
2026-08-23 16:46:12.141 <I> [CORE] Begin waiting for operation #1
2026-08-23 16:46:12.141 <I> [CORE] Begin blocking for operation #1
2026-08-23 16:46:12.252 <E> [CORE] Deployment operation #1: Deployment ProvisionPackageOperation operation with target volume C: on Package com.tinyspeck.slackdesktop_4.51.191.0_x64__8yrtsj140pw4g from: failed with error 0x80070005. See http://microsoft.com for help diagnosing app deployment issues.
2026-08-23 16:46:12.252 <E> [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerCommonCore\Deployment.cpp(54)\WindowsPackageManager.dll!00007FFF086E6EE2: (caller: 00007FFF086E2F15) Exception(1) tid(5158) 80070005 Access is denied.
Msg:[Operation failed: Deployment ProvisionPackageOperation operation with target volume C: on Package com.tinyspeck.slackdesktop_4.51.191.0_x64__8yrtsj140pw4g from: failed with error 0x80070005. See http://microsoft.com for help diagnosing app deployment issues.]
2026-08-23 16:46:12.412 <E> [CLI ] MSIX installer failed: 2147942405
2026-08-23 16:46:12.412 <E> [CLI ] Terminating context: 0x80070005 at C:\__w\1\s\external\pkg\src\AppInstallerCLICore\Workflows\InstallFlow.cpp:239
Manifest Architecture Shift Proof
An analysis of the raw cached manifest highlights why forcing specific scope switches fails. The available installer nodes bind properties exclusively across misaligned paradigms:
Installers:
- Architecture: x64
InstallerType: exe
InstallerUrl: https://downloads.slack-edge.com/...
ProductCode: slack
Scope: user # <--- Win32 EXE hardcoded strictly to Single User Context
- Architecture: x64
InstallerType: msix # <--- Modern MSIX container chosen dynamically for Machine Scope
InstallerUrl: https://downloads.slack-edge.com/...
PackageFamilyName: com.tinyspeck.slackdesktop_8yrtsj140pw4g
Deep Diagnostics and Bypasses Tested
- Sysinternals Process Monitor (ProcMon) Isolation: Direct filtering for ACCESS DENIED on file system/registry transactions yields 0 results from winget.exe. This establishes that the access denial does not stem from local file read/write permissions issues. Instead, it is an explicit structural COM error value returned to WinGet by Windows' AppX servicing subsystem.
- System Environment Cleaning (Failed to fix WinGet): Executing deep cleanup tasks via
DISM.exe /Online /Cleanup-Image /StartComponentCleanup /ResetBase, clearing the local App Execution Alias pathing hooks ($env:LOCALAPPDATA\Microsoft\WindowsApps), and deleting old registry Uninstall keys fails to unblock WinGet. - The Native PowerShell DISM Bypass (Succeeded): Bypassing the WinGet deployment wrapper entirely and processing the target raw manifest package link directly via native deployment commands succeeds cleanly:
Invoke-WebRequest -Uri "https://downloads.slack-edge.com/..." -OutFile "$env:TEMP\Slack.msix"
Add-AppxProvisionedPackage -Online -PackagePath "$env:TEMP\Slack.msix" -SkipLicense
Note: Once injected via DISM, winget list tracks the metadata appropriately. However, a subsequent winget uninstall strips only the active user layer, leaving WinGet's backend tracking index permanently stuck in a loop.
Environment
- Package Manifest Id: SlackTechnologies.Slack
PS C:\Users\simon> winget --info
Windows Package Manager v1.29.290
© 2026 Microsoft. All rights reserved.
Windows: Windows.Desktop v10.0.26100.9168
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.29.290.0
WinGet Directories
-----------------------------------------------------------------------------------------------------------------------
Logs %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Diag…
User Settings %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\sett…
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
Configuration Modules %LOCALAPPDATA%\Microsoft\WinGet\Configuration\Modules
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 Enabled
LocalArchiveMalwareScanOverride Disabled
ProxyCommandLineOptions Disabled
ConfigurationProcessorPath Disabled
DefaultProxy Disabled
PS C:\Users\simon>
- Langage dominant
- C++
- Étoiles
- 26.6k
- Forks
- 1.8k
- Merge moyen
- 3 j 10 h
- PR mergées (30 j)
- 41
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de microsoft/winget-cli
-
Issue-Docs Needs-Triage
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
microsoft/winget-cli#6692 ·
Les mainteneurs répondent en général sous 2 jours
-
Issue-Docs Possible-Duplicate
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
microsoft/winget-cli#6493 · 1 commentaire ·
Les mainteneurs répondent en général sous 2 jours
-
WinGetSourceCreator: PackWithMappingFile should verify makeappx.exe exists before invoking itOuverteIssue-Feature
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
microsoft/winget-cli#6427 ·
Les mainteneurs répondent en général sous 2 jours
-
Issue-Docs msstore
Difficulté 2/5 1-3 heures Accessibilité débutants 64/100
microsoft/winget-cli#6331 · 1 commentaire ·
Les mainteneurs répondent en général sous 2 jours
-
Command-Source Issue-Bug
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
microsoft/winget-cli#6148 ·
Les mainteneurs répondent en général sous 2 jours
Toutes les issues de microsoft/winget-cli
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
stratum-mining/sv2-tp#167 ·
Les mainteneurs répondent en général sous 1 jour
-
Sign up button opens the Sign in page instead of the Sign up page for Enterprise edition serversOuverteauth bug ui/ux
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
MerginMaps/mobile#4795 ·
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
HarperFast/rocksdb-js#1118 ·
Les mainteneurs répondent en général sous 1 jour
-
bug triage
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
Les mainteneurs répondent en général sous 1 jour
-
26.04 bug dark-mode Easy Hack impress symptom: visual
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
CollaboraOnline/online#16421 · 1 commentaire ·