How to use DISM to install a hotfix from within Windows

15 Feb 2011 10:10 AM

Hello, my name is Emmers Presson. I am a Support Escalation Engineer for Microsoft in the Windows Core team.

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. DISM is a new command-line tool that comes built-in for Windows 7 and Windows Server 2008 is the DISM tool. DISM combines the functions of multiple tools from the Windows Automated Installation Kit (WAIK) and allows users to perform multiple actions on operating system images. For the most part, this involves viewing and manipulating “offline images” which are in the Windows Imaging (WIM) file format. Here is a good reference that explains the function of the DISM tool and what the DISM tool is meant to replace:

http://windowsteamblog.com/windows/b/springboard/archive/2009/07/28/managing-windows-7-with-dism.aspx

There are also some DISM commands that target the running operating system (“online”). For example, you can use the following command to list the “packages” installed:

dism /online /get-packages /format:table

The command-line switch to install a package is “/Add-Package.” Let’s say that you are running Windows Server 2008 R2 Enterprise and you want to install the hotfix KB976571. When you download the hotfix file, the file name is “Windows6.1-KB976571-v2-x64.msu.” When you look at the DISM syntax in online help, you would assume that following syntax would work:

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

where the .MSU file is stored in the c:\kb976571 folder.

Here is the screenshot of the results:

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

2010-09-02 20:33:58, Info DISM DISM Package Manager: PID=7116 Encountered the option "packagepath" with value "c:\kb976571\Windows6.1-KB976571-v2-x64.msu" - CPackageManagerCLIHandler::Private_GetPackagesFromCommandLine

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)

Based on these results, you may wonder if you can really install packages online and if so, what type of file must you use if you can’t use MSU files? The answer is found in defining what a Microsoft Update Standalone Package (MSU) file is and how you would do this in the previous command-line tool, Package Manager (Pkgmgr.exe).

You had to extract the contents of a MSU file and instead use the .CAB file of the package in order to install or uninstall using the Package Manager tool (http://support.microsoft.com/default.aspx?scid=kb;EN-US;940410).

So try this approach:

1. Create a c:\temp\976571 folder.

2. Use the following command to extract the contents of the MSU file:

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

This resulted in extracting multiple files, which included the Windows6.1-KB976571-v2-x64.cab file.

Now try the following command:

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

This time I see the following:

Success!

You could tweak the command. For example, use the following syntax to install the package silently and avoid restarting Windows:

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

You could use a similar command to uninstall an update using DISM. Here’s the syntax for that:

DISM.exe /Online /Remove-Package /PackagePath:c:\temp\976571\Windows6.1-KB976571-v2-x64.cab

I hope you find this helpful and explore other options for the DISM command-line tool.

Emmers Presson 
Support Escalation Engineer 
Microsoft Enterprise Platforms Support

[fw]How to use DISM to install a hotfix from within Windows的更多相关文章

  1. How to install IIS 7.5 on Windows 7 using the Command Line

    原文 How to install IIS 7.5 on Windows 7 using the Command Line On Windows Vista, to install IIS 7.0 f ...

  2. How to install DIG dns tool on windows 7

    This guide explain how to install dig dns tool on windows 7 in few steps: 1. First go to http://www. ...

  3. 转-How to install an SSH Server in Windows Server 2008

    window也可以通过ssh客户端连接,具体方式参考下面 1 How to install an SSH Server in Windows Server 2008 2 freeSSHd and fr ...

  4. How To Install Oracle Forms 12c On Windows 7

    Below is the step by step guide to install Oracle Forms 12c on Windows 7. To install Oracle Forms 12 ...

  5. windows 10安装和配置caffe教程 | Install and Configure Caffe on windows 10

    本文首发于个人博客https://kezunlin.me/post/1739694c/,欢迎阅读! Install and Configure Caffe on windows 10 Part 1: ...

  6. Windows 10上源码编译Poco并编写httpserver和tcpserver | compile and install poco cpp library on windows

    本文首发于个人博客https://kezunlin.me/post/9587bb47/,欢迎阅读! compile and install poco cpp library on windows Se ...

  7. A Newbie’s Install of Keras & Tensorflow on Windows 10 with R

    This weekend, I decided it was time: I was going to update my Python environment and get Keras and T ...

  8. Manual Install Cocos2d-x vc template on Windows 7

    Manual Installation Process Download the template file from HERE and extract it. Open the file CCApp ...

  9. 【转】Install MATLAB 2013a on CentOS 6.4 x64 with mode silent

    首先要下载安装光盘. Matlab801_MacUnix.iso [root@db-172-16-3-150 mnt]# md5sum /ssd1/Matlab801_MacUnix.iso  0d3 ...

随机推荐

  1. mySql | Error: ER_DATA_TOO_LONG: Data too long for column 'base_info' at row 1

    问题描述:执行insert语句报以下错误 原因:数据库表,该字段在设计的时候长度过小,新插入的数据过长,会提示以上错误! 解决办法:修改表中该字段的长度限定.

  2. echarts改变图例位置

    只需要legend属性中修改如下几个示数即可: legend:{ orient:"horizontal", x:'right', y:' center', width:'100', ...

  3. [JavaScript深入系列]JavaScript深入之执行上下文栈(转载)

    顺序执行? 如果要问到 JavaScript 代码执行顺序的话,想必写过 JavaScript 的开发者都会有个直观的印象,那就是顺序执行,毕竟: var foo = function () { co ...

  4. 几张非常有意义的JavaScript基础学习思维图

    分享几张对于学习JavaScript基础知识非常有意义的图,无论你的JavaScript级别如何,“温故而知新”完全可以从这些图中得到. 推荐理由:归类非常好,非常全面 JavaScript 数组 J ...

  5. 2019-9-2-win10-uwp-标题栏

    title author date CreateTime categories win10 uwp 标题栏 lindexi 2019-09-02 12:57:38 +0800 2018-2-13 17 ...

  6. tensorflow教程:tf.contrib.rnn.DropoutWrapper

    tf.contrib.rnn.DropoutWrapper Defined in tensorflow/python/ops/rnn_cell_impl.py. def __init__(self, ...

  7. Nexus搭建Maven私服中央仓库

    一.概述 1.概要 现在的项目基本都是用Maven来管理工程,这样一来在公司内容搭建一个私服就非常有必要了,这样一来可以管理公司内部用的JAR包,也可以管理第三方的各种JAR来,以免每次都要从外网的仓 ...

  8. Sass-@for

    在制作网格系统的时候,大家应该对 .col1~.col12 这样的印象较深.在 CSS 中你需要一个一个去书写,但在 Sass 中,可以使用 @for 循环来完成.在 Sass 的 @for 循环中有 ...

  9. Makefile中几种变量赋值运算符

    Makefile中几种变量赋值运算符: =      :最简单的赋值 :=     :一般也是赋值 以上这两个大部分情况下效果是一样的,但是有时候不一样. 用 = 赋值的变量,在被解析时他的值取决于最 ...

  10. 【转】SAP 各种记账凭证的更改&冲销

    一:更改 1,已经过帐的 FB02. 过完帐的允许更改的地方有限,只有凭证抬头文本,参照,分配,文本,原因代码等 2,预制凭证的更改. FBV2. 预制凭证可以更改的地方很多,只有凭证编码+公司代码+ ...