Logo
HOW TO
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
 
 
Windows 7

Automating Windows 7 Installation : Customizing Images Using Deployment Image Servicing and Management (part 3) - Servicing the Operating System in an Image , Committing an Image

4/15/2014 1:33:25 AM

4. Servicing the Operating System in an Image

You can add and remove features and packages from an image. Packages come as cabinet (.cab) files or Microsoft Windows Update Standalone Installer (.msu) files. Table 3 shows common commands you can use to work on packages and features with an offline image.

Table 3. DISM operating system command-line options
SwitchDescriptionExample
/Get-PackagesDisplays information about installed packages.
dism /image:c:\mountwin7 /get-packages

/Get-PackageInfoDisplays detailed information on a specific package. You can identify the package using the Package Identity label displayed with the /Get-Packages command.
dism /image:c:\mountwin7 /get-packageinfo
/PackageName:<package identity>
dism /image:c:\mountwin7 /get-packageinfo
/PackageName:Microsoft-Windows-LocalPack-ZA-
Package~ 31bf3856ad364e35~x86~~6.1.7600.16385

/Add-PackageAdds a package to the offline image. You can use this switch to add any CAB or MSU file to the image. The example adds the KB 958559 package to install Windows Virtual PC used for Windows XP Mode.
dism /image:c:\mountwin7 /add-package
PackagePath:<package path>~LBdism /image:c:\
mountwin7 /add-package /PackagePath:C:\pkg\
windows6.1-kb958559-x86.msu

/Remove-PackageRemoves installed cabinet (.cab) packages. Updates (.msu packages) can't be removed this way. You can identify the package using the Package Identity displayed with the /Get-Packages command.
dism /image:c:\mountwin7 /remove-package
PackageName:<package identity>~LBdism /
image:c:\mountwin7 /remove-package /
PackageName:Microsoft-Windows-LocalPack-ZA-
Package~ 31bf3856ad364e35~x86~~6.1.7600.16385


When you boot into Windows 7, you can enable and disable installed features via the Control Panel. Figure 3 shows the Windows Features dialog box. You can access this by selecting Control Panel => Programs => Turn Windows Features On Or Off.

You can also manipulate these features in an offline image using DISM. Table 4 shows some of the available commands. This is one of the few times when using uppercase and lowercase matters at the command prompt. Specifically, the features must be entered exactly as shown in the /Get-Features output.

Table 4. DISM features' command-line options Switch description
SwitchDescriptionExample
/Get-FeaturesDisplays a list of available features within the image. It also shows whether the feature is enabled or disabled.
dism /image:c:\mountwin7 /
get-features

/Get-FeatureInfoProvides detailed information on a feature. Note that features must be entered using exact case as shown in the /Get-Features output. If you enter Chess as chess, it will not be recognized.
dism /image:c:\mountwin7
/get-featureinfo /
featurename:Chess

/Enable-FeatureEnables a feature using the feature name. The feature name must be entered using exact case as shown in the /Get-Features output.
dism /image:c:\mountwin7
/enable-feature /
featurename:Chess

/Disable-FeatureDisables a feature using the feature name. The feature name must be entered using exact case as shown in the /Get-Features output.
dism /image:c:\mountwin7
/disable-feature /
featurename:Chess


Figure 3. Turning Windows features on or off

5. Committing an Image

Committing an image applies all the changes you've made to the mounted image to the original WIM file. For example, if you mounted an image from the win7.wim file into the C:\mountwin7 folder, you can use the following command to commit the changes:

dism /unmount-wim /Mountdir:c:\MountWin7 /commit
Deployment Image Servicing and Management tool
Version: 6.1.7600.16385

Saving image
[==========================100.0%==========================]
Unmounting image
[==========================100.0%==========================]
The operation completed successfully.

The /unmount switch also removes the files within the mounted folder. In other words, if the image was mounted to the C:\MountWin7 folder, after unmounting it all of the files within this folder will be deleted. If you decide you don't want to save the changes, you can unmount the image with the /discard switch instead of the /commit switch as follows:

dism /unmount-wim /Mountdir:c:\MountWin7 /discard

DISM will not dedicate system resources to unmounted images. However, if you don't unmount an image, DISM continues to track the image even through reboots of your system. It's best to unmount the image when you're done with it. You can verify that you don't have any mounted images with the following command:

dism /get-mountedwiminfo

Deployment Image Servicing and Management tool
Version: 6.1.7600.16385

Mounted images:

No mounted images found.

The operation completed successfully.

Ideally, it will show No mounted images found. If it identifies mounted images you aren't working with, you should investigate them and unmount them if they aren't needed.

Other -----------------
- Automating Windows 7 Installation : Applying an Image Using ImageX
- Automating Windows 7 Installation : Capturing an Image Using ImageX
- Microsoft Visio 2010 : Creating Web Pages from Visio Drawings (part 4) - Fine-tuning Web Pages and Battling Bugs - Saving a Visio Drawing as a Web Page
- Microsoft Visio 2010 : Creating Web Pages from Visio Drawings (part 3) - Fine-tuning Web Pages and Battling Bugs - Customizing Web Page Output
- Microsoft Visio 2010 : Creating Web Pages from Visio Drawings (part 2) - Exploring Visio-Generated Web Pages
- Microsoft Visio 2010 : Creating Web Pages from Visio Drawings (part 1) - Saving as Web Page
- Microsoft Visio 2010 : Sending Visio Files in Email, Saving as PDF or XPS Files
- Microsoft Visio 2010 : Introducing Data Graphics (part 2) - Creating Data Graphics,Applying Data Graphics to Shapes
- Microsoft Visio 2010 : Introducing Data Graphics (part 1) - What Is a Data Graphic?
- Microsoft Visio 2010 : Linking External Data to Shapes (part 6) - Using Link Data - Linking Data to Shapes Using Link Data
 
 
REVIEW
- First look: Apple Watch

- 10 Amazing Tools You Should Be Using with Dropbox

- 3 Tips for Maintaining Your Cell Phone Battery (part 1)

- 3 Tips for Maintaining Your Cell Phone Battery (part 2)
 
VIDEO TUTORIAL
- How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 1)

- How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 2)

- How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 3)
 
Popular tags
Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Indesign Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe After Effects Adobe Photoshop Adobe Fireworks Adobe Flash Catalyst Corel Painter X CorelDRAW X5 CorelDraw 10 QuarkXPress 8 windows Phone 7 windows Phone 8 BlackBerry Android Ipad Iphone iOS
Popular keywords
HOW TO Swimlane in Visio Visio sort key Pen and Touch Creating groups in Windows Server Raid in Windows Server Exchange 2010 maintenance Exchange server mail enabled groups Debugging Tools Collaborating
Top 10
- Microsoft Excel : How to Use the VLookUp Function
- Fix and Tweak Graphics and Video (part 3) : How to Fix : My Screen Is Sluggish - Adjust Hardware Acceleration
- Fix and Tweak Graphics and Video (part 2) : How to Fix : Text on My Screen Is Too Small
- Fix and Tweak Graphics and Video (part 1) : How to Fix : Adjust the Resolution
- Windows Phone 8 Apps : Camera (part 4) - Adjusting Video Settings, Using the Video Light
- Windows Phone 8 Apps : Camera (part 3) - Using the Front Camera, Activating Video Mode
- Windows Phone 8 Apps : Camera (part 2) - Controlling the Camera’s Flash, Changing the Camera’s Behavior with Lenses
- Windows Phone 8 Apps : Camera (part 1) - Adjusting Photo Settings
- MDT's Client Wizard : Package Properties
- MDT's Client Wizard : Driver Properties
 
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
2015 Camaro