[fw]How to use DISM to install a hotfix from within Windows
How to use DISM to install a hotfix from within Windows










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:
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的更多相关文章
- 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 ...
- 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. ...
- 转-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 ...
- 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 ...
- windows 10安装和配置caffe教程 | Install and Configure Caffe on windows 10
本文首发于个人博客https://kezunlin.me/post/1739694c/,欢迎阅读! Install and Configure Caffe on windows 10 Part 1: ...
- 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 ...
- 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 ...
- 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 ...
- 【转】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 ...
随机推荐
- JVM(3) 之 内存分配与回收策略
开发十年,就只剩下这套架构体系了! >>> 之前讲过虚拟机中的堆,他是整个内存模型中占用最大的一部分,而且不是连续的.当有需要分配内存的时候,一般有两个方法分配,指针碰撞和空闲列 ...
- 微信小程序(3)--页面跳转和提示框
微信小程序页面跳转方法: 1.<navigator url="../test/test"><button>点我可以切换可以返回</button> ...
- 关于如何测试cpu性能的命令操作 linux系统
for i in `seq 1 $(cat /proc/cpuinfo |grep "physical id" |wc -l)`; do dd if=/dev/zero of=/d ...
- Vue:列表渲染 v-for on a <template>
类似于 v-if,你也可以利用带有 v-for 的 <template> 渲染多个元素.比如: <html> <head> <title>Vue v-f ...
- Web前端性能优化详解之CSS与JS加载
浏览器加载页面和渲染过程 加载过程 浏览器根据DNS 服务器得到域名的IP地坛 向这个 IP 的机器发送 HTTP请求 服务器收到,处理并返回 HTTP请求 浏览器得到返回内容 渲染过程 根据 HTM ...
- Jenkins服务配置容易忽略的事项
git客户端必须安装(可直接yum安装) maven安装的版本(Jenkins上用其插件较稳健,亲测maven3.5是坑) settings.xml文件必要时,指定对应路径(一般选用Jenkins默认 ...
- spring-boot整合Cxf的webservice案例
1.运行环境 开发工具:intellij idea JDK版本:1.8 项目管理工具:Maven 4.0.0 2.Maven Plugin管理 <?xml version="1.0&q ...
- shell脚本学习 (10) 从结构化文本提取数据
1提取/ 后的数据 sed -e 's=/.*==' do.txt 2 sed -e 's=/.*=='\ -e 's=^\([^:]*\):\(.*\) \([^ ]*\)=\1:\3, \2=' ...
- window安装consul
安装consul 下载包: https://www.consul.io/ 解压 consul_1..2_windows_amd64.zip 复制 consul.exe 到 d:\soft\consul ...
- [CSP-S模拟测试]:randomwalking(DP)
题目传送门(内部题59) 输入格式 第一行一个数$n$表示点数.第二行$n$个数$A_i$.接下来$n−1$行,每行两个数$u,v$表示$u$和$v$有边直接相连. 输出格式 一个数表示最小花费的起点 ...