new-WindowsImage 因 0x8007007E 而停滞,无法加载 unattend.dll

new-WindowsImage 因 0x8007007E 而停滞,无法加载 unattend.dll

我正在尝试将捕获的 .VHDX 转换为 .WIM 文件。该文件是 syspreped Windows 7 通用映像。

  • 我正在使用 Windows 8.1,并且安装了 Windows ADK。
  • 在 powershell 中我发出命令。
    New-WindowsImafe -capturepath e:\ -name Windows7Image -ImagePath d:\wim\windows7.wim -description "Windows 7 Image"
  • 该过程开始运行但以以下错误结束:
new-windowsimage:无法加载 DLL“unattend.dll”:找不到指定的模块。
(来自 HRESULT 的异常:0x8007007E)
位于行:1 字符:1
+ new-windowsimage-capturepath e:\-name windws7Image-ImagePath D:\wim\windows7。...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   + CategoryInfo:未指定:(:) [New-WindowsImage],DllNotFoundException
   + 完全合格的错误标识:System.DllNotFoundException,Microsoft.Dism.Commands.NewWindowsImageCommand

当我转到图像路径时,我可以确认该过程已启动。不确定它为什么尝试加载 unattend.dll。我假设此操作不需要它。

答案1

当然,在第一次尝试悬赏 30 分钟后,我意识到我们都做错了。这是在 64 位 Windows 上从 Powershell (x86) 运行时收到的消息。它在非 x86 Powershell 中运行良好。为了安全起见,您还需要以管理员身份运行。

相关内容