Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
programming4us
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

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
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
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server