DISM walkthrough - observations from my first ever attempt

REMark WAIK (Windows Automated Installation Kit) is required and is a free download from MS.
REMark references at
REMark http://technet.microsoft.com/en-us/library/dd799258(WS.10).aspx
REMark http://technet.microsoft.com/en-us/library/dd744382(WS.10).aspx
REMark test code and output from DISM command window on my machine
REMark Jeff Herre 2010-01-31


==================================================================================================

Summary, Adding Mass Storage drivers:

REMark Mount Boot.wim (always use Index #2)
Dism /Mount-Wim /WimFile:C:\Source-OS\SOURCES\BOOT.WIM /index:2 /MountDir:C:\test\offline


REMark Check for and optionaly remove existing drivers previously added
Dism /image:C:\test\offline /Get-Drivers

Dism /image:C:\test\offline /Remove-Driver /driver:oem0.inf /driver:oem1.inf ... /driver:oem99.inf


REMark Add Drivers
Dism /image:C:\test\offline /Add-Driver /driver:C:\test\DP_Temp([\mydriver.INF] or [/recurse]) [/ForceUnsigned]


REMark Save work
C:\#NT6-Tools\Windows AIK - Win7\Tools\PETools>Dism /Unmount-Wim /MountDir:C:\test\offline /commit


REMark Mass storage text mode is done

REMark A bootable ISO is created with the tool oscdimg.exe
REMark http://technet.microsoft.com/en-us/library/dd799243(WS.10).aspx


==================================================================================================


What I did step by step


==================================================================================================


C:\#NT6-Tools\Windows AIK - Win7\Tools\PETools>Dism /Get-WimInfo /WimFile:C:\#NT6-Tools\Source-OS\Win7-all\SOURCES\BOOT.WIM

Deployment Image Servicing and Management tool
Version: 6.1.7600.16385

Details for image : C:\#NT6-Tools\Source-OS\Win7-all\SOURCES\BOOT.WIM

Index : 1
Name : Microsoft Windows PE (x86)
Description : Microsoft Windows PE (x86)
Size : 806,390,831 bytes

Index : 2
Name : Microsoft Windows Setup (x86)
Description : Microsoft Windows Setup (x86)
Size : 881,382,947 bytes

The operation completed successfully.

 

C:\#NT6-Tools\Windows AIK - Win7\Tools\PETools>Dism /Get-WimInfo /WimFile:C:\#NT6-Tools\Source-OS\Win7-all\SOURCES\BOOT.WIM /index:1

Deployment Image Servicing and Management tool
Version: 6.1.7600.16385

Details for image : C:\#NT6-Tools\Source-OS\Win7-all\SOURCES\BOOT.WIM

Index : 1
Name : Microsoft Windows PE (x86)
Description : Microsoft Windows PE (x86)
Size : 806,390,831 bytes
Architecture : x86
Hal : <undefined>
Version : 6.1.7600
ServicePack Build : 16385
ServicePack Level : 0
Edition : WindowsPE
Installation : WindowsPE
ProductType : WinNT
ProductSuite :
System Root : WINDOWS
Directories : 2133
Files : 9578
Created : 7/13/2009 - 10:06:36 PM
Modified : 7/13/2009 - 10:06:38 PM
Languages :
        en-US (Default)

The operation completed successfully.

 

C:\#NT6-Tools\Windows AIK - Win7\Tools\PETools>Dism /Get-WimInfo /WimFile:C:\#NT6-Tools\Source-OS\Win7-all\SOURCES\BOOT.WIM /index:2

Deployment Image Servicing and Management tool
Version: 6.1.7600.16385

Details for image : C:\#NT6-Tools\Source-OS\Win7-all\SOURCES\BOOT.WIM

Index : 2
Name : Microsoft Windows Setup (x86)
Description : Microsoft Windows Setup (x86)
Size : 881,382,947 bytes
Architecture : x86
Hal : <undefined>
Version : 6.1.7600
ServicePack Build : 16385
ServicePack Level : 0
Edition : WindowsPE
Installation : WindowsPE
ProductType : WinNT
ProductSuite :
System Root : WINDOWS
Directories : 2364
Files : 10257
Created : 7/13/2009 - 10:07:35 PM
Modified : 7/14/2009 - 2:33:35 AM
Languages :
        en-US (Default)

The operation completed successfully.

 

C:\#NT6-Tools\Windows AIK - Win7\Tools\PETools>Dism /Get-WimInfo /WimFile:C:\#NT6-Tools\Source-OS\Win7-all\SOURCES\BOOT.WIM /index:3

Deployment Image Servicing and Management tool
Version: 6.1.7600.16385


Error: 87

An error occurred while processing the command.
Ensure that the command-line arguments are valid. For more information, review t
he log file.

The DISM log file can be found at H:\WINDOWS\Logs\DISM\dism.log

 

REMark Let's find out what images this Install.wim supports...

C:\#NT6-Tools\Windows AIK - Win7\Tools\PETools>Dism /Get-WimInfo /WimFile:C:\#NT6-Tools\Source-OS\Win7-all\SOURCES\INSTALL.WIM

Deployment Image Servicing and Management tool
Version: 6.1.7600.16385

Details for image : C:\#NT6-Tools\Source-OS\Win7-all\SOURCES\INSTALL.WIM

Index : 1
Name : Windows 7 ENTERPRISE x64
Description : Windows 7 ENTERPRISE
Size : 11,912,905,130 bytes

Index : 2
Name : Windows 7 PREMIUM x64
Description : Windows 7 HOMEPREMIUM
Size : 12,012,660,212 bytes

Index : 3
Name : Windows 7 PROFESSIONAL x64
Description : Windows 7 PROFESSIONAL
Size : 11,910,752,928 bytes

Index : 4
Name : Windows 7 ULTIMATE x64
Description : Windows 7 ULTIMATE
Size : 12,070,211,908 bytes

Index : 5
Name : Windows 7 STARTER x32
Description : Windows 7 STARTER
Size : 7,936,340,784 bytes

Index : 6
Name : Windows 7 BASIC x32
Description : Windows 7 HOMEBASIC
Size : 7,992,394,907 bytes

Index : 7
Name : Windows 7 PREMIUM x32
Description : Windows 7 HOMEPREMIUM
Size : 8,432,859,356 bytes

Index : 8
Name : Windows 7 PROFESSIONAL x32
Description : Windows 7 PROFESSIONAL
Size : 8,313,318,889 bytes

Index : 9
Name : Windows 7 ULTIMATE x32
Description : Windows 7 ULTIMATE
Size : 8,471,060,645 bytes

Index : 10
Name : Windows 7 ENTERPRISE x32
Description : Windows 7 ENTERPRISE
Size : 8,315,649,536 bytes

The operation completed successfully.

 

C:\#NT6-Tools\Windows AIK - Win7\Tools\PETools>MD C:\test\offline

 

REMark   Let's Mount the BOOT.wim to the temp folder I Just Created...

C:\#NT6-Tools\Windows AIK - Win7\Tools\PETools>Dism /Mount-Wim /WimFile:C:\#NT6-Tools\Source-OS\Win7-all\SOURCES\BOOT.WIM /index:2 /MountDir:C:\test\offline

Deployment Image Servicing and Management tool
Version: 6.1.7600.16385

Mounting image
[==========================100.0%==========================]
The operation completed successfully.

 

REMark   Note the above line is a PROGRESS BAR! and increments 1%... 2%... 3%... 100.0% YES Wim there is feedback!
REMark   To add Textmode drivers we mount the BOOT.wim image and add them to ONLY INDEX:2 (I belive IMAGE:1 is a safe mode / fall back type image)
REMark   The correct BOOT.wim is / was mounted with the last command above
REMark   To add regular drivers like Graphics etc... we have to mount the corresponding Install.wim image and add them to each one or the just the one we intend to use ;).
REMark   Images may be mounted by name or index number

 

