WinCert.net Forums: How to use Windows 7 DISM by Muiz - WinCert.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How to use Windows 7 DISM by Muiz Deployment Image Servicing and Management (DISM)

#1 User is offline muiz 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 74
  • Joined: 22-November 06
  • OS:Windows 7 x64

Post icon Posted 26 November 2008 - 01:27 AM

How to use Windows 7 DISM by Muiz.

Q : What is DISM?
A : Deployment Image Servicing and Management (DISM)

Q : Why this guide?
A : Cause there is NO information about this tool out yet.

DISM is the replacement for the older deployment tools from Microsoft, like PKMGR and PEIMG
WAIK doesnt support this yet, so when you want to use WAIK, use it from a Vista or XP, not from a Windows 7
When you work from Windows 7, you dont need to install DISM, cause its already in it.
You can basicly do anything to your image with DISM, even aplly unattended settings to it , so you can use it unattended without XML.
How to get DISM?
Mount your Windows 7 and go to the System32 folder of the ofline image, and copy the "DISM" folder and "DISM.exe" to your Vista System32 folder.
Register the dll's inside(Some cant be registered)

Dll's :

CbsProvider.dll
CompatProvider.dll
DismCore.dll
DismCorePS.dll
DismProv.dll
DmiProvider.dll
IntlProvider.dll
MsiProvider.dll
SmiProvider.dll
UnattendProvider.dll
WimProvider.dll

For x64 users, you also have to grab the "SysWOW64" folder and the "DISM.exe" from there.

What i did was also added "DISM.exe" to my WAIK folder to make it even more easy to use.


Here is a small list with commands and a few examples, what you can do with dism.
You can get the example of each command by putting "/?" without the quotes after the command.
I did a few in this guide, but you can do this for each command.

----------------------------------------------------------------------------------------------------------------------
DISM.exe [dism_options] {WIM_command} [<WIM_arguments>]
DISM.exe {/Image:<path_to_offline_image> | /Online} [dism_options]
		 {servicing_command} [<servicing_arguments>]

DESCRIPTION:

  DISM enumerates, installs, uninstalls, configures, and updates features
  and packages in Windows images. The commands that are available depend
  on the image being serviced and whether the image is offline or running.

WIM COMMANDS:

  /Get-MountedWimInfo	 - Displays information about mounted WIM images.
  /Get-WimInfo			- Displays information about images in a WIM file.
  /Commit-Wim			 - Saves changes to a mounted WIM image.
  /Unmount-Wim			- Unmounts a mounted WIM image.
  /Mount-Wim			  - Mounts an image from a WIM file.
  /Remount-Wim			- Recovers an orphaned WIM mount directory.
  /Cleanup-Wim			- Deletes resources associated with mounted WIM
							images that are corrupt.

Examples :

-------------------------------------------------------------------------------------
/Mount-Wim /WimFile:<path_to_WIM_file> {/Index:<image_index> | /Name:<image_name
>}
  /MountDir:<target_mount_directory> [/readonly]

  Mounts the WIM file to the specified directory so that it is available for
  servicing. /ReadOnly sets the mounted image with read-only permissions.

	Examples:
	  DISM.exe /Mount-Wim /WimFile:C:\test\images\myimage.wim /index:1
		/MountDir:C:\test\offline

	  DISM.exe /Mount-Wim /WimFile:C:\test\images\myimage.wim /index:1
		/MountDir:C:\test\offline /ReadOnly

-------------------------------------------------------------------------------------
/ScratchDir:<path_to_directory>

  Specifies a temporary directory to be used for extracting files for
  servicing. The directory must exist.

  If not set, the temporary directory will be used.

	Example:
	  DISM.exe /Image:C:\test\offline /scratchdir:D:\Scratch

-------------------------------------------------------------------------------------
DISM.exe /Image:C:\test\offline /?

-------------------------------------------------------------------------------------




IMAGE SPECIFICATIONS:

  /Online				 - Targets the running operating system.
  /Image				  - Specifies the path to the root directory of an
							offline Windows image.

DISM OPTIONS:

  /WinDir				 - Specifies the path to the Windows directory.
  /SysDriveDir			- Specifies the path to the system-loader file named
							BootMgr.
  /LogPath				- Specifies the logfile path.
  /LogLevel			   - Specifies the output level shown in the log (1-4).
  /NoRestart			  - Suppresses automatic reboots and reboot prompts.
  /Quiet				  - Suppresses all output except for error messages.
  /ScratchDir			 - Specifies the path to a scratch directory.

For more information about these DISM options and their arguments, specify an
option immediately before /?.

  Examples:
	DISM.exe /Mount-Wim /?
	DISM.exe /ScratchDir /?
	DISM.exe /Image:C:\test\offline /?
	DISM.exe /Online /?




