ADK 10.1.26100.2454: copype fails with ERROR: ... still mounted! if full path not specified

hg943h9g8fehi-0423 0 Reputation points
2025-03-31T20:49:26.8866667+00:00

ADK 10.1.26100.2454 and preinstallation environment add-on of same version is installed. Running copype without the full path to desired creation directory will cause it to fail at the unmounting stage with ERROR: <path to boot.wim> still mounted. This error doesn't occur if full path is specified.

I modified copype to run the command to not redirect to null and I get

Error: 50

The request is not supported.

I echoed the unmount command so the path would expand and running it after the script completes yields no error.

I ran timeout /T 20 and powershell -c "Write-VolumeCache C" before dism and still the error occurs. Yet when I run the command echoed like above the command yields no error.

It seems like this is something related to the command running in the script

I'm stumped why this happens.

Previous versions of ADK versions like 10.1.19041.1 and 10.1.25398.1 seem to avoid this issue because they don't mount the wim to copy files from it.

Other than reporting this issue, I would like to know how the script to be modified to stop this error.

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
11,361 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Daisy Zhou 32,416 Reputation points Microsoft External Staff
    2025-04-02T02:27:03.8233333+00:00

    Hello hg943h9g8fehi-0423,

    Thank you for posting in Q&A forum.

    The error seems due to how the command handles paths and the mounting process. The error code 50, "The request is not supported," suggests that there might be an issue with how the paths are being interpreted or how the command is executed without the full path.

    Here are some steps to troubleshoot this issue:

    1. As you've noted, specifying the full path to the desired creation directory seems to avoid the error. Ensure that you always use the full path when running the copype command.
    2. Ensure that you have the necessary permissions to create and modify files in the specified directory. Running the command prompt as an administrator can help avoid permission-related issues.
    3. If the error persists, you can manually unmount the boot.wim file using the DISM (Deployment Imaging Service and Management Tool) command:

    dism /cleanup-wim

    This command will clean up any mounted images that are no longer in use.

    1. Ensure that the ADK and the Windows Preinstallation Environment (WinPE) add-on are correctly installed and that there are no corrupted files. Reinstalling the ADK and WinPE add-on might help resolve any underlying issues.
    2. Check the logs for more detailed error messages. The logs can provide additional context that might help identify the root cause of the issue. Here's an example of how to use the copype command with the full path:

    copype amd64 C:\Full\Path\To\Creation\Directory

    I hope the information above is helpful.

    If you have any questions or concerns, please feel free to let us know.

    Best Regards,

    Daisy Zhou

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

  2. hg943h9g8fehi-0423 0 Reputation points
    2025-04-02T09:42:11.6566667+00:00

    I would like to execute copype without specifying the full path. I have many guides I would need to update (which I would like to avoid) if the full path needs to be specified going forward. I am sure the ADK has been installed correctly. No other wims are mounted before I run copype. I am running the Deployment and Imaging Tools Environment as Administrator. I don't have time to fully debug copype.cmd to see where exactly it fails at the moment.


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.