Jump to content

How to use Windows 7 DISM by Muiz


muiz

Recommended Posts

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

Edited by muiz
Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
  • 1 month later...
  • 4 months later...

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

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.

Edited by Mr_Smartepants
Link to comment
Share on other sites

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:

Edited by Sven
Link to comment
Share on other sites

  • 7 months later...

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.

Link to comment
Share on other sites

  • 3 months later...
  • 2 months later...
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...