UWP 应用安装失败,出现错误 0x80070005:添加磁贴失败,出现意外错误
Installation of UWP app fails with error 0x80070005: Adding a tile failed with unexpected error
我正在尝试使用 powershell 命令安装 UWP 应用
启动进程 powershell "-ExecutionPolicy Unrestricted -NoExit -Command "cd \
"C:\Users\Administrator\Documents\Visual Studio 2015\Projects\App3\AppPackages\App3\App3_1.0.0.0_x64_Test`"; & .\Add-AppDevPackage.ps1
-Force`" |Out-File C:\Users\Administrator\Desktop\log。 txt" -Verb RunAs -Wait
其中 AppDevPackage.ps1 是应用程序中提供的 powershell 脚本。
当我尝试使用 jenkins 调用脚本时,通过使用右键单击 -> 运行 和 powershell.But 运行 脚本 运行 没问题或使用计划任务抛出以下错误:
Add-AppxPackage:部署失败,HRESULT:0x80073CF6,无法注册包。
错误 0x80070005:添加磁贴失败,出现意外错误。
注意:有关其他信息,请在中查找 [ActivityId] 5e8c5432-8277-0004-c28f-8c5e7782d201
事件日志或使用命令行 Get-AppxLog -ActivityID 5e8c5432-8277-0004-c28f-8c5e7782d201
在 C:\Users\Administrator\Documents\Visual 工作室
2015\Projects\App3\AppPackages\App3\App3_1.0.0.0_x64_Test\Add-AppDevPackage.ps1:388 char:13
+ 添加 AppxPackage -Path $DeveloperPackagePath.FullName -Dep ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~
+ CategoryInfo : WriteError: (C:\Users\Admini...0.0.0_x64.appx:String) [Add-AppxPac
影], IOException
+ FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.AddA
ppxPackageCommand
我也查看了事件日志,即使它给出了相同的错误 code.I 需要 运行 这个脚本来实现自动化,因此不能 运行 手动。
除了为 powershell 脚本配置计划任务并使用以下命令从 jenkins 调用它之外,我尝试了各种方法:
schtasks /运行 /tn
是唯一对我有用的东西。
同时确保使用具有管理权限的用户帐户运行具有最高权限的计划任务。
我正在尝试使用 powershell 命令安装 UWP 应用
启动进程 powershell "-ExecutionPolicy Unrestricted -NoExit -Command "cd \
"C:\Users\Administrator\Documents\Visual Studio 2015\Projects\App3\AppPackages\App3\App3_1.0.0.0_x64_Test`"; & .\Add-AppDevPackage.ps1
-Force`" |Out-File C:\Users\Administrator\Desktop\log。 txt" -Verb RunAs -Wait
其中 AppDevPackage.ps1 是应用程序中提供的 powershell 脚本。
当我尝试使用 jenkins 调用脚本时,通过使用右键单击 -> 运行 和 powershell.But 运行 脚本 运行 没问题或使用计划任务抛出以下错误:
Add-AppxPackage:部署失败,HRESULT:0x80073CF6,无法注册包。
错误 0x80070005:添加磁贴失败,出现意外错误。
注意:有关其他信息,请在中查找 [ActivityId] 5e8c5432-8277-0004-c28f-8c5e7782d201 事件日志或使用命令行 Get-AppxLog -ActivityID 5e8c5432-8277-0004-c28f-8c5e7782d201
在 C:\Users\Administrator\Documents\Visual 工作室 2015\Projects\App3\AppPackages\App3\App3_1.0.0.0_x64_Test\Add-AppDevPackage.ps1:388 char:13 + 添加 AppxPackage -Path $DeveloperPackagePath.FullName -Dep ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~ + CategoryInfo : WriteError: (C:\Users\Admini...0.0.0_x64.appx:String) [Add-AppxPac 影], IOException + FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.AddA ppxPackageCommand
我也查看了事件日志,即使它给出了相同的错误 code.I 需要 运行 这个脚本来实现自动化,因此不能 运行 手动。
除了为 powershell 脚本配置计划任务并使用以下命令从 jenkins 调用它之外,我尝试了各种方法:
schtasks /运行 /tn
是唯一对我有用的东西。
同时确保使用具有管理权限的用户帐户运行具有最高权限的计划任务。