Using DISM to install Windows updates

If Windows Update can't install a detail update (or isn't working all), Microsoft's DISM command provides a simple way to get Windows updates installed.

update arrows in motion amid circuits
Getty Images / kchungtw

Windows' built-in Deployment Paradigm Servicing and Direction (DISM) command, a.k.a. dism.exe, is something of a Swiss Ground forces knife when it comes to working on Windows OS images. Among its many capabilities — such as adding optional Windows features and packages, taking image inventories, performing image cleanups, and more than — DISM includes an /Add-Parcel option. This option allows users to install Microsoft Catalog updates in .cab or .msu files to a targeted Windows paradigm.

.cab is brusk for "Windows Chiffonier," a type of compressed file that stores data and instructions for Windows that can update device drivers, organisation files, and and then forth. The .msu file extension is associated with the Microsoft Update Standalone Installer. Ordinarily, this installer uses the Windows Update Agent API to install update packages. Both .cab and .msu files also work with the DISM command against Windows paradigm files, which may be of types .wim, .esd, .ffu, or virtual hard disk drive files of type .vhd or .vhdx.

Annotation that .msu updates only piece of work on offline images, while the more than common .cab files may be applied to an online image to update a running Windows install.

Why use DISM instead of Windows Update?

Good question! Sometimes, DISM provides a way to install an update when Windows Update (WU) may exist having issues. At times, Windows Update may simply turn down to work, or it may hang or crash on a particular update. DISM provides a handy manner to install updates when WU itself may be unable to oblige.

Other reasons to use DISM instead of Windows images include:

  • Managing Windows images for big-calibration and/or remote deployments using Microsoft Intune, Windows Autopilot, or Systems Center Configuration Manager (SCCM).
  • Slipstreaming drivers or updates into standard Windows images for customization and special deployments.
  • As an alternative to user-driven updates from an in-house update server, maybe during scheduled maintenance periods. Holiday weekends are popular for this kind of matter in large organizations, because they provide an extra 24-hour interval to ready unexpected problems or to roll back to the previous condition quo if such bug can't exist fixed.

Where to get Windows Update files

The Microsoft Update Catalog is the most common source for update files of all types, including .cab and .msu. Generally, items are accessed by name (eastward.g., Realtek Audio Driver) or past Knowledge Base of operations (KB) commodity number. Thus, for example, KB4023057 is an update that applies to editions of Windows ten versions 1507 through 1803, intended to clean up and gear up whatever issues with Windows Update that might prevent updates from beingness installed.

Figure 1 shows the Update Catalog with a portion of 1 folio's results for KB4023057. Click the Download push button in the correct-manus column for the version of the file that matches the target Os to go the update.

dism win updates 01 ms update catalog list Ed Tittel/IDG

Figure i: The Microsoft Update Catalog with KB5023057 items on brandish. (Click image to enlarge it.)

Information technology yous click the Download push button for the topmost 1803 item shown in Figure 1, a download window appears. This provides a link to a corresponding .cab file with an extremely long name: windows10.0-kb4023057-x64_58b2f8fd3da37d22fb99bd6aa6c3f69951e67429.cab

Discover that the proper noun includes the Windows version (10.0), the KB number, bittedness (x64 means 64-bit), and a globally unique identifier (GUID), and it ends with the cabinet file (.cab) extension. That makes this particular an first-class target for an update through the DISM control.

Figure ii shows the download page for this chosen item:

dism win updates 02 ms update catalog download Ed Tittel/IDG

Figure 2: The download page for the 64-flake .cab for KB4023057, 64-scrap, version 1803.

The DISM /Add-Package syntax

The DISM control is fully documented online in Microsoft Docs in the DISM Operating System Package… Servicing Command-Line Options pages. This is but a small-scale function of the DISM Tools Reference, another online document worth bookmarking and exploring for those who work with (and on) Windows images.

The manual lays out the abstract syntax for the /Add together-Package option as follows:

Dism /Add-Package /PackagePath:<path_to_cabfile> [/IgnoreCheck] [/PreventPending]

A /PackagePath can signal to a single .cab or .msu file, a folder that contains a unmarried expanded .cab file or a single .msu file, or a binder that contains multiple .cab or .msu files (you tin't mix the 2 types, however). If /PackagePath points to a binder that contains one or more .cab or .msu files at its root, any subfolders will be as well recursively checked for such files also.

The /PreventPending switch instructs DISM to skip installing the package if it, or the targeted Windows epitome, has any uncompleted actions nonetheless awaiting. This is intended to prevent operating on images that may not be complete or intact.

As already stated, you can add together multiple packages within a single DISM command by including multiple .cab or .msu files in the directory that serves equally input to the /PackagePath choice. Ordinarily, DISM will bank check each package to make sure it's applicable to the targeted paradigm. If a package will not apply to that prototype, DISM will issue an error message. The /IgnoreCheck switch may be used to get DISM to run silently and skip the applicability check for each bundle.

DISM /Add together-Package example

Let's say I'chiliad running a 32-bit instance of Windows ten version 1803. If I wanted to apply KB4023057 to that running image, and the .cab file had been downloaded to the path D:\Images, Figure 3 shows what that command would look similar in Command Prompt or PowerShell. Only first, some important notes for clarity, understanding and brevity:

  • DISM only works with administrative privileges, so you must be logged into an administrative account and opt for "run as administrator" for your command line environs.
  • The /Online switch tells DISM to apply packages to the currently running Windows image.
  • I renamed the .cab file to KB4023057 so I could fit everything into a unmarried line of text.

Figure three shows the example command in an administrative command prompt window.

dism win updates 03 dism command Ed Tittel/IDG

Effigy 3: The proper syntax for DISM /Add-Package for a running Windows system. (Click image to enlarge it.)

To run the command in this format, you lot must be sure there are no WU transactions pending. The safest mode to make certain this is truthful is to restart the arrangement before running whatever DISM /Add together-Package commands.

Working on offline images is something of a specialty exercise. Here, I'll simply say that offline images stand for images that may be "nether construction" or that are maintained in an paradigm library for deployment and/or customization for distribution to users at some kind of scale — maintaining images commonly isn't worth the actress work involved, unless you take at least dozens of users, if non hundreds or more, to whom those images will be served. For more than information on using DISM /Add together-Package with offline images, run across this Microsoft Docs particular "Add together or Remove Packages Offline Using DISM."

Common cases when DISM /Add-Package is worthwhile

In my ain experience, I've used DISM /Add-Bundle dozens if not hundreds of times. In nearly every such instance, that employ has been motivated by i of two sets of circumstances:

  1. Windows Update isn't working properly, and I tin can't download or install any updates.
  2. Some item update hangs or crashes when I endeavour to install it using WU.

In both of those cases, downloading the .cab file and using DISM /Add-Packet will get the update installed successfully on a running Windows paradigm.

If it doesn't piece of work, this usually indicates deeper problems with Windows. In those rare instances, I next turn to an in-place upgrade install (meet my CW story "How to set up Windows x with an in-identify upgrade install"). If that provides no relief, my companion story "How to repair Windows 10 (and 11) in iv steps" should gear up things right.

Copyright © 2021 IDG Communications, Inc.