Deleting files from a mounted image


You may find that you’re unable to delete files from a mounted image when using Windows Explorer.  The reasons is that, in Windows Explorer the ‘delete’ operation is actually a ‘move’ to the recycle bin.  ‘Move’ is not supported by the WIM filter driver.  As a result, you will need to go to the command prompt to delete files from a WIM.

Comments (7)

  1. Mihailik says:

    But Shift+Delete is here for years to delete bypassing Recycle Bin. Can Shift+Delete be used with WIM?

    If so, such bypassing should be integrated in Windows Shell. Now, when you press simple Delete at removable drive, you go right to delete bypassing Recycle Bin. And WIM should use same behavior.

    Just flag WIM-mounted volumes as removable and shell will handle it gracefully.

  2. craigrow says:

    Good point, in addition to the command prompt, Shift+Delete will work.

    The implementation, in this case, is in the filter driver. It does not implement MoveFile. Unfortunately I’m just the messenger here. The Ximage team has decided it will not implement that in the filter driver.

    File a bug if you don’t like it. This is what betas are for.

  3. Norman Diamond says:

    > The reasons is that, in Windows Explorer

    > the ‘delete’ operation is actually a ‘move’

    > to the recycle bin.

    Not on a network drive. Not on a writable CD or DVD. Not on a floppy. Sometimes not on a SCSI or maybe USB hard drive, depending on which version of Windows it is and what kind of mood Windows Explorer was in when the drive was connected.

    > The Ximage team has decided it will not

    > implement that in the filter driver.

    Do you mean that the filter driver for local hard drives detected at boot time, and sometimes the filter driver for SCSI and USB hard drives, knows whether a file deletion operation came from Windows Explorer vs. came from a command prompt?

    If something is supposed to decide whether a Windows Explorer deletion means deletion or move to recycle bin, I would have put that something in Windows Explorer or a shell extension, instead of putting it in a filter driver. Silly me.

  4. Wes Miller says:

    delete is a move to the recycle bin whenever you delete a file from a locally mounted NTFS or FAT volume, unless a policy is in place to deem otherwise. CD/DVD file deletion is totally different on Windows today. Network file deletion is also completely different. Whenever a file is deleted, whomever is deleting it (Explorer, whatever) has the option to call an API and have the file sent to the Recycle Bin or permanently deleting it, depending on whether they call delete file directly from the filesystem (as cmd.exe – surprise – does, or calling an API in the Windows shell itself that "deletes" the file (to the Recycle Bin).

    The filter driver used for XImage is merely an interpreter. It deletes files using whatever command is handed to it by the application modifying the file. In this case the XImage driver is at the mercy of Explorer, which didn’t really delete the file… There isn’t a graceful way around it.

  5. hm says:

    Can you mount iso9660, like dvd/cd images programmatically from .NET languages or with interop from there?

  6. Chris Thompson says:

    Is the fact the a move operation is not supported by the WIM filter driver the reason that drvload.exe fails with an error code 0x80070057 when using the /offline switch to inject driver content into a mounted image?

  7. Off Campus says:

    In the past week I have been in my "lab" testing out WDS, AIK, SIM, and the included tools.  Everything…