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

App installer cannot be uninstalled after manually installed on windows server 2022 #3617

Open
ArchGuyWu opened this issue Sep 13, 2023 · 1 comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.

Comments

@ArchGuyWu
Copy link

ArchGuyWu commented Sep 13, 2023

Brief description of your issue

Recently, I installed app installer to install msstore apps, but found that it cannot.
So when I try to uninstall it, it said that "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.".

Steps to reproduce

install Microsoft.VCLibs.140.00.UWPDesktop
install Microsoft.UI.Xaml.2.7
install Microsoft.DesktopAppInstaller
run winget
uninstall Microsoft.DesktopAppInstaller

Expected behavior

App installer got uninstalled.

Actual behavior

App installed cannot be uninstalled.
2023-09-13_12-24
2023-09-13_12-25

Environment

Windows Package Manager v1.5.2201
Windows: Windows.Server v10.0.20348.1970
Microsoft.DesktopAppInstaller v1.20.2201.0
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Sep 13, 2023
@stephengillie stephengillie added Issue-Bug It either shouldn't be doing this or needs an investigation. and removed Needs-Triage Issue need to be triaged labels Sep 13, 2023
@jantari
Copy link

jantari commented Dec 19, 2023

Noticed the same.

Trying to uninstall with Remove-AppxProvisionedPackage produces an unhelpful error:

> Remove-AppxProvisionedPackage -Online -PackageName 'Microsoft.DesktopAppInstaller_2023.1209.158.0_neutral_~_8wekyb3d8bbwe' -Verbose
VERBOSE: Target Image Version 10.0.20348.2159
Remove-AppxProvisionedPackage : Removal failed. Please contact your software vendor.
At line:1 char:1
+ Remove-AppxProvisionedPackage -Online -PackageName 'Microsoft.Desktop ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Remove-AppxProvisionedPackage], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.RemoveAppxProvisionedPackageCommand

attempting to uninstall with DISM is more helpful but still won't work:

> dism.exe /Online /Remove-ProvisionedAppxPackage /PackageName:Microsoft.DesktopAppInstaller_1.21.3421.0_x64__8wekyb3d8bbwe

Deployment Image Servicing and Management tool
Version: 10.0.20348.681

Image Version: 10.0.20348.2159


Error: 15610

Removal failed. Please contact your software vendor.

The DISM log file can be found at C:\Windows\Logs\DISM\dism.log

where 15610 maps to ERROR_REMOVE_FAILED from winerror.h and the dism.log file has the following:

