Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Package Issue]: Microsoft.AppInstaller: Cannot uninstall the previous version #129422

Open
2 tasks done
ArchGuyWu opened this issue Dec 6, 2023 · 1 comment
Open
2 tasks done
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Upgrade-Issue Issue with the package's installer while upgrading a package's version.

Comments

@ArchGuyWu
Copy link

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

Microsoft.AppInstaller cannot be upgraded, because its previous version cannot be uninstalled.

Steps to reproduce

1、install an earlier version of Microsoft.AppInstaller
2、use winget to upgrade it

Actual behavior

Its previous version cannot be uninstalled, and cannot be upgraded.

Expected behavior

Its previous version can be uninstalled before upgrading.

Environment

Windows: Windows.Server v10.0.20348.2113
Microsoft.AppInstaller 1.20.2201.0

Screenshots and Logs

`2023-12-06 12:07:14.141 [CORE] WinGet, version [1.6.3133], activity [{2F6ADB10-0C51-4562-B64C-0C7614CDF4D4}]
2023-12-06 12:07:14.142 [CORE] OS: Windows.Server v10.0.20348.2113
2023-12-06 12:07:14.142 [CORE] Command line Args: "C:\Users\user\scoop\apps\winget\current\winget.exe" uninstall Microsoft.AppInstaller
2023-12-06 12:07:14.142 [CORE] IsCOMCall:0; Caller: winget-cli
2023-12-06 12:07:14.145 [CLI ] WinGet invoked with arguments: 'uninstall' 'Microsoft.AppInstaller'
2023-12-06 12:07:14.145 [CLI ] Found subcommand: uninstall
2023-12-06 12:07:14.145 [CLI ] Leaf command to execute: root:uninstall
2023-12-06 12:07:14.146 [CLI ] Executing command: uninstall
2023-12-06 12:07:14.148 [REPO] Source named 'msstore' is already defined at origin User. The source from origin Default is dropped.
2023-12-06 12:07:14.148 [REPO] Default source requested, only 1 source available, using the only source: winget
2023-12-06 12:07:14.150 [REPO] Source named 'msstore' is already defined at origin User. The source from origin Default is dropped.
2023-12-06 12:07:14.150 [REPO] Named source requested, found: winget
2023-12-06 12:07:14.151 [CORE] Started trust validation of msix at: C:\Users\user\AppData\Local\Microsoft/WinGet\State\defaultState\Microsoft.PreIndexed.Package\Microsoft.Winget.Source_8wekyb3d8bbwe\source.msix
2023-12-06 12:07:14.197 [CORE] Result for certificate chain validation of Microsoft origin: 0
2023-12-06 12:07:14.237 [CORE] Result for trust info validation of the msix: 0
2023-12-06 12:07:14.275 [CORE] Started trust validation of msix at: C:\Users\user\AppData\Local\Microsoft/WinGet\State\defaultState\Microsoft.PreIndexed.Package\Microsoft.Winget.Source_8wekyb3d8bbwe\source.msix
2023-12-06 12:07:14.309 [CORE] Result for certificate chain validation of Microsoft origin: 0
2023-12-06 12:07:14.343 [CORE] Result for trust info validation of the msix: 0
2023-12-06 12:07:14.594 [REPO] Opening SQLite Index for ImmutableRead at 'C:\Users\user\AppData\Local\Temp\WinGet\defaultState{5F531EBD-B5FC-413D-A749-BAF9B74AC61F}'
2023-12-06 12:07:14.594 [SQL ] Opening SQLite connection #1: 'C:\Users\user\AppData\Local\Temp\WinGet\defaultState{5F531EBD-B5FC-413D-A749-BAF9B74AC61F}' [1, 40]
2023-12-06 12:07:14.595 [REPO] Opened SQLite Index with version [1.7], last write [2023-12-06 07:49:41.000]
2023-12-06 12:07:14.634 [REPO] Source named 'msstore' is already defined at origin User. The source from origin Default is dropped.
2023-12-06 12:07:14.636 [REPO] Creating new SQLite Index with version [Latest] at ':memory:'
2023-12-06 12:07:14.636 [SQL ] Opening SQLite connection #2: ':memory:' [6, 0]
2023-12-06 12:07:14.640 [REPO] Reading MSI UpgradeCodes
2023-12-06 12:07:14.656 [REPO] Reading MSI UpgradeCodes
2023-12-06 12:07:14.669 [SQL ] Opening SQLite connection #3: ':memory:' [6, 0]
2023-12-06 12:07:14.747 [REPO] Opening SQLite Index for ReadWrite at 'C:\Users\user\AppData\Local\Microsoft/WinGet\State\defaultState\Microsoft.Winget.Source_8wekyb3d8bbwe\installed.db'
2023-12-06 12:07:14.747 [SQL ] Opening SQLite connection #4: 'C:\Users\user\AppData\Local\Microsoft/WinGet\State\defaultState\Microsoft.Winget.Source_8wekyb3d8bbwe\installed.db' [2, 0]
2023-12-06 12:07:14.748 [REPO] Opened SQLite Index with version [1.6], last write [2023-12-05 11:16:35.000]
2023-12-06 12:07:14.763 [REPO] Finding installed package from available package using system reference search: Query:[none] Include:PackageFamilyName='microsoft.desktopappinstaller_8wekyb3d8bbwe'[Exact] Include:NormalizedNameAndPublisher='appinstaller'+'microsoft'[Exact]
2023-12-06 12:07:14.764 [REPO] Opening pinning index
2023-12-06 12:07:14.764 [REPO] Opening existing pinning index
2023-12-06 12:07:14.764 [REPO] Opening SQLite Index for ReadWrite at 'C:\Users\user\AppData\Local\Microsoft/WinGet\State\defaultState\pinning.db'
2023-12-06 12:07:14.764 [SQL ] Opening SQLite connection #5: 'C:\Users\user\AppData\Local\Microsoft/WinGet\State\defaultState\pinning.db' [2, 0]
2023-12-06 12:07:14.765 [REPO] Opened Pinning Index with version [1.0], last write [2023-11-08 17:56:55.000]
2023-12-06 12:07:14.765 [CLI ] Found one app. App id: Microsoft.AppInstaller App name: App Installer
2023-12-06 12:07:14.768 [CLI ] Removing MSIX package: Microsoft.DesktopAppInstaller_1.20.2201.0_x64__8wekyb3d8bbwe
2023-12-06 12:07:14.768 [CORE] Starting RemovePackage operation #0: Microsoft.DesktopAppInstaller_1.20.2201.0_x64__8wekyb3d8bbwe
2023-12-06 12:07:14.772 [CORE] Begin waiting for operation #0
2023-12-06 12:07:14.772 [CORE] Begin blocking for operation #0
2023-12-06 12:07:14.793 [CORE] Deployment operation #0: error 0x80070032: AppX Deployment Remove operation on package Microsoft.DesktopAppInstaller_1.20.2201.0_x64__8wekyb3d8bbwe from: C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_1.20.2201.0_x64__8wekyb3d8bbwe failed. This app is part of Windows and cannot be uninstalled on a per-user basis. An administrator can attempt to remove the app from the computer using Turn Windows Features on or off. However, it may not be possible to uninstall the app.
2023-12-06 12:07:14.793 [FAIL] C:__w\1\s\external\pkg\src\AppInstallerCommonCore\Deployment.cpp(54)\WindowsPackageManager.dll!00007FFEBB3F0840: (caller: 00007FFEBB3F1E4C) Exception(1) tid(a5c) 80070032 The request is not supported.

Msg:[Operation failed: error 0x80070032: AppX Deployment Remove operation on package Microsoft.DesktopAppInstaller_1.20.2201.0_x64__8wekyb3d8bbwe from: C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_1.20.2201.0_x64__8wekyb3d8bbwe failed. This app is part of Windows and cannot be uninstalled on a per-user basis. An administrator can attempt to remove the app from the computer using Turn Windows Features on or off. However, it may not be possible to uninstall the app.]

2023-12-06 12:07:14.870 [CLI ] MSIXUninstall uninstaller failed: 2147942450
2023-12-06 12:07:14.871 [CLI ] Terminating context: 0x80070032 at C:__w\1\s\external\pkg\src\AppInstallerCLICore\Workflows\UninstallFlow.cpp:16a`

@ArchGuyWu ArchGuyWu added the Issue-Bug It either shouldn't be doing this or needs an investigation. label Dec 6, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage This work item needs to be triaged by a member of the core team. label Dec 6, 2023
@stephengillie stephengillie added Upgrade-Issue Issue with the package's installer while upgrading a package's version. and removed Needs-Triage This work item needs to be triaged by a member of the core team. labels Dec 6, 2023
@denelon
Copy link
Contributor

denelon commented Dec 6, 2023

The "App Installer" is marked as a system component so it cannot be uninstalled. You likely need to delete the installed.db files under "%LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState" to get the earlier version to function, then you can test the upgrade behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Upgrade-Issue Issue with the package's installer while upgrading a package's version.
Projects
None yet
Development

No branches or pull requests

3 participants