WINDOWS EDITION SERVICING COMMANDS:

  /Set-ProductKey		 - Populates the product key into the offline image.
  /Get-CurrentEdition	 - Displays the editions of the specified image.
  /Get-StagedEditions	 - Displays a list of Windows editions that can be
							removed from the specified image.
  /Get-TargetEditions	 - Displays a list of Windows editions that an
							image can be upgraded to.
  /Remove-StagedEdition   - Removes a staged edition from the image.
  /Set-Edition			- Upgrades the Windows image to a higher edition.

UNATTEND SERVICING COMMANDS:

  /Apply-Unattend		 - Applies an unattend file to an image.

DRIVER SERVICING COMMANDS:

  /Remove-Driver		  - Removes driver packages from an offline image.
  /Add-Driver			 - Adds driver packages to an offline image.
  /Get-DriverInfo		 - Displays information about a specific driver
							in an offline image or a running operating system.
  /Get-Drivers			- Displays information about all drivers in
							an offline image or a running operating system.

INTERNATIONAL SERVICING COMMANDS:

  /Set-LayeredDriver	  - Sets keyboard layered driver.
  /Set-UILang			 - Sets the default system UI language that is used
							in the mounted offline image.
  /Set-UILangFallback	 - Sets the fallback default language for the system
							UI in the mounted offline image.
  /Set-UserLocale		 - Sets the user locale in the mounted offline image.
  /Set-SysLocale		  - Sets the language for non-Unicode programs (also
							called system locale) and font settings in the
							mounted offline image.
  /Set-InputLocale		- Sets the input locales and keyboard layouts to
							use in the mounted offline image.
  /Set-TimeZone		   - Sets the default time zone in the mounted offline
							image.
  /Set-AllIntl			- Sets all international settings in the mounted
							offline image.
  /Set-SKUIntlDefaults	- Sets all international settings to the default
							values for the specified SKU language in the
							mounted offline image.
  /Gen-LangIni			- Generates a new lang.ini file.
  /Set-SetupUILang		- Defines the default language that will be used
							by setup.
  /Get-Intl			   - Displays information about the international
							settings and languages.

APPLICATION SERVICING COMMANDS:

  /Check-AppPatch		 - Displays information if the MSP patches are
							applicable to the mounted image.
  /Get-AppPatchInfo	   - Displays information about installed MSP patches.
  /Get-AppPatches		 - Displays information about all applied MSP patches
							for all installed applications.
  /Get-AppInfo			- Displays information about a specific installed MSI
							application.
  /Get-Apps			   - Displays information about all installed MSI
							applications.

PACKAGE SERVICING COMMANDS:

  /Add-Package			- Adds packages to the image.
  /Remove-Package		 - Removes packages from the image.
  /Enable-Feature		 - Enables a specific feature in the image.
  /Disable-Feature		- Disables a specific feature in the image.
  /Get-Packages		   - Displays information about all packages in
							the image.
  /Get-PackageInfo		- Displays information about a specific package.
  /Get-Features		   - Displays information about all features in
							a package.
  /Get-FeatureInfo		- Displays information about a specific feature.

For more information about these servicing commands and their arguments,
specify a command immediately before /?.

	 Examples:
------------------------------------------------------------------------------
		 DISM.exe /Image:C:\test\offline /Apply-Unattend /?
		 DISM.exe /Image:C:\test\offline /Get-Features /?
		 DISM.exe /Online /Get-Drivers /?

/Apply-Unattend:<path_to_unattend.xml>

  Applies an unattend.xml file to an offline image or a running operating
  system.

	Examples:
	  DISM.exe /Image:C:\test\offline /Apply-Unattend:C:\unattend.xml
	  DISM.exe /Online /Apply-Unattend:C:\unattend.xml\

-------------------------------------------------------------------------------

/Get-Features [/PackagePath:<path_to_package>] [/PackageName:<name_in_image>]

  Displays information about all features found in a specific package.
  If you do not specify a package name or path, all features in the image will
  be listed. /PackagePath can point to either a .cab file or a folder.

	Examples:
	  DISM.exe /Image:C:\test\offline /Get-Features

	  DISM.exe /Image:C:\test\offline /Get-Features
		/PackagePath:C:\packages\package.cab

	  DISM.exe /Image:C:\test\offline /Get-Features
		/PackageName:Microsoft.Windows.Calc.Demo~6595b6144ccf1df~x86~en~1.0.0.0
---------------------------------------------------------------------------------

/Get-Drivers [/all]

  Displays information about drivers in an image. Only shows out-of-box drivers
  by default. Use /all switch to show all drivers in the image.

	Example:
	  DISM.exe /Image:C:\test\offline /Get-Drivers
	  DISM.exe /Image:C:\test\offline /Get-Drivers /all
