在未激活 Windows 更新服务的情况下安装 Windows 更新文件 (*.msu)

Install Windows Update file (*.msu) without having Windows update service activated

我想在 Windows 7 嵌入式 运行 设备上安装特定的 Windows 更新文件 (.msu)。 msu 文件可用,自动安装是 运行 正确的命令,但我有一个问题:

在设备上,Windows 更新服务被禁用。这是设备映像的要求,不应激活此服务(即使在安装时也不应)。如果我尝试在没有此服务的情况下安装 msu 文件,则会发生错误 "The service cannot be started, either because it is disabled or ...".

我的问题是:有谁知道在不启用 Windows 更新服务的情况下安装 msu 文件的可能性吗?

来自评论:

Using DISM.exe works if the right command is used. Additionally, it is important that MSU files cannot be installed using DISM.exe with /Online mode.

You have to unpack the msu file, the resulting *.cab file can then be installed using DISM.exe without enabled Windows update service. See How to use DISM to install a hotfix from within Windows

我将在此处引用博客 post:

The purpose of this blog is to give you the steps to install a hotfix (or any other “package”) on the currently running operating system using the Deployment Image Servicing and Management (DISM) command.

...

The command-line switch to install a package is “/Add-Package.” ... the file name is “Windows6.1-KB976571-v2-x64.msu.” ... you would assume that following syntax would work:

DISM.exe /Online /Add-Package /PackagePath:c:\kb976571\Windows6.1-KB976571-v2-x64.msu

You will see the following snippet if you review the file c:\windows\logs\dism\dism.log:

...

2010-09-02 20:33:58, Error DISM DISM Package Manager: PID=7116 DISM does not support installing MSU files online. – CMsuPackage::Install(hr:0x80070032)

...

答案可以在定义什么是 Microsoft Update Standalone 中找到 包 (MSU) 文件是什么以及您将如何在之前执行此操作 命令行工具,包管理器 (Pkgmgr.exe).

您不得不提取 MSU 文件的内容,而是使用 .CAB 包的文件,以便使用包安装或卸载 经理工具 (http://support.microsoft.com/default.aspx?scid=kb;EN-US;940410).

所以试试这个方法:

...

  1. 使用以下命令提取MSU文件的内容:

    Expand –F:* c:\kb976571\Windows6.1-KB976571-v2-x64.msu c:\temp6571
    

... 多个文件,其中包括 Windows6.1-KB976571-v2-x64.cab 文件。

现在尝试以下命令:

...

DISM.exe /Online /Add-Package /PackagePath:c:\temp6571\Windows6.1-KB976571-v2-x64.cab

...(或)...

start /wait DISM.exe /Online /Add-Package /PackagePath:c:\temp6571\Windows6.1-KB976571-v2-x64.cab /Quiet /NoRestart