Questions tagged [dism]

Deployment Image Servicing and Management (DISM) is a command-line tool that can be used to service a Windows image or to prepare a Windows Preinstallation Environment (Windows PE) image. DISM can be used to install, uninstall, configure, and update Windows features, packages, drivers, and international settings.

Description :

Deployment Image Servicing and Management (DISM) is a command-line tool used to service Windows images offline before deployment. You can use it to install, uninstall, configure, and update Windows features, packages, drivers, and international settings. Subsets of the DISM servicing commands are also available for servicing a running operating system.

DISM tool replaces the pkgmgr, PEImg, and IntlConfg tools that are being retired in Windows 7. DISM provides a single centralized tool for performing all of the functions of these three tools in a more efficient and standardized way, eliminating the source of many of the frustrations experienced by current users of these tools. DISM is installed with Windows 7, and it is also distributed in the Windows OEM Preinstallation Kit (Windows OPK) and the Windows Automated Installation Kit (Windows AIK).

Usage :

DISM used to service Windows images offline before deployment. You can use it to install, uninstall, configure, and update Windows features, packages, drivers, and international settings. Subsets of the DISM servicing commands are also available for servicing a running operating system.

You can use DISM with .wim files to:

  • Capture and apply Windows images.
  • Append and delete images in a .wim file.
  • Split .wim files into several smaller files.

You can use DISM with .wim, .vhd, or .vhdx files to:

  • Add, remove, and enumerate packages.
  • Add, remove, and enumerate drivers.
  • Enable or disable Windows features.
  • Apply changes based on the offlineServicing section of an Unattend.xml answer file.
  • Configure international settings.
  • Upgrade a Windows image to a different edition.
  • Prepare a Windows PE image.
  • Take advantage of better logging.
  • Service earlier versions of Windows such as Windows 7, Windows Server 2008 R2, Windows Vista with the latest Service Pack, and Windows Server 2008.
  • Service all platforms (32-bit, 64-bit).
  • Service a 32-bit image from a 64-bit host, and service a 64-bit image from a 32-bit host. For more information, see the "Limitations" section later this topic.
  • Make use of old Package Manager scripts.

Source : https://msdn.microsoft.com/en-us/library/windows/desktop/dd371719%28v=vs.85%29.aspx https://technet.microsoft.com/en-in/library/hh825236.aspx

92 questions
1
vote
0 answers

REVERSE - DISM /Online /Remove-ProvisionedAppxPackage /PackageName:Microsoft.WindowsCalculator_2018.702.514.0_neutral_~_8wekyb3d8bbwe

I'm New to the Sys Admin world and ran a script at work to remove some bloatware form new windows 10 machines. In my Excitement, I removed too much and am looking for a way to get windows calculator back. Its worth noting the windows store is also…
oneill
  • 11
  • 1
1
vote
1 answer

Using wildcard in a batch file with dism function

How would I go about using a wild card for this: dism /online /remove-package /PackageName:Package_for_KB2952664~31bf3856ad364e35~amd64~~6.1.16.0 I have tried this: dism /online /remove-package…
Pistola
  • 13
  • 3
1
vote
1 answer

Install IIS Windows features by DISM on windows 10

According this link I am gonna install IIS Windows features inorder to offline mode. I have mounted my install.wim and so on like above link. But when i run this command : Dism /Image:C:\test\offline /Enable-Feature…
Cyrus the Great
  • 5,145
  • 5
  • 68
  • 149
1
vote
1 answer

IIS 6 Management Console enable with command line of dism

I would like to know how to enable that IIS 6 Management Console with dism command line. I tried some command, but it was not working. dism /online /Enable-Feature /FeatureName:IIS-IIS6ManagementCompatibility /all dism /online /Enable-Feature…
1
vote
0 answers

Installing Visual Studio 2017 Community getting error when installing microsoft.visualstudio.AspNet45.features

The error is being caused by Visual Studio Installer 2017 trying to execute the command C:\WINDOWS\system32\dism.exe" /online /quiet /norestart /Enable-Feature /FeatureName:"netfx4extended-aspnet45" /All…
1
vote
3 answers

For loop with DISM to remove unwanted applications in Windows 10

I am having trouble with the below script. Although it says it is successful during run-time, the applications are still present within the OS. DISM log files are not helpful either. # Remove non-corporate apps $AppsList = "Microsoft.3DBuilder",` …
Abs
  • 21
  • 1
  • 2
1
vote
1 answer

Handle DISM errors from PowerShell script

How can I capture errors when using DISM tool from PowerShell script? & cmd /c 'DISM /online /disable-feature /NoRestart /featurename:[feature_name] >NUL 2>&1' if ($LASTEXITCODE -ne 0) { Write-Host "ERROR" } else { Write-Host…
AndroidX
  • 558
  • 4
  • 15
1
vote
2 answers

Dism Cleanup-Image error on Windows 2016

I'm executing Dism.exe /online /Cleanup-Image /StartComponentCleanup as a part of regular maintenance. It's working fine on Windows 2012r2, but it fails from time to time on Windows 2016. Here's screenshot with error details: Any ideas how it can be…
kagarlickij
  • 7,327
  • 10
  • 36
  • 71
1
vote
1 answer

My DISM command appears to run successfully but nothing installs

I'm trying to install IIS via DISM. When executing the command either via code or directly in cmd prompt, it appears to run fine, but IIS is never installed. I'm unsure where I went wrong. Sorry for the block of text in the code. I've tried…
Joe
  • 13
  • 7
1
vote
1 answer

DISM /Import-DefaultAppAssociations runs successfully, but no file associations are changed

On Windows 10, I run dism /online /import-defaultappassociations:\\path\to\appassociations.xml The output says the command was completed successfully, but the defaults aren't changed when opening files. The changes are also not visible in Control…
1
vote
0 answers

Dism API - How to get the functions of the commandline tool

I worked a lot with the documented DISM API and know all thier functions. I declared them one year ago in AutoIT and now in python but all the time i wondered why the commandline tool (type dism in cmd) has a lot of more functions provided. Does…
FalloutBoy
  • 964
  • 1
  • 9
  • 22
1
vote
1 answer

How to call DISM command in WIX 3.7

I want to execute the below lines of code through WIX and here is the code where am able to do it through the command prompt: dism.exe /online /enable-feature:NetFx3 /quiet /norestart -----> To enable dism /online /get-featureinfo:netfx3 ------> To…
1
vote
1 answer

Windows API to query installed features and packages

For one of my projects, I need a way to query which features/roles/role services are installed on a given Windows Server machine. In it's grand tradition, Microsoft keeps reinventing stuff (sysocmgr in Windows 2003, pkgmgr and ocsetup in Windows…
Anton Gogolev
  • 113,561
  • 39
  • 200
  • 288
0
votes
1 answer

CMD - create a BAT file to choose actions

I want to initially check for DISM health, then based on result, I want to select 1 (to run DISM restore & sfc) or 2 (run only sfc). I cannot get this to work. Any guidance would be appreciated. Edit: Maybe there's a way to do this all…
Scott
  • 61
  • 1
  • 8
0
votes
0 answers

How do you compress .manifest files the same way they are compress in "C:/Windows/WinSxS/Manifests"

I have a custom windows image that have certain files in "C:/Windows/WinSxS" edited. The issue is that the files not longer match the hash stored in the .manifest file in "C:/Windows/WinSxS/Manifest" folder. This causes issues when running DISM…