Deleting Windows XP Mode Base.vhd

Hierarchical map of used space


I was trying to regain some space on my Windows 7 C: partition. I use a tool named WinDirStat to show me where disk space is allocated. It spotted among many things a single file called C:\Program Files\Windows XP Mode\Windows XP Mode base.vhd. It weights more than a gigabyte : I want it suppressed.

Hierarchical map of used space
WindirStat shows where space is used on your hard disk

This file is not deleted when you remove Windows XP Mode. By default you cannot delete it, even if you are an administrator of your PC. But with only two manipulations, you will grant yourself the power to do so. Obviously, follow this procedure only if you know exactly what you’re doing. Let’s admit that this warning is generally nonsensical as we never know exactly what we’re doing, but you’ve been warned.

Deleting a file that doesn’t want to be deleted

The file is prevented from deletion because you have no right to delete it. In order to authorize yourself, you need to :

  1. take ownership of the file
  2. give yourself the right to delete it

Right click on the file in a Windows Explorer window, and click on Properties. It opens a dialog window. In the Security tab, click on Advanced button. In the Owner tab, you can see that the current owner is System. Click on the Edit button. In the new pop-up window, select your username. Validate all the dialogs you’ve opened.

Again, right click on the file in a Windows Explorer window, and click on Properties. In the Security tab, click on the Edit button. A dialog now shows current authorizations. Click on Full Control and validate all the dialogs.

You can now delete the file, as usual.

Windows XP Mode base.vhd shown as deleted
At last !

When a deleted file is not deleted

You may notice that you cannot immediately delete the file even if it has been moved to Windows Recycle Bin. An error spawns when you try to empty the Recycle Bin, and the file disappears. There’s still some work to be able to completely get rid of this file, as it is in use by another program. There are several ways to get out of this dead-end, and I took a brute force one, with the tool I already had in hand.

If you’re in doubt that the file has been deleted, WinDirStat shows you the space taken by the Windows Recycle Bin, even if the recycle bin looks empty. In my case, after deletion, there was a hidden 1.1GB file still consuming space on the disk !

WinDirStats shows deleted files that are still occupying space on disk
Invisible file, still not deleted

The only thing I had to do next, is to reboot in Safe Mode (pressing F8 when restarting the PC). Then, I could run WinDirStat again, and delete the file. I rebooted in normal mode, and everything went OK, with more space available on my hard disk.

Leave a Reply

Your email address will not be published. Required fields are marked *