注册应用程序时Windows 10 Powershell权限被拒绝

注册应用程序时Windows 10 Powershell权限被拒绝

我有一个外置硬盘,我在上面安装了一款来自 Windows 应用商店的游戏。我的笔记本电脑在某个时候被重置了,现在 Windows 应用商店无法识别它已安装在那里。我尝试通过管理员 Powershell 提示手动注册该包,但它只返回一个关于权限的错误。有人知道我该如何注册这个包吗?

我使用的命令:

Get-AppxPackage | % { Add-AppxPackage -c -Register "D:\WindowsApps\Microsoft.SeaofThieves_2.95.2035.2_x64__8wekyb3d8bbwe\AppxManifest.xml" -verbose }

结果:

Confirm
Are you sure you want to perform this action?
Performing the operation "Register package" on target
"D:\WindowsApps\Microsoft.SeaofThieves_2.95.2035.2_x64__8wekyb3d8bbwe\AppxManifest.xml".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): Y

Add-AppxPackage : Deployment failed with HRESULT: 0x80070005, Toegang geweigerd.
error 0x80070005: Opening file from location: AppxManifest.xml failed with error: Toegang geweigerd.
.
NOTE: For additional information, look for [ActivityId] 4a766b3f-fac4-0004-1f28-774ac4fad601 in the Event Log or use th
e command line Get-AppPackageLog -ActivityID 4a766b3f-fac4-0004-1f28-774ac4fad601
At line:1 char:23
+ ... ckage | % { Add-AppxPackage -c -Register "D:\WindowsApps\Microsoft.Se ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : SecurityError: (D:\WindowsApps\...ppxManifest.xml:String) [Add-AppxPackage], PSSecurityE
   xception
    + FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.AddAppxPackageCommand

VERBOSE: Operation completed for: D:\WindowsApps\Microsoft.SeaofThieves_2.95.2035.2_x64__8wekyb3d8bbwe\AppxManifest.xml

相关内容