winpe-directory

Trouble deleting c:\winpe_x86 directory – DISM


If you forget to unmount a .WIM file it will lock itself on your HDD and you will be unable to delete it, or the C:\winpe_x86 directory. This process will remove those files using the command line.

Trouble deleting the c:winpe_x86 directory

Step 1

Launch CMD.

Step 2

Type:

[vb]
DISM /Cleanup-Wim
[/vb]

This process tries to free up locked files so that you can manually delete them. Once completed, try and remove the entire mount folder containing all the locked files.

Step 3

If it still isn’t fixed by running the above, you will need to display a list of the mounted WIMS.
Type:

[vb]
DISM /Get-MountedWimInfo
[/vb]

There are two possible scenarios here. The first happens when you try and manually delete files before running this command line code. The status of the file is listed as “Needs Remount”. If you see this you will have to remount the .WIM.

Dism Remount
The other possible option is that the image is mounted fine and you could move on. You’re in good shape is the status reads “OK”.

Dism Mount

Step 4

If it’s not mounted properly you’ll want to remount it.
Type:

[vb]
DISM /remount-wim /mountdir:C:\(mount folder name)
[/vb]

Dism Remount Wim

Step 5

Lastly, you will then want to unmount that .WIM in DISM.
Type:

[vb]
DISM /unmount-wim /mountdir:C:\(mount folder name) /discard
[/vb]

unmount a .wim file

Step 6

Reboot your computer and now you should be able to delete your c:\winpe_x86 directory.

To see more DISM commands, read Microsoft’s article on “Deployment Image Servicing and Management Command-Line Options.”

You may also like:

Sysprep a Windows 7 Machine – Start to Finis... This is the old version, please see the new Sysprep a Windows 7 Machine – Start to Finish V2. Note - I highly recommend creating a boot or rescue d...
Copy Taskbar Icons Windows 7 Sysprep This is the old version, please see the new Copy Taskbar Icons Windows 7 Sysprep v2. Ok, you can thank a colleague of mine (Dinyero Johnson) for th...
Sysprep Windows 10 Machine: Step by Step Guide In this article we will show you how to use PowerShell and Windows System Preparation Tool to prepare a highly customized, personal Windows 10 install...
Sysprep Windows 7 – Third Party Anti-Virus I have run into about 20-30 people over the last couple weeks that were having trouble sysprepping and they all narrowed it down to the same thing; th...
Install WAIK supplement for Windows 7 SP1 WAIK Supplement These are instructions for installing the new The Windows Automated Installation Kit (AIK) for Windows 7 SP1. This is assuming that y...
Comments
  1. Posted by Craig S.

Add Your Comment