Using Dism.exe
The new DISM command-line tool (DISM.exe) is included both in a default install of Windows 7 and in the Windows AIK 2.0. DISM.exe can be used to service both online (running) and offline Windows images by adding or removing device drivers, hotfixes, and operating system packages; configuring international settings; and upgrading a Windows installation to a different edition, such as from Business to Ultimate. DISM.exe can be used to service images in the following versions of Windows:
- Windows Vista Service Pack 1 (SP1) or later versions
- Windows Server 2008
- Windows 7
- Windows Server 2008 R2
To service an offline Windows image using a technician computer on which Windows AIK 2.0 has been installed, you use DISM.exe to do the following:
- Mount the image.
- Enumerate, add, or remove drivers.
- Unmount the image and commit the changes.
Servicing an online Windows image, however, does not require mounting or unmounting the image because the operating system is already running. In addition, any changes made to the driver store (for example, by adding or removing a device driver) are committed immediately when a DISM command is executed to service an online image. To indicate that the current running image is to be serviced, specify the /online parameter in the DISM command.
For example, the following DISM command enumerates a list of installed out-of-box device drivers on a running Windows 7 system.
C:\Windows\system32>dism /online /get-drivers Deployment Image Servicing and Management tool Version: 6.1.7100.0 Image Version: 6.1.7100.0 Obtaining list of 3rd party drivers from the driver store... Driver packages listing: Published Name : oem0.inf Original File Name : prnms001.inf Inbox : No Class Name : Printer Provider Name : Microsoft Date : 6/21/2006 Version : 6.1.7100.0 Published Name : oem1.inf Original File Name : nvfd6032.inf Inbox : No Class Name : Net Provider Name : NVIDIA Date : 5/3/2007 Version : 65.7.4.0 The operation completed successfully.
To get more information about the driver named Oem0.inf, use the /get-driverinfo parameter of DISM, as follows.
C:\Windows\system32>dism /online /get-driverinfo /driver:oem0.inf Deployment Image Servicing and Management tool Version: 6.1.7100.0 Image Version: 6.1.7100.0 Driver package information: Published Name : oem0.inf Driver Store Path : C:\Windows\System32\DriverStore\FileRepository\prnms001.inf_ x86_neutral_d9580ee0743299f4\prnms001.inf Class Name : Printer Class Description : Printers Class GUID : {4D36E979-E325-11CE-BFC1-08002BE10318} Date : 6/21/2006 Version : 6.1.7100.0 Boot Critical : No Drivers for architecture : x86 Manufacturer : Microsoft Description : Microsoft XPS Document Writer Architecture : x86 Hardware ID : MicrosoftMicrosoft_X00AC Service Name : Compatible IDs : Exclude IDs : The operation completed successfully.
Out-of-box device drivers can be added to or removed from a running Windows 7 system by using the /add-driver and /remove-driver parameters, respectively. Note that DISM driver servicing commands only support .inf files; you cannot use DISM to add or remove Windows Installer packages (.msi files) or other driver package types (such as .exe files) using DISM. exe. For more information on servicing online images using DISM.exe, see "Driver Servicing Command-Line Options" on Microsoft TechNet at http://technet.microsoft.com/en-us/library/dd799258.aspx.
In this tutorial:
- Managing Devices and Services
- Understanding Device Installation and Management
- Device Enhancements in Windows 7
- Display Enhancements in Windows 7
- Understanding Device Installation
- Driver Store and Driver Packaging
- Driver Staging vs Installation
- Driver Staging and Installation Process
- Detailed Installation Process
- Managing Driver Packages
- Using PnPutil.exe
- Using Dism.exe
- Driver Signing
- Driver Ranking
- Installing and Using Devices
- Enhancements to the Device Installation Experience in Windows 7
- Scenario 1: Driver found in Driver Store
- Scenario 2: Driver found on Windows Update
- Scenario 3: Driver in Driver Store, But Better Driver on Windows Update
- Scenario 5: No Driver Can Be Found for the device
- Scenario 6: Vendor -supplied media is available
- Scenario 7: Additional Device Software is Available For Download from vendor
- Configuring Device Installation Settings
- Using the Devices And Printers Folder
- Understanding Device Stage
- Understanding the Device Experience Architecture
- Device Containers
- Device display object
- Device Metadata System
- Managing Device Installation Using Group Policy
- Managing Device Installation Behavior
- Managing Driver Installation Behavior
- Blocking Installation of Removable Devices
- Managing Device Redirection Behavior
- Troubleshooting Device Installation
- Using Windows Error Reporting
- Using the SetupAPI Log File
- Using Driver INF Files
- Using Device Manager Error Codes
- Using Driver Verifier
- Repairing Driver Store Corruption
- Repairing Index File Corruption
- Understanding Power Management
- Power Management Enhancements in Windows 7
- New Power Policies in Windows 7
- Configuring Power Management Settings
- Configuring Power Management Settings Using the Power Options Utility in Control Panel
- Configuring Power Management Settings Using Group Policy
- Configuring Power Management Settings Using the Powercfg Utility
- Understanding Services
- Service Enhancements in Windows 7
- Managing Services
- Managing Services Using Task Manager
- Managing Services Using the Sc.exe Command