App-V 应用程序无法启动,并记录错误0xc0000225

应用对象
Windows 10, version 1607, all editions Windows Server 2016, all editions Windows 10, version 1703, all editions Windows 10, version 1709, all editions Windows 10, version 1803, all editions Windows 10, version 1809, all editions Windows Server 2019, all editions

症状

App-V 应用程序无法启动并记录 0xc0000225 Microsoft-AppV-Client\Debug 日志中的 Log 文件夹:Applications and ServicesLogs\Microsoft\AppV\ServiceLog 中的错误。

解决方法

创建 MaxAttachWaitTimeInMillisecond 注册表项,以在虚拟环境关闭并快速重启但基础卷无法枚举时添加睡眠延迟以解决计时问题。

使用本地管理员的凭据创建和设置以下注册表项:

注册表子项:HKLM\SOFTWARE\Microsoft\AppV\MAV\Configuration

注册表项名称:MaxAttachWaitTimeInMilliseconds

注册表类型:DWORD

将值设置为非零将启用修复。 默认值为零,最大值为 10,000 (注册表中未设置逗号)

MaxAttachWaitTimeInMilliseconds 值 1 通常足以消除应用程序启动失败。 如果应用程序继续失败并出现相同的启动错误,请使用越来越大的值来增加驱动程序在枚举检查之间的睡眠时间。 还可以查看 Log 文件夹下的 Microsoft-AppV-Client\Debug 日志中的详细事件:Applications and ServicesLogs\Microsoft\AppV\ServiceLog\ ,以查看已使用/需要多少睡眠,然后相应地重新调整 MaxAttachWaitTimeInMilliseconds。

注意

MaxAttachWaitTimeInMilliseconds 的值过大可能会使应用程序挂起。

先决条件

若要使用 MaxAttachWaitTimeInMilliseconds,请安装最新累积更新 (LCU) 2019 年 3 月 19 日或更高版本发布,例如:

  • Windows 10版本 1607 和 Windows Server 2016 KB4489889 或更高版本的 LCU。
  • Windows 10版本 1703 KB4489888 或更高版本的 LCU。
  • Windows 10版本 1709 的 KB4489890 或更高版本 LCU。
  • Windows 10版本 1803 KB4489894 或更高版本的 LCU。
  • 2019 Windows 10 版本 1809 和 Windows Server KB4482887 或更高 LCU。