---------------------------------------------------------------------------------


This is the beginning of a bigger guide, but it will do for now.

Author : Muiz
Credits : Muiz

This post has been edited by muiz: 06 December 2008 - 09:41 AM

1

#2 User is offline shahed 

  • WinCert Friend
  • PipPipPipPip
  • Group: Members
  • Posts: 284
  • Joined: 30-June 07
  • Location:East London
  • OS:Windows 7 x64

Posted 26 November 2008 - 01:32 AM

Excellent guide muiz. Thank you very much, very handy indeed.
0

#3 User is offline AMIRZ 

  • Loyal Member and Friend
  • Group: Contributors
  • Posts: 525
  • Joined: 30-October 07
  • Location:Jakarta
  • OS:Windows 7

Post icon Posted 08 December 2008 - 03:55 AM

Thx alot, very informative and useful :thumbsup_anim:
0

#4 User is offline muiz 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 74
  • Joined: 22-November 06
  • OS:Windows 7 x64

Posted 12 December 2008 - 10:22 AM

No problem :icon_cool:
0

#5 User is offline swbchen 

  • Lurker
  • Pip
  • Group: Members
  • Posts: 6
  • Joined: 31-January 09
  • Location:Taiwan
  • OS:Windows XP Pro

Posted 31 January 2009 - 11:11 AM

Where can I download Windows 7 Toolkit(W7T) ???

This post has been edited by swbchen: 31 January 2009 - 11:11 AM

0

#6 User is offline snakecracker 

  • Xtreme Link Admin
  • Group: Basic Sponsor
  • Posts: 721
  • Joined: 13-July 08
  • Location:My Home Network
  • OS:Windows 7 x64

Posted 31 January 2009 - 11:20 AM

its not out yet. (i think)

this topic could be moved to Win 7?
0

#7 User is offline N1K 

  • Vivified Pirate
  • Group: Administrator
  • Posts: 3,390
  • Joined: 30-April 06
  • Location:Zagreb, Croatia
  • OS:Windows 7 x64

Posted 31 January 2009 - 01:05 PM

View Postswbchen, on Jan 31 2009, 12:11 PM, said:

Where can I download Windows 7 Toolkit(W7T) ???

Please don't double post again.
0

#8 User is offline Jatin Beniwal 

  • WinCert Friend
  • Group: W7T Addon Maker
  • Posts: 281
  • Joined: 01-February 09
  • Location:India
  • OS:Windows 7

Posted 31 March 2009 - 01:00 AM

Superb Guide
0

#9 User is offline Sven 

  • Lurker
  • Pip
  • Group: Members
  • Posts: 5
  • Joined: 21-April 07

Posted 22 August 2009 - 02:41 PM

I try to add key into the offline image

Dism /Mount-WIM /WimFile:E:\DVD\sources\install.wim /Name:"Windows 7 ULTIMATE" /MountDir:E:\Mount <<---- work mounting

Dism /Image:E:\Mount /Set-ProductKey:12345-ABCDE-67890-FGHIJ-XXXXX <<--- add key don't work "fake key"

Dism /Unmount-WIM /MountDir:E:\Mount /Commit <<--- work unmounting

I try to fig out how i works.
I need som help.
0

#10 User is online ricktendo64 

  • Group: Banned Members
  • Group: Global Mods
  • Posts: 5,664
  • Joined: 09-August 06
  • Location:La Ceiba
  • OS:Windows 7

Posted 22 August 2009 - 03:46 PM

View PostSven, on 22 August 2009 - 02:41 PM, said:

I try to add key into the offline image

Dism /Mount-WIM /WimFile:E:\DVD\sources\install.wim /Name:"Windows 7 ULTIMATE" /MountDir:E:\Mount <<---- work mounting

Dism /Image:E:\Mount /Set-ProductKey:12345-ABCDE-67890-FGHIJ-XXXXX <<--- add key don't work "fake key"

Dism /Unmount-WIM /MountDir:E:\Mount /Commit <<--- work unmounting

I try to fig out how i works.
I need som help.

Try using /index when mounting and sometimes adding a backslash (\) to the end of the mount dir path helps, for example:

dism /image:e:\mount\ /set-productkey:12345-ABCDE-67890-FGHIJ-XXXXX

0

#11 User is online Mr_Smartepants 

  • DriverPacks.net Team member
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 594
  • Joined: 16-September 07
  • Location:Cambridgeshire
  • OS:Windows 7

Posted 22 August 2009 - 04:03 PM

Yes, the /index or /name is mandatory now with dism.

Microsoft said:

Dism /Mount-Wim /WimFile:C:\test\images\install.wim /index:1 /MountDir:C:\test\offline /ReadOnly

Dism /Mount-Wim /WimFile:C:\test\offline\install.wim /name:"Windows Vista HomeBasic" /MountDir:C:\test\offline
Note: An index or name value is required for most operations that specify a WIM file.

This post has been edited by Mr_Smartepants: 22 August 2009 - 04:05 PM

0

#12 User is offline Sven 

  • Lurker
  • Pip
  • Group: Members
  • Posts: 5
  • Joined: 21-April 07

Posted 22 August 2009 - 04:38 PM

Tnx
Dism /Mount-WIM /WimFile:E:\DVD\sources\install.wim /index:4 /MountDir:E:\Mount <<--- working "ultimate"

Dism /Image:E:\Mount /Set-ProductKey:12345-ABCDE-67890-FGHIJ-XXXXX <<--- add key work "fake key"

Starting to install product key...
Finished installing produkt key.

Tnx all :thumbsup_anim:

This post has been edited by Sven: 23 August 2009 - 05:53 AM

0

#13 User is online ricktendo64 

  • Group: Banned Members
  • Group: Global Mods
  • Posts: 5,664
  • Joined: 09-August 06
  • Location:La Ceiba
  • OS:Windows 7

Posted 22 August 2009 - 05:05 PM

So what did the trick, was it /index or adding a backslash to the end of the /image path?
0

#14 User is offline Sven 

  • Lurker
  • Pip
  • Group: Members
  • Posts: 5
  • Joined: 21-April 07

Posted 22 August 2009 - 07:22 PM

it was /index

This post has been edited by Sven: 22 August 2009 - 07:23 PM

0

#15 User is offline Raoul 

  • WinCert Friend
  • PipPipPipPip
  • Group: Members
  • Posts: 278
  • Joined: 17-January 08
  • Location:The Netherlands
  • OS:Windows 7

Posted 23 August 2009 - 01:56 PM

Ah im gonna try that, thanks! :)
0

#16 User is offline The444 

  • Lurker
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 20-April 10
  • OS:non-selected

Posted 20 April 2010 - 10:17 AM

Is there a way we can remove the Language packs ?
0

#17 User is online Mr_Smartepants 

  • DriverPacks.net Team member
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 594
  • Joined: 16-September 07
  • Location:Cambridgeshire
  • OS:Windows 7

Posted 20 April 2010 - 11:00 AM

View PostThe444, on 20 April 2010 - 10:17 AM, said:

Is there a way we can remove the Language packs ?


Google is your friend! :google_lt:
http://technet.micro...28WS.10%29.aspx

This post has been edited by Mr_Smartepants: 20 April 2010 - 11:03 AM

0

#18 User is offline The444 

  • Lurker
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 20-April 10
  • OS:non-selected

Posted 20 April 2010 - 12:55 PM

Found it m8

To remove a language pack using DISM


1. Locate the Windows image (.wim) file that contains the Windows images that you intend to remove languages from.

2. Click Start, point to All Programs, point to Windows OPK or Windows AIK, right-click Deployment Tools Command Prompt, and then select Run as administrator.

3. At the command prompt, type the following command to retrieve the name or index number for the image you want to modify.

Dism /Get-WIMInfo /WimFile:C:\test\images\install.wim 


An index or name value is required for most operations that specify a .wim file.

4. Type the following command to mount the offline Windows image.

Dism /Mount-WIM /WimFile:C:\test\images\install.wim /Name:"Windows 7 HomeBasic" /MountDir:C:\test\offline


5. Optional: Type the following command to list the languages in the offline image.

Dism /Image:C:\test\offline /Get-Intl


6. Type the following command to remove a language pack from the image. You can remove multiple .cab files using one command-line statement.

Dism /Image:C:\test\offline /Remove-Package /PackagePath:C:\packages\package1.cab /PackagePath:C:\packages\package2.cab ...


7. Type the following command to commit the changes. The image remains mounted until the /unmount option is used.

Dism /Commit-Wim /MountDir:C:\test\offline


8. The language packs are removed from your image.
0

#19 User is offline crashfly 

  • Member
  • PipPip
  • Group: Members
  • Posts: 13
  • Joined: 23-September 08
  • Location:Arkansas, USA
  • OS:Windows 7 x64

Posted 29 July 2010 - 03:14 AM

Is there a way to compress the "finished" wim file with DISM? (or should imagex be used to export a 'compressed' image?)
0

#20 User is offline Kelsenellenelvian 

  • Master of my domain!
  • Group: Global Mods
  • Posts: 2,232
  • Joined: 10-August 06
  • Location:Pocatello, ID
  • OS:Windows 7

Posted 29 July 2010 - 03:20 AM

DISM has no comression settings.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users