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

Source: Internet
Author: User

How-to-use DISM-to-install a hotfix from within WindowsJeff Hughes (CORE)10:10 AM
    • 22

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

The purpose of this blog are to give your the steps to install a hotfix (or any other ' package ') on the currently running OP erating system using the Deployment Image Servicing and Management (DISM) command. DISM is a new command-line tool, comes built-in for Windows 7 and Windows Server, the DISM tool. DISM combines the functions of multiple tools from the Windows automated Installation kits (WAIK) and allows users to PERFO RM multiple actions on operating system images. For the involves viewing and manipulating "offline images" which is in the Windows Imaging (WIM) file for Mat. Here is a good reference this explains the function of the DISM tool and what the DISM tool are meant to replace:

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

There is 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's running Windows Server 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 your look at the DISM syntax on online help, you would assume this 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'll 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::P rivate_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, could wonder if you can really install packages online and if so, what type of file must your 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 are you would does this 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:

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.