dism.log
2023-12-19 14:20:03, Info                  DISM   PID=6068 TID=3448 Scratch directory set to 'C:\Users\administrator\AppData\Local\Temp\'. - CDISMManager::put_ScratchDir
2023-12-19 14:20:03, Info                  DISM   PID=6068 TID=3448 DismCore.dll version: 10.0.20348.681 - CDISMManager::FinalConstruct
2023-12-19 14:20:03, Info                  DISM   Initialized Panther logging at C:\Windows\Logs\DISM\dism.log
2023-12-19 14:20:03, Info                  DISM   PID=6068 TID=3448 Successfully loaded the ImageSession at "C:\Windows\system32\Dism" - CDISMManager::LoadLocalImageSession
2023-12-19 14:20:03, Info                  DISM   Initialized Panther logging at C:\Windows\Logs\DISM\dism.log
2023-12-19 14:20:03, Info                  DISM   DISM Provider Store: PID=6068 TID=3448 Found and Initialized the DISM Logger. - CDISMProviderStore::Internal_InitializeLogger
2023-12-19 14:20:03, Info                  DISM   Initialized Panther logging at C:\Windows\Logs\DISM\dism.log
2023-12-19 14:20:03, Info                  DISM   DISM Manager: PID=6068 TID=3448 Successfully created the local image session and provider store. - CDISMManager::CreateLocalImageSession
2023-12-19 14:20:03, Info                  DISM   DISM.EXE:
2023-12-19 14:20:03, Info                  DISM   DISM.EXE: <----- Starting Dism.exe session ----->
2023-12-19 14:20:03, Info                  DISM   DISM.EXE:
2023-12-19 14:20:03, Info                  DISM   DISM.EXE: Host machine information: OS Version=10.0.20348, Running architecture=amd64, Number of processors=2
2023-12-19 14:20:03, Info                  DISM   DISM.EXE: Dism.exe version: 10.0.20348.681
2023-12-19 14:20:03, Info                  DISM   DISM.EXE: Executing command line: "C:\Windows\system32\Dism.exe" /Online /Remove-ProvisionedAppxPackage /PackageName:Microsoft.DesktopAppInstaller_1.21.3421.0_x64__8wekyb3d8bbwe
2023-12-19 14:20:03, Info                  DISM   DISM Manager: PID=6068 TID=3448 physical location path: C:\ - CDISMManager::CreateImageSession
2023-12-19 14:20:03, Info                  DISM   DISM Manager: PID=6068 TID=3448 Event name for current DISM session is Global\{CDF813B3-C970-4A7A-9B18-D617DDC986E3} - CDISMManager::CheckSessionAndLock
2023-12-19 14:20:03, Info                  DISM   DISM Manager: PID=6068 TID=3448 Create session event 0x25c for current DISM session and event name is Global\{CDF813B3-C970-4A7A-9B18-D617DDC986E3}  - CDISMManager::CheckSessionAndLock
2023-12-19 14:20:03, Info                  DISM   DISM Manager: PID=6068 TID=3448 Copying DISM from "C:\Windows\System32\Dism" - CDISMManager::CreateImageSessionFromLocation
2023-12-19 14:20:03, Info                  DISM   DISM Manager: PID=6068 TID=3448 Successfully loaded the ImageSession at "C:\Users\administrator\AppData\Local\Temp\3FA8B9D4-51B4-49C4-AB4B-0F3C4663D466" - CDISMManager::LoadRemoteImageSession
2023-12-19 14:20:03, Info                  DISM   DISM Image Session: PID=5816 TID=3888 Instantiating the Provider Store. - CDISMImageSession::get_ProviderStore
2023-12-19 14:20:03, Info                  DISM   DISM OS Provider: PID=5816 TID=3888 Defaulting SystemPath to C:\ - CDISMOSServiceManager::Final_OnConnect
2023-12-19 14:20:03, Info                  DISM   DISM OS Provider: PID=5816 TID=3888 Defaulting Windows folder to C:\Windows - CDISMOSServiceManager::Final_OnConnect
2023-12-19 14:20:03, Info                  DISM   DISM Provider Store: PID=5816 TID=3888 Attempting to initialize the logger from the Image Session. - CDISMProviderStore::Final_OnConnect
2023-12-19 14:20:03, Info                  DISM   Initialized Panther logging at C:\Windows\Logs\DISM\dism.log
2023-12-19 14:20:03, Info                  DISM   DISM Provider Store: PID=5816 TID=3888 Found and Initialized the DISM Logger. - CDISMProviderStore::Internal_InitializeLogger
2023-12-19 14:20:03, Info                  DISM   Initialized Panther logging at C:\Windows\Logs\DISM\dism.log
2023-12-19 14:20:03, Info                  DISM   Initialized Panther logging at C:\Windows\Logs\DISM\dism.log
2023-12-19 14:20:03, Info                  DISM   DISM Manager: PID=6068 TID=3448 Image session successfully loaded from the temporary location: C:\Users\administrator\AppData\Local\Temp\3FA8B9D4-51B4-49C4-AB4B-0F3C4663D466 - CDISMManager::CreateImageSession
2023-12-19 14:20:03, Info                  DISM   DISM.EXE: Target image information: OS Version=10.0.20348.2159, Image architecture=amd64
2023-12-19 14:20:03, Info                  DISM   DISM.EXE: Image session version: 10.0.20348.1
2023-12-19 14:20:03, Info                  DISM   DISM Transmog Provider: PID=5816 TID=6920 Current image session is [ONLINE] - CTransmogManager::GetMode
2023-12-19 14:20:03, Info                  DISM   DISM Transmog Provider: PID=5816 TID=6920 Audit Mode: [No] - CTransmogManager::Initialize
2023-12-19 14:20:03, Info                  DISM   DISM Transmog Provider: PID=5816 TID=6920 GetProductType: ProductType = [ServerNT] - CTransmogManager::GetProductType
2023-12-19 14:20:03, Info                  DISM   DISM Transmog Provider: PID=5816 TID=6920 Product Type: [ServerNT] - CTransmogManager::Initialize
2023-12-19 14:20:03, Info                  DISM   DISM Transmog Provider: PID=5816 TID=6920 Product Type ServerNT : [Yes] - CTransmogManager::Initialize
2023-12-19 14:20:03, Info                  CSI    00000001 Shim considered [l:126]'\??\C:\Windows\Servicing\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.20348.2084_none_b1fc2e60f963dd96\wcp.dll' : got STATUS_OBJECT_PATH_NOT_FOUND
2023-12-19 14:20:03, Info                  CSI    00000002 Shim considered [l:123]'\??\C:\Windows\WinSxS\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.20348.2084_none_b1fc2e60f963dd96\wcp.dll' : got STATUS_SUCCESS
2023-12-19 14:20:03, Info                  DISM   DISM Driver Manager: PID=5816 TID=6920 Further logs for driver related operations can be found in the target operating system at %WINDIR%\inf\setupapi.offline.log - CDriverManager::Initialize
2023-12-19 14:20:03, Info                  CSI    00000001 Shim considered [l:126]'\??\C:\Windows\Servicing\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.20348.2084_none_b1fc2e60f963dd96\wcp.dll' : got STATUS_OBJECT_PATH_NOT_FOUND
2023-12-19 14:20:03, Info                  CSI    00000002 Shim considered [l:123]'\??\C:\Windows\WinSxS\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.20348.2084_none_b1fc2e60f963dd96\wcp.dll' : got STATUS_SUCCESS
2023-12-19 14:20:03, Info                  DISM   DISM OS Provider: PID=5816 TID=6920 Determined System directory to be C:\Windows\System32 - CDISMOSServiceManager::get_SystemDirectory
2023-12-19 14:20:03, Info                  DISM   DISM Package Manager: PID=5816 TID=6920 Finished initializing the CbsConUI Handler. - CCbsConUIHandler::Initialize
2023-12-19 14:20:03, Info                  CSI    00000001 Shim considered [l:126]'\??\C:\Windows\Servicing\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.20348.2084_none_b1fc2e60f963dd96\wcp.dll' : got STATUS_OBJECT_PATH_NOT_FOUND
2023-12-19 14:20:03, Info                  CSI    00000002 Shim considered [l:123]'\??\C:\Windows\WinSxS\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.20348.2084_none_b1fc2e60f963dd96\wcp.dll' : got STATUS_SUCCESS
2023-12-19 14:20:03, Info                  DISM   DISM Package Manager: PID=5816 TID=6920 CBS is being initialized for online use. More information about CBS actions can be located at: %windir%\logs\cbs\cbs.log - CDISMPackageManager::Initialize
2023-12-19 14:20:03, Info                  DISM   DISM Package Manager: PID=5816 TID=6920 Loaded servicing stack for online use only. - CDISMPackageManager::CreateCbsSession
2023-12-19 14:20:03, Info                  DISM   DISM Appx Provider: PID=5816 TID=3888 Processing 'packagename' option at index 2 - CAppxManager::ProcessCommandRemoveAllUserAppx
2023-12-19 14:20:03, Info                  DISM   DISM Appx Provider: PID=5816 TID=3888 packagename='Microsoft.DesktopAppInstaller_1.21.3421.0_x64__8wekyb3d8bbwe' - CAppxManager::ProcessCommandRemoveAllUserAppx
2023-12-19 14:20:03, Error                 DISM   DISM Appx Provider: PID=5816 TID=3888 Failed to uninstall becuase policy prevents the removal of this package - CAppxManager::RemoveAllUserAppx(hr:0x80073cfa)
2023-12-19 14:20:03, Error                 DISM   DISM Appx Provider: PID=5816 TID=3888 Failed to remove package 'Microsoft.DesktopAppInstaller_1.21.3421.0_x64__8wekyb3d8bbwe' - CAppxManager::ProcessCommandRemoveAllUserAppx(hr:0x80073cfa)
2023-12-19 14:20:03, Error                 DISM   DISM Appx Provider: PID=5816 TID=3888 Failed processing command to remove Appx package - CAppxManager::ExecuteCmdLine(hr:0x80073cfa)
2023-12-19 14:20:03, Info                  DISM   DISM Package Manager: PID=5816 TID=3888 Finalizing CBS core. - CDISMPackageManager::Finalize
2023-12-19 14:20:04, Info                  DISM   DISM Manager: PID=6068 TID=3448 Closing session event handle 0x25c - CDISMManager::CleanupImageSessionEntry
2023-12-19 14:20:04, Info                  DISM   DISM.EXE: Image session has been closed. Reboot required=no.
2023-12-19 14:20:04, Info                  DISM   DISM.EXE:
2023-12-19 14:20:04, Info                  DISM   DISM.EXE: <----- Ending Dism.exe session ----->
2023-12-19 14:20:04, Info                  DISM   DISM.EXE:

All of this was done on a Windows Server 2022 VM.

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.
Projects
None yet
Development

No branches or pull requests

3 participants