DISM Apply-Image on the same previously captured partition

314 Views Asked by At

After capturing a Windows 10 image with

dism /capture-image /imagefile:i:\myimage.wim /capturedir:d:\ /name:myimage

when I try to apply the image to the previously captured dir d:\ with

dism /apply-image /imagefile:i:\myimage.wim /applydir:d:\ /Index:1

I get an Error 5: Access denied

My workarounds are one of the following:

  1. rmdir /s /q d:\
  2. with diskpart: select volume d and format quick fs=ntfs label=Windows

Is there a simpler way?

0

There are 0 best solutions below