Share via


Got DISM error 2

Question

Tuesday, January 22, 2019 10:54 AM

Hello,

I ran the following command and always get this error:

Microsoft Windows [Version 10.0.17763.1]
(c) 2018 Microsoft Corporation. Alle Rechte vorbehalten.

C:\Windows\system32>DISM /Online /Cleanup-Image /RestoreHealth /source:E:\sources\install.wim /LimitAccess

Tool zur Imageverwaltung für die Bereitstellung
Version: 10.0.17763.1

Imageversion: 10.0.17763.1

[======================     39.0%                          ]
Error: 2

Das System kann die angegebene Datei nicht finden. (Translation: The system cannot find the file)

Die DISM-Protokolldatei befindet sich unter "C:\Windows\Logs\DISM\dism.log". (Translation: The DISM log is:...)

It always abort around 39%. Theres no anti virus which is running at the moment and the install.wim is provided via a virtual mounted ISO (using the build-in Windows feature for this)

Besides that, many other operations using DISM (e.g. ">DISM /Online /Cleanup-Image /ScanHealth") also aborts with error 2

All replies (4)

Wednesday, January 23, 2019 8:03 AM

Hi,

 

First, please ensure you’re using the correct version of DISM that is installed with the Windows ADK. Also, do not mount images to protected folders like the User\Documents folder. If DISM processes are interrupted, temporarily disconnect from the network, and consider running commands from WinPE instead.

 

If the issue still persists, I suggest you refresh DISM tool:

 

1. Right click Start and then select Command Prompt (Admin)

2. Type this command: exe/image:C /cleanup-image /revertpendingactions. This will revert pending tasks, and this includes any Windows updates that are pending.

3. Boot your computer and then run in recovery command prompt

4. Execute this command: exe /online/Cleanup-Image /StartComponentCleanup. This cleans up the component store and helps everything to run properly again

5. Restart and then open Command Prompt as administrator and run the following commands in Safe Mode:

            Sfc /scannow

 

Hope these are helpful.

Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].


Sunday, November 3, 2019 4:58 PM

The exe command doesn't work.  What is the full path?

>exe/image:C /cleanup-image /revertpendingactions
'exe' is not recognized as an internal or external command,
operable program or batch file.

If I use dism.exe I get the following error.

>dism.exe/image:C /cleanup-image /revertpendingactionsDeployment Image Servicing and Management toolVersion: 10.0.17763.1Error: 2Unable to access the image.Make sure that the image path and the Windows directory for the image exist and you have Read permissions on the folder.The DISM log file can be found at C:\WINDOWS\Logs\DISM\dism.log

Sunday, November 3, 2019 5:04 PM

Here is the DISM log entries.

