When I ran DISM to create an Install.wim file, I got error 6 "invalid handle" at 10% of the wim file creation.

Adewale Bello 0 Reputation points
2024-06-30T01:40:19.6733333+00:00

When I ran DISM to create an Install.wim file, I got error 6 "invalid handle" at 10% of the wim file creation. The command I used is:

Dism /Capture-Image /ImageFile:"C:\Captured.wim" /CaptureDir:G:\ /Name:Capture

I am using DISM on Windows Server 2019 Datacenter and running this in Command Prompt as an administrator. The source directory (G:) and destination path (C:\Captured.wim) are correct and accessible.

I ran disk health checks using chkdsk to check and fix the source and destination drives:

chkdsk G: /f

chkdsk C: /f

I have ensured there is enough free space on the destination drive (C:) to store the captured image. I checked the DISM version using:

dism /Online /Get-CurrentEdition

I also ran a System File Check:

sfc /scannow

Additionally, I used DISM to repair the Windows image by running the following commands:

dism /Online /Cleanup-Image /CheckHealth

dism /Online /Cleanup-Image /ScanHealth

dism /Online /Cleanup-Image /RestoreHealth

I made sure Windows Update is up to date but still no luck, can someone assist

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
5,427 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
9,723 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Wesley Li 9,335 Reputation points
    2024-07-03T06:57:07.46+00:00

    Hello

    1. Please try to store the image to another drive other than C then check the issue again.
    2. Have you generalized the image before capture the image?

    Capture and Apply Windows using a WIM file | Microsoft Learn

    1. According to my research, the cloud file could be a reason.

    wim capture Onedrive with Files on Demand = Handle is invalid - wimlib

    1. Or try to check the dism.log for more details of present issue.
    0 comments No comments

  2. Wesley Li 9,335 Reputation points
    2024-08-06T07:46:53.3433333+00:00

    Hello

    Is your problem solved?

    If the above reply is helpful to you, please mark your reply as an answer, thank you very much!

    If you have any further questions, please do not hesitate to contact us.

    Thanks

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.