dism - cleanup-wim says successful in batch, but wim is still orphaned -


this first post here, have been using stackoverflow while of problems run in to.

(tl;dr: batch script says unmounts wim file, when query wims, orphaned files still around until run /cleanup-wim manually.)

i'm attempting make batch file modifying win pe image, having trouble last step.

basically script first creating amd64 win pe architecture, mounting wim file, editing registry hive system file (and closing hive), copying files specific folders, supposed unmount wim, , create iso can burned disk or copied onto bootable usb.

everything works, except unmount portion.

to give insight of how first being done, run:

c:\windows\system32\dism.exe /mount-wim /wimfile:c:\winpe_amd64\media\sources\boot.wim /index:1 /mountdir:c:\winpe_amd64\mount

after registry changes, file creations, etc., later run:

c:\windows\system32\dism.exe /unmount-wim /mountdir:c:\winpe_amd64\mount /commit c:\windows\system32\dism.exe /cleanup-wim

with /unmount-wim, receive error:

image file : c:\winpe_amd64\media\sources\boot.wim image index : 1 saving image [==========================100.0%==========================] unmounting image [==========================100.0%==========================]  error: 0xc1420117  directory not unmounted.  due applications still have files opened within mount directory.  close these files , unmount again complete unmount process.  dism log file can found @ c:\windows\logs\dism\dism.log

which why implemented /cleanup-wim script. elicits:

unmounting image @ c:\winpe_amd64\mount [==========================100.0%==========================] scanning drive c stale files operation completed successfully.

however, returns when query mounted wims, regardless if initial /unmount-wim successful or not:

c:\windows\system32\dism.exe /get-mountedwiminfo   mount dir : c:\winpe_amd64\mount image file : c:\winpe_amd64\media\sources\boot.wim image index : 1 mounted read/write : yes status : invalid  operation completed successfully.

and if run /cleaup-wim once more manually, unmount successfuly:

unmounting image @ c:\winpe_amd64\mount [==========================100.0%==========================] scanning drive c stale files operation completed successfully.

once query once more, no mounted/orphaned wims found. tried making batch script wait 5 seconds between /unmount-wim , /cleanup-wim, still had same result. called batch script cleanup command, still no dice.

any suggestions?


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -