Page 1 of 1
How to delete contents of a mounted wim file
Posted: Tue Sep 24, 2024 10:22 pm
by Mr.X
I want to delete a couple of folders containing programs I added into the installed WinRE.
I want to use commands lines in the BuildScript.cmd
Re: How to delete contents of a mounted wim file
Posted: Tue Sep 24, 2024 11:26 pm
by OldNavyGuy
rmdir [folder] /s /q
Re: How to delete contents of a mounted wim file
Posted: Tue Sep 24, 2024 11:56 pm
by Mr.X
I tried that command before but something strange happens.
Example:
Code: Select all
rmdir "%TBWinPE_MountPath%\Program Files\Program for partitioning" /S /Q
Then I re-create the installed WinRE,
After that I boot the installed WinRE and go to X:\Program Files\ and indeed the folder is gone.
Then I come back to my BuildScript.cmd file and delete the command line.
After that I re-create the installed WinRE build.
Then I boot the build, go to X:\Program Files\ and surprisingly the folder reappears with all its contents.
Re: How to delete contents of a mounted wim file
Posted: Wed Sep 25, 2024 12:15 am
by OldNavyGuy
Sounds like you're looking at a restored version of the .wim file, after the cmd runs.
Re: How to delete contents of a mounted wim file
Posted: Wed Sep 25, 2024 3:34 am
by Mr.X
Alright, I started anew with a fresh clean winre.wim following this guide:
Repairing the Windows Recovery Environment (WinRE)
I think it's better this approach.