清理 Windows 商店应用安装状态

清理 Windows 商店应用安装状态

我正在尝试删除旧版 Microsoft 3D Viewer 的所有痕迹。这些 PowerShell 命令表明它已安装

Get-AppXPackage -All Microsoft.Microsoft3DViewer
Get-WmiObject -Query "Select * from Win32_InstalledStoreProgram where Name='Microsoft.Microsoft3DViewer'"

但事实并非如此:我已卸载它并删除了所有我能找到的文件和注册表项(甚至以 SYSTEM 身份运行 regedit)。请问这个状态存储在哪里,以便我可以破解它?


以下是这两个命令的输出,以及失败的 Remove-AppxPackage。您可以看到没有 InstallLocation,并且它是为 SYSTEM 用户的 SID 安装的 (!)。我还删除了 HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore 中提及它的所有键。

Remove-AppxPackage 错误为 80070057,故障排除页面说是错误的清单,但我没有安装,而是删除了。C:\ProgramData\Microsoft\Windows\AppRepository 中有清单,我尝试从备份中恢复它们,但没有任何效果。

PS C:\WINDOWS\system32> Get-AppXPackage -All Microsoft.Microsoft3DViewer

Name                   : Microsoft.Microsoft3DViewer
Publisher              : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
Architecture           : X64
ResourceId             :
Version                : 7.2107.7012.0
PackageFullName        : Microsoft.Microsoft3DViewer_7.2107.7012.0_x64__8wekyb3d8bbwe
InstallLocation        :
IsFramework            : False
PackageFamilyName      : Microsoft.Microsoft3DViewer_8wekyb3d8bbwe
PublisherId            : 8wekyb3d8bbwe
PackageUserInformation : {S-1-5-18 [S-1-5-18]: Installed}
IsResourcePackage      : False
IsBundle               : False
IsDevelopmentMode      : False
NonRemovable           :
IsPartiallyStaged      : False
SignatureKind          :
Status                 : Ok

PS C:\WINDOWS\system32> Get-WmiObject -Query "Select * from Win32_InstalledStoreProgram where Name='Microsoft.Microsoft3DViewer'"

__GENUS          : 2
__CLASS          : Win32_InstalledStoreProgram
__SUPERCLASS     :
__DYNASTY        : Win32_InstalledStoreProgram
__RELPATH        : Win32_InstalledStoreProgram.ProgramId="Microsoft.Microsoft3DViewer_7.2107.7012.0_x64__8wekyb3d8bbwe"
__PROPERTY_COUNT : 6
__DERIVATION     : {}
__NAMESPACE      : root\cimv2
__PATH           : \\COMPUTER\root\cimv2:Win32_InstalledStoreProgram.ProgramId="Microsoft.Microsoft3DViewer_7.2107.7012.0
                   _x64__8wekyb3d8bbwe"
Architecture     : X64
Language         : 1033
Name             : Microsoft.Microsoft3DViewer
ProgramId        : Microsoft.Microsoft3DViewer_7.2107.7012.0_x64__8wekyb3d8bbwe
Vendor           : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
Version          : 7.2107.7012.0

(running as SYSTEM user)
PS C:\WINDOWS\system32\WindowsPowerShell\v1.0> Get-AppxPackage Microsoft.Microsoft3DViewer |Remove-AppxPackage
Remove-AppxPackage : Deployment failed with HRESULT: 0x80073CFA, Removal failed. Please contact your software vendor.
(Exception from HRESULT: 0x80073CFA)
Unspecified error
NOTE: For additional information, look for [ActivityId] bbb8aa9a-f1f5-0009-4383-b9bbf5f1d901 in the Event Log or use
the command line Get-AppPackageLog -ActivityID bbb8aa9a-f1f5-0009-4383-b9bbf5f1d901
At line:1 char:46
+ Get-AppxPackage Microsoft.Microsoft3DViewer |Remove-AppxPackage
+                                              ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (Microsoft.Micro...__8wekyb3d8bbwe:String) [Remove-AppxPackage], IOException
    + FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.RemoveAppxPackageCommand

PS C:\WINDOWS\system32\WindowsPowerShell\v1.0> Get-AppPackageLog -ActivityID bbb8aa9a-f1f5-0009-4383-b9bbf5f1d901

Time                      ID           Message
----                      --           -------
28/09/2023 13:14:02       603          Started deployment DeStage operation on a package with main parameter
                                       Microsoft.Microsoft3DViewer_7.2107.7012.0_x64__8wekyb3d8bbwe and Options 0 and
                                       0. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app
                                       deployment issues.
28/09/2023 13:14:02       10002        Creating Resiliency File C:\ProgramData\Microsoft\Windows\AppRepository\a6b75659
                                       -88fb-4d44-9214-bd69c467649a_S-1-5-18_9.rslc for Remove Operation on Package
                                       Microsoft.Microsoft3DViewer_7.2107.7012.0_x64__8wekyb3d8bbwe.
28/09/2023 13:14:02       607          Deployment Remove operation on package
                                       Microsoft.Microsoft3DViewer_7.2107.7012.0_x64__8wekyb3d8bbwe has been de-queued
                                       and is running for user SID S-1-5-18.
28/09/2023 13:14:02       216          App manifest validation warning: Declared namespace
                                       http://schemas.microsoft.com/developer/appx/2015/build is inapplicable, it will
                                       be ignored during manifest processing.
28/09/2023 13:14:02       216          App manifest validation warning: Declared namespace
                                       http://schemas.microsoft.com/developer/appx/2015/build is inapplicable, it will
                                       be ignored during manifest processing.
28/09/2023 13:14:02       855          Finished resolving action lists. DeploymentRequest action lists:
                                       removePackageList: Microsoft.Microsoft3DViewer_7.2107.7012.0_x64__8wekyb3d8bbwe
                                       Microsoft.Microsoft3DViewer_2021.2107.7012.0_neutral_~_8wekyb3d8bbwe.
28/09/2023 13:14:02       605          The last successful state reached was MachineRegisterRemove. Failure occurred
                                       before reaching the next state De-Indexed. hr: 0x80070057
28/09/2023 13:14:02       401          Deployment DeStage operation with target volume C: on Package
                                       Microsoft.Microsoft3DViewer_7.2107.7012.0_x64__8wekyb3d8bbwe from:
                                       (Microsoft.Microsoft3DViewer_7.2107.7012.0_x64__8wekyb3d8bbwe)  failed with
                                       error 0x80070057. See http://go.microsoft.com/fwlink/?LinkId=235160 for help
                                       diagnosing app deployment issues.
28/09/2023 13:14:02       404          AppX Deployment operation failed for package
                                       Microsoft.Microsoft3DViewer_7.2107.7012.0_x64__8wekyb3d8bbwe with error
                                       0x80073CFA. The specific error text for this failure is: Unspecified error

答案1

怎么样?

winget uninstall --accept-source-agreements "Microsoft.Microsoft3DViewer_8wekyb3d8bbwe"    

从提升的命令提示符?

相关内容