How to copy WINPE setup. Directory changed error in DISM

1

I'm attempting to copy an altered WINPE USB flash drive to an ISO. Here's the steps I have so far:

  1. Mount USB drive, copy all files from it, and unmount the drive
  2. Create a new amd64 WINPE base on C:\ using copype
  3. Mount the new amd64 WinPE base
  4. Copy the USB files to the mounted base
  5. Unmount the base
  6. Create the iso.

However on step 4, copying the USB files to the mounted base causes the following error:

C:\> dism /Unmount-Image /MountDir:"C:\WinPE_ISO_Mount" /commit

Deployment Image Servicing and Management tool
Version: 10.0.18362.1


Error: 0xc142011e

The mount directory of the specified image has changed.  All the files in this image will be extracted, and this image cannot be commited.

The DISM log file can be found at C:\WINDOWS\Logs\DISM\dism.log

I can't find any documentation for that error anywhere, but after testing I found that if I made the changes manually the unmounting would work. After looking at the DISM log which you can read here I found these lines:

[19704] ImageUnmarshallHandle: Reconstituting wim at E:\sources\boot.wim.
[19704] [0x80070002] FIOReadFileIntoBuffer:(1381): The system cannot find the file specified.
[19704] [0xc142011c] UnmarshallImageHandleFromDirectory:(641)
[19704] ImageUnmarshallHandle: Reconstituting wim at E:\sources\boot.wim.
[19704] [0x80070002] FIOOpenStreamById:(1312): The system cannot find the file specified.
[19704] [0xc142011e] ImageRebuildFromImageHandle:(1745)
[19704] [0xc142011e] WIMCommitImageHandle:(1382)

It seems like by copying the files from the USB drive, it now thinks that it belongs in the USB drive. Does anyone know what file/files tells DISM where the path is mounted from so I can not include those in the copy?

This is a different question than this one: Create a bootable ISO file from the command prompt as in that question I am talking about errors creating a bootable iso vs an unbootable one. Here I am talking about errors with DISM.

usb
batch
mount
dism
winpe
asked on Super User Mar 31, 2020 by Mark Deven • edited Apr 10, 2020 by Mark Deven

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0