2019-11-03 11:58:59, Info                  DISM   PID=16888 TID=13928 Scratch directory set to 'C:\Users\Daniel\AppData\Local\Temp\. - CDISMManager::put_ScratchDir
2019-11-03 11:58:59, Info                  DISM   PID=16888 TID=13928 DismCore.dll version: 10.0.17763.1 - CDISMManager::FinalConstruct
2019-11-03 11:58:59, Info                  DISM   Initialized Panther logging at C:\WINDOWS\Logs\DISM\dism.log
2019-11-03 11:58:59, Info                  DISM   PID=16888 TID=13928 Successfully loaded the ImageSession at "C:\WINDOWS\system32\Dism" - CDISMManager::LoadLocalImageSession
2019-11-03 11:58:59, Info                  DISM   Initialized Panther logging at C:\WINDOWS\Logs\DISM\dism.log
2019-11-03 11:58:59, Info                  DISM   DISM Provider Store: PID=16888 TID=13928 Found and Initialized the DISM Logger. - CDISMProviderStore::Internal_InitializeLogger
2019-11-03 11:58:59, Info                  DISM   DISM Provider Store: PID=16888 TID=13928 Failed to get and initialize the PE Provider.  Continuing by assuming that it is not a WinPE image. - CDISMProviderStore::Final_OnConnect
2019-11-03 11:58:59, Info                  DISM   DISM Provider Store: PID=16888 TID=13928 Finished initializing the Provider Map. - CDISMProviderStore::Final_OnConnect
2019-11-03 11:58:59, Info                  DISM   Initialized Panther logging at C:\WINDOWS\Logs\DISM\dism.log
2019-11-03 11:58:59, Info                  DISM   DISM Manager: PID=16888 TID=13928 Successfully created the local image session and provider store. - CDISMManager::CreateLocalImageSession
2019-11-03 11:58:59, Info                  DISM   DISM.EXE: 
2019-11-03 11:58:59, Info                  DISM   DISM.EXE: < Starting Dism.exe session >
2019-11-03 11:58:59, Info                  DISM   DISM.EXE: 
2019-11-03 11:58:59, Info                  DISM   DISM.EXE: Host machine information: OS Version=10.0.17763, Running architecture=amd64, Number of processors=8
2019-11-03 11:58:59, Info                  DISM   DISM.EXE: Dism.exe version: 10.0.17763.1
2019-11-03 11:58:59, Info                  DISM   DISM.EXE: Executing command line: dism.exe /image:C /cleanup-image /revertpendingactions
2019-11-03 11:58:59, Info                  DISM   DISM Provider Store: PID=16888 TID=13928 Getting the collection of providers from a local provider store type. - CDISMProviderStore::GetProviderCollection
2019-11-03 11:58:59, Info                  DISM   DISM Provider Store: PID=16888 TID=13928 Connecting to the provider located at C:\WINDOWS\system32\Dism\FolderProvider.dll. - CDISMProviderStore::Internal_LoadProvider
2019-11-03 11:58:59, Warning               DISM   DISM Provider Store: PID=16888 TID=13928 Failed to load the provider: C:\WINDOWS\system32\Dism\SiloedPackageProvider.dll. - CDISMProviderStore::Internal_GetProvider(hr:0x8007007e)
2019-11-03 11:58:59, Info                  DISM   DISM Provider Store: PID=16888 TID=13928 Connecting to the provider located at C:\WINDOWS\system32\Dism\FfuProvider.dll. - CDISMProviderStore::Internal_LoadProvider
2019-11-03 11:58:59, Info                  DISM   DISM Provider Store: PID=16888 TID=13928 Connecting to the provider located at C:\WINDOWS\system32\Dism\WimProvider.dll. - CDISMProviderStore::Internal_LoadProvider
2019-11-03 11:58:59, Info                  DISM   DISM Provider Store: PID=16888 TID=13928 Connecting to the provider located at C:\WINDOWS\system32\Dism\VHDProvider.dll. - CDISMProviderStore::Internal_LoadProvider
2019-11-03 11:58:59, Info                  DISM   DISM Provider Store: PID=16888 TID=13928 Connecting to the provider located at C:\WINDOWS\system32\Dism\ImagingProvider.dll. - CDISMProviderStore::Internal_LoadProvider
2019-11-03 11:58:59, Info                  DISM   DISM Provider Store: PID=16888 TID=13928 Connecting to the provider located at C:\WINDOWS\system32\Dism\CompatProvider.dll. - CDISMProviderStore::Internal_LoadProvider
2019-11-03 11:58:59, Warning               DISM   DISM Provider Store: PID=16888 TID=13928 Failed to load the provider: C:\WINDOWS\system32\Dism\MetaDeployProvider.dll. - CDISMProviderStore::Internal_GetProvider(hr:0x8007007e)
2019-11-03 11:58:59, Info                  DISM   DISM.EXE: Got the collection of providers. Now enumerating them to build the command table.
2019-11-03 11:58:59, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: DISM Log Provider
2019-11-03 11:58:59, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: FolderManager
2019-11-03 11:58:59, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: FfuManager
2019-11-03 11:58:59, Info                  DISM   DISM.EXE: Succesfully registered commands for the provider: FfuManager.
2019-11-03 11:58:59, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: WimManager
2019-11-03 11:58:59, Info                  DISM   DISM.EXE: Succesfully registered commands for the provider: WimManager.
2019-11-03 11:58:59, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: VHDManager
2019-11-03 11:58:59, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: GenericImagingManager
2019-11-03 11:58:59, Info                  DISM   DISM.EXE: Succesfully registered commands for the provider: GenericImagingManager.
2019-11-03 11:58:59, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: Compatibility Manager
2019-11-03 11:58:59, Info                  DISM   DISM.EXE: Succesfully registered commands for the provider: Compatibility Manager.
2019-11-03 11:58:59, Info                  DISM   DISM Provider Store: PID=16888 TID=13928 Getting the collection of providers from a local provider store type. - CDISMProviderStore::GetProviderCollection
2019-11-03 11:58:59, Error                 DISM   FolderManager: PID=16888 onecore\base\ntsetup\opktools\dism\providers\folderprovider\dll\folderimage.h:190 - CFolderImage::CreateFolderImage(hr:0x80070032)
2019-11-03 11:58:59, Info                  DISM   DISM FFU Provider: PID=16888 TID=13928 [C:\WINDOWS\system32\C] is not recognized by the DISM FFU provider. - CFfuImage::Initialize
2019-11-03 11:58:59, Info                  DISM   DISM WIM Provider: PID=16888 TID=13928 [C:\WINDOWS\system32\C] does not exist and is not a WIM mount point. - CWimMountedImageInfo::Initialize
2019-11-03 11:58:59, Info                  DISM   DISM VHD Provider: PID=16888 TID=13928 [C:\WINDOWS\system32\C] is not recognized by the DISM VHD provider. - CVhdImage::Initialize
2019-11-03 11:58:59, Info                  DISM   DISM FFU Provider: PID=16888 TID=13928 [C:\WINDOWS\system32\C] is not recognized by the DISM FFU provider. - CFfuImage::Initialize
2019-11-03 11:58:59, Info                  DISM   DISM Imaging Provider: PID=16888 TID=13928 The provider FfuManager does not support CreateDismImage on C:\WINDOWS\system32\C - CGenericImagingManager::CreateDismImage
2019-11-03 11:58:59, Info                  DISM   DISM VHD Provider: PID=16888 TID=13928 [C:\WINDOWS\system32\C] is not recognized by the DISM VHD provider. - CVhdImage::Initialize
2019-11-03 11:58:59, Info                  DISM   DISM Imaging Provider: PID=16888 TID=13928 The provider VHDManager does not support CreateDismImage on C:\WINDOWS\system32\C - CGenericImagingManager::CreateDismImage
2019-11-03 11:58:59, Info                  DISM   DISM WIM Provider: PID=16888 TID=13928 [C:\WINDOWS\system32\C] does not exist and is not a WIM mount point. - CWimMountedImageInfo::Initialize
2019-11-03 11:58:59, Info                  DISM   DISM Imaging Provider: PID=16888 TID=13928 The provider WimManager does not support CreateDismImage on C:\WINDOWS\system32\C - CGenericImagingManager::CreateDismImage
2019-11-03 11:58:59, Info                  DISM   DISM Imaging Provider: PID=16888 TID=13928 No imaging provider supported CreateDismImage for this path - CGenericImagingManager::CreateDismImage
2019-11-03 11:58:59, Error                 DISM   DISM.EXE: Failed to access the image folder or image's windows folder.
2019-11-03 11:58:59, Info                  DISM   DISM.EXE: Image session has been closed. Reboot required=no.
2019-11-03 11:58:59, Info                  DISM   DISM.EXE: 
2019-11-03 11:58:59, Info                  DISM   DISM.EXE: < Ending Dism.exe session >
2019-11-03 11:58:59, Info                  DISM   DISM.EXE: 
2019-11-03 11:58:59, Info                  DISM   DISM Provider Store: PID=16888 TID=13928 Found the OSServices.  Waiting to finalize it until all other providers are unloaded. - CDISMProviderStore::Final_OnDisconnect
2019-11-03 11:58:59, Info                  DISM   DISM Provider Store: PID=16888 TID=13928 Disconnecting Provider: FolderManager - CDISMProviderStore::Internal_DisconnectProvider
2019-11-03 11:58:59, Info                  DISM   DISM Provider Store: PID=16888 TID=13928 Disconnecting Provider: FfuManager - CDISMProviderStore::Internal_DisconnectProvider
2019-11-03 11:58:59, Info                  DISM   DISM Provider Store: PID=16888 TID=13928 Disconnecting Provider: WimManager - CDISMProviderStore::Internal_DisconnectProvider
2019-11-03 11:58:59, Info                  DISM   DISM Provider Store: PID=16888 TID=13928 Disconnecting Provider: VHDManager - CDISMProviderStore::Internal_DisconnectProvider
2019-11-03 11:58:59, Info                  DISM   DISM Provider Store: PID=16888 TID=13928 Disconnecting Provider: GenericImagingManager - CDISMProviderStore::Internal_DisconnectProvider
2019-11-03 11:58:59, Info                  DISM   DISM Provider Store: PID=16888 TID=13928 Disconnecting Provider: Compatibility Manager - CDISMProviderStore::Internal_DisconnectProvider
2019-11-03 11:58:59, Info                  DISM   DISM Provider Store: PID=16888 TID=13928 Releasing the local reference to DISMLogger.  Stop logging. - CDISMProviderStore::Internal_DisconnectProvider


Monday, November 4, 2019 8:46 PM

There is an error in cloris_sun's example commands.

If you are wanting to cleanup an image, you need to specify the path to where the image is mounted. If you are doing this for a live OS, use the second command, but use dism.exe and a space before options.

dism.exe /image:C /cleanup-image /revertpendingactions

dism.exe /online /Cleanup-Image /StartComponentCleanup