REMark   Let's find out what drivers exist in the image... and let's take a look at all three output formats just for giggles...

C:\#NT6-Tools\Windows AIK - Win7\Tools\PETools>Dism /image:C:\test\offline /Get-Drivers /all > C:\test\Temp.TXT

REMark   attached Temp.TXT

C:\#NT6-Tools\Windows AIK - Win7\Tools\PETools>Dism /image:C:\test\offline /Get-Drivers /all /Format:Table > C:\test\TempTable.TXT

REMark   attached TempTable.TXT

C:\#NT6-Tools\Windows AIK - Win7\Tools\PETools>Dism /image:C:\test\offline /Get-Drivers /all /Format:List > C:\test\TempList.TXT

REMark   attached TempList.TXT
REMark   It turns out the 'Default' is /Format:List SO... Temp.txt = TempList.txt


REMark   If the /All switch is not used then only Third Party drivers are Displayed. Since I have not added any yet the list is empty...

C:\#NT6-Tools\Windows AIK - Win7\Tools\PETools>Dism /image:C:\test\offline /Get-Drivers /Format:List

Deployment Image Servicing and Management tool
Version: 6.1.7600.16385

Image Version: 6.1.7600.16385

Obtaining list of 3rd party drivers from the driver store...

Driver packages listing:

(No drivers found in the image matching the criteria)

The operation completed successfully.

 

 

C:\#NT6-Tools\Windows AIK - Win7\Tools\PETools>C:\dpsbase\bin\un7zip.exe "C:\dp Vista packs\x86\Masstorage_x86_907.7z" "C:\test\DP_Temp"


REMark   Extracted Mass to temp folder C:\test\DP_Temp
REMark   Let's add the mass pack now!

C:\#NT6-Tools\Windows AIK - Win7\Tools\PETools>Dism /image:C:\test\offline /Add-Driver /driver:C:\test\DP_Temp /recurse /ForceUnsigned


Deployment Image Servicing and Management tool
Version: 6.1.7600.16385

Image Version: 6.1.7600.16385

Searching for driver packages to install...
Found 44 driver package(s) to install.
Installing 1 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\1\1\
hcix86s.inf: The driver package was successfully installed.
Installing 2 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\10\1
1\ViPrt.inf: The driver package was successfully installed.
Installing 3 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\10\1
2\viamraid.inf: The driver package was successfully installed.
Installing 4 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\11\1
MegaSR1.INF: The driver package was successfully installed.
Installing 5 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\11\1
nodev.inf: The driver package was successfully installed.
Installing 6 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\11\2
nodev.inf: The driver package was successfully installed.
Installing 7 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\11\2
oemsetup.inf: The driver package was successfully installed.
Installing 8 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\11\3
nodev.inf: The driver package was successfully installed.
Installing 9 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\11\3
oemsetup.inf: The driver package was successfully installed.
Installing 10 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\11\
\lsi_sas.inf: The driver package was successfully installed.
Installing 11 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\11\
\lsinodrv.inf: The driver package was successfully installed.
Installing 12 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\11\
\lsi_fc.inf: The driver package was successfully installed.
Installing 13 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\12\
\iteraid.inf: The driver package was successfully installed.
Installing 14 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\2\1
rr172x.inf: The driver package was successfully installed.
Installing 15 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\2\2
rr2522.inf: The driver package was successfully installed.
Installing 16 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\2\3
hptmv.inf: The driver package was successfully installed.
Installing 17 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\3\1
iaAHCI.inf: The driver package was successfully installed.
Installing 18 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\3\1
iaStor.inf: The driver package was successfully installed.
Installing 19 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\3\2
iSSetup.INF: The driver package was successfully installed.
Installing 20 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\4\1
jraid_i.inf: The driver package was successfully installed.
Installing 21 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\4\2
jmcr_jm.inf: The driver package was successfully installed.
Installing 22 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\4\2
jmcr_sda.inf: The driver package was successfully installed.
Installing 23 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\4\3
johci.inf: The driver package was successfully installed.
Installing 24 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\5\1
mv61xx.inf: The driver package was successfully installed.
Installing 25 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\5\1
mvnodrv.inf: The driver package was successfully installed.
Installing 26 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\6\1
nvstor32.inf: The driver package was successfully installed.
Installing 27 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\6\2\
nvrd32.inf: The driver package was successfully installed.
Installing 28 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\7\1\
1\SI3112.inf: The driver package was successfully installed.
Installing 29 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\7\1\
2\Si3112r.inf: The driver package was successfully installed.
Installing 30 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\7\2\
1\SI3114.inf: The driver package was successfully installed.
Installing 31 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\7\2\
2\SI3114r.inf: The driver package was successfully installed.
Installing 32 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\7\2\
3\si3114r5.inf: The driver package was successfully installed.
Installing 33 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\7\2\
3\sippd.inf: The driver package was successfully installed.
Installing 34 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\7\3\
1\SI3124.inf: The driver package was successfully installed.
Installing 35 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\7\3\
2\si3124r5.inf: The driver package was successfully installed.
Installing 36 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\7\3\
2\sippd.inf: The driver package was successfully installed.
Installing 37 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\7\4\
1\SI3132.inf: The driver package was successfully installed.
Installing 38 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\7\4\
2\si3132r5.inf: The driver package was successfully installed.
Installing 39 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\7\4\
2\sippd.inf: The driver package was successfully installed.
Installing 40 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\7\5\
1\si3531.inf: The driver package was successfully installed.
Installing 41 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\7\5\
1\sippd.inf: The driver package was successfully installed.
Installing 42 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\8\1\
SISRaid2.INF: The driver package was successfully installed.
Installing 43 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\8\2\
sisraid4.inf: The driver package was successfully installed.
Installing 44 of 44 - C:\test\DP_Temp\Masstorage_x86_907\Masstorage_x86_907\9\1\
ULISATA.INF: The driver package was successfully installed.
The operation completed successfully.

 

REMark   That seems to have worked let's list them to see!

C:\#NT6-Tools\Windows AIK - Win7\Tools\PETools>Dism /image:C:\test\offline /Get-Drivers /Format:List

Deployment Image Servicing and Management tool
Version: 6.1.7600.16385

Image Version: 6.1.7600.16385

Obtaining list of 3rd party drivers from the driver store...

Driver packages listing:

Published Name : oem0.inf
Original File Name : ahcix86s.inf
Inbox : No
Class Name : SCSIAdapter
Provider Name : ATI Technologies Inc.
Date : 3/21/2007
Version : 2.5.1540.41

Published Name : oem1.inf
Original File Name : viprt.inf
Inbox : No
Class Name : hdc
Provider Name : VIA
Date : 4/3/2008
Version : 6.0.6000.252

REMark   Output to > AfterMass.txt is attached with full output, the above is just a sample...

 

REMark   Again that seems to have worked
REMark   I think all I have to do now is commit the changes... Let's try that!

 

C:\#NT6-Tools\Windows AIK - Win7\Tools\PETools>Dism /Commit-Wim /MountDir:C:\test\offline

Deployment Image Servicing and Management tool
Version: 6.1.7600.16385

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


REMark Similar in fit, form and feel to the mount process...


REMark Let's unmount the image Burn and Test!

Dism /Unmount-Wim /MountDir:C:\test\offline /commit

Deployment Image Servicing and Management tool
Version: 6.1.7600.16385

Image File : C:\#NT6-Tools\Source-OS\Win7-all\SOURCES\BOOT.WIM
Image Index : 2
Saving image
[==========================100.0%==========================]
Unmounting image
[==========================100.0%==========================]
The operation completed successfully.


REMark I am not sure if i can do the commit and unmount as a single operation... more testing required
REMark Let's remount and remove the added drivers... Then re-add them and test that theory :D.
REMark This will also test the viability of removing previous drivers for a DPsI upgrade process :D :P.
REMark The C:\test\offline folder was emptied by the DISM tool... Very cool!


C:\#NT6-Tools\Windows AIK - Win7\Tools\PETools>Dism /Mount-Wim /WimFile:C:\#NT6-Tools\Source-OS\Win7-all\SOURCES\BOOT.WIM /index:2 /MountDir:C:\test\offline
C:\#NT6-Tools\Windows AIK - Win7\Tools\PETools>Dism /image:C:\test\offline /Get-Drivers


REMark Yes the drivers are there let's remove them

C:\#NT6-Tools\Windows AIK - Win7\Tools\PETools>Dism /image:C:\test\offline /Remove-Driver /driver:oem1.inf /driver:oem2.inf /driver:oem3.inf /driver:oem4.inf /driver:oem5.inf /driver:oem6.inf /driver:oem7.inf /driver:oem8.inf /driver:oem9.inf /driver:oem10.inf /driver:oem11.inf /driver:oem12.inf

Deployment Image Servicing and Management tool
Version: 6.1.7600.16385

Image Version: 6.1.7600.16385

Found 12 driver package(s) to remove.
Removing 1 of 12 - oem1.inf: The driver package was successfully removed.
Removing 2 of 12 - oem10.inf: The driver package was successfully removed.
Removing 3 of 12 - oem11.inf: The driver package was successfully removed.
Removing 4 of 12 - oem12.inf: The driver package was successfully removed.
Removing 5 of 12 - oem2.inf: The driver package was successfully removed.
Removing 6 of 12 - oem3.inf: The driver package was successfully removed.
Removing 7 of 12 - oem4.inf: The driver package was successfully removed.
Removing 8 of 12 - oem5.inf: The driver package was successfully removed.
Removing 9 of 12 - oem6.inf: The driver package was successfully removed.
Removing 10 of 12 - oem7.inf: The driver package was successfully removed.
Removing 11 of 12 - oem8.inf: The driver package was successfully removed.
Removing 12 of 12 - oem9.inf: The driver package was successfully removed.
The operation completed successfully.


C:\#NT6-Tools\Windows AIK - Win7\Tools\PETools>Dism /image:C:\test\offline /Remove-Driver /driver:oem13.inf /driver:oem14.inf /driver:oem15.inf /driver:oem16.inf /driver:oem17.inf /driver:oem18.inf /driver:oem19.inf /driver:oem20.inf /driver:oem21.inf /driver:oem22.inf /driver:oem23.inf /driver:oem24.inf


Deployment Image Servicing and Management tool
Version: 6.1.7600.16385

Image Version: 6.1.7600.16385

Found 12 driver package(s) to remove.
Removing 1 of 12 - oem13.inf: The driver package was successfully removed.
Removing 2 of 12 - oem14.inf: The driver package was successfully removed.
Removing 3 of 12 - oem15.inf: The driver package was successfully removed.
Removing 4 of 12 - oem16.inf: The driver package was successfully removed.
Removing 5 of 12 - oem17.inf: The driver package was successfully removed.
Removing 6 of 12 - oem18.inf: The driver package was successfully removed.
Removing 7 of 12 - oem19.inf: The driver package was successfully removed.
Removing 8 of 12 - oem20.inf: The driver package was successfully removed.
Removing 9 of 12 - oem21.inf: The driver package was successfully removed.
Removing 10 of 12 - oem22.inf: The driver package was successfully removed.
Removing 11 of 12 - oem23.inf: The driver package was successfully removed.
Removing 12 of 12 - oem24.inf: The driver package was successfully removed.
The operation completed successfully.

C:\#NT6-Tools\Windows AIK - Win7\Tools\PETools>Dism /image:C:\test\offline /Remove-Driver /driver:oem25.inf /driver:oem26.inf /driver:oem27.inf /driver:oem28.inf /driver:oem29.inf /driver:oem30.inf /driver:oem31.inf /driver:oem32.inf /driver:oem33.inf /driver:oem34.inf /driver:oem35.inf /driver:oem36.inf

...

C:\#NT6-Tools\Windows AIK - Win7\Tools\PETools>Dism /image:C:\test\offline /Remove-Driver /driver:oem26.inf /driver:oem37.inf /driver:oem38.inf /driver:oem39.inf /driver:oem40.inf /driver:oem41.inf /driver:oem42.inf /driver:oem43.inf /driver:oem44.inf

...

REMark TEST removal and commit changes and retest...

C:\#NT6-Tools\Windows AIK - Win7\Tools\PETools>Dism /image:C:\test\offline /Get-Drivers

Deployment Image Servicing and Management tool
Version: 6.1.7600.16385

Image Version: 6.1.7600.16385

Obtaining list of 3rd party drivers from the driver store...

Driver packages listing:

Published Name : oem0.inf
Original File Name : ahcix86s.inf
Inbox : No
Class Name : SCSIAdapter
Provider Name : ATI Technologies Inc.
Date : 3/21/2007
Version : 2.5.1540.41

The operation completed successfully.

REMark (Forgot oem0.inf)

C:\#NT6-Tools\Windows AIK - Win7\Tools\PETools>Dism /image:C:\test\offline /Remove-Driver /driver:oem0.inf

...

C:\#NT6-Tools\Windows AIK - Win7\Tools\PETools>Dism /image:C:\test\offline /Get-Drivers

Deployment Image Servicing and Management tool
Version: 6.1.7600.16385

Image Version: 6.1.7600.16385

Obtaining list of 3rd party drivers from the driver store...

Driver packages listing:

(No drivers found in the image matching the criteria)

The operation completed successfully.

 

REMark Success... Lets commit now! and then re-add the drivers... LOL (PS The drivers are QSCed :D.)

C:\#NT6-Tools\Windows AIK - Win7\Tools\PETools>Dism /Commit-Wim /MountDir:C:\test\offline
REMark We just Saved the image with all the Mass drivers removed (in theory the wim is in the same state it was in when we started) 

 

REMark Re-Add Drivers (they were not deleted so we don't need to re-extract them)

C:\#NT6-Tools\Windows AIK - Win7\Tools\PETools>Dism /image:C:\test\offline /Add-Driver /driver:C:\test\DP_Temp /recurse /ForceUnsigned

REMark Let's see if we can save and commit as one operation!!!

C:\#NT6-Tools\Windows AIK - Win7\Tools\PETools>Dism /Unmount-Wim /MountDir:C:\test\offline /commit


Deployment Image Servicing and Management tool
Version: 6.1.7600.16385

Image File : C:\#NT6-Tools\Source-OS\Win7-all\SOURCES\BOOT.WIM
Image Index : 2
Saving image
[==========================100.0%==========================]
Unmounting image
[==========================100.0%==========================]
The operation completed successfully.

 


REMark Remount and test to see if it commited and saved...
REMark Yes Commit and Save can be done as one operation...