Really Annoying Flaw in NTFS Mount Points

UPDATE: As some people have noted, this problem was fixed in Windows Vista, so “it’s not really a problem anymore.” And with Windows 7 out now, and Windows XP slowly dying, there’s no real reason to worry about this anymore. But I’m leaving this article here, just for the sake of posterity.

I found out (the hard way) about this particular problem with NTFS Mount points today:

When you try to delete folders that are stored on a mounted drive and to send them to the Recycle Bin, you may receive the following error message:

Cannot delete Foldername: Access is denied. The source file may be in use.

This behavior occurs because the Recycle Bin does not understand mounted volumes.

This was really freaking annoying. What makes it even worse is that there is no “fix” for the problem; only a workaround is available. And the workaround?

When you delete the files or folders by using Windows Explorer, use the SHIFT+DELETE key combination. This bypasses the Recycle Bin.

Riiiiiiiiight. Because bypassing the Recycle Bin is exactly what I want to do WHEN IT’S MY ENTIRE USER PROFILE FOLDER THAT IS ON A MOUNTED DRIVE!

Now I’m really pissed off, because I no longer have the capability to try and go back to the configuration I originally planned to use with the new drive (copy partition & resize to new drive) – this is because I’ve already mounted the new drive and formatted it. Changing this now would involve a lot of copying data around and resizing of partitions, without being able to have a “backup” in place as before – a risk I’m not willing to take.

I may have to put on my Windows Hacker Hat for this one and figure out how to either:

  1. Make the Windows Recycle Bin understand Mounted drives, or;
  2. Make Windows automatically bypass the Recycle Bin for Mounted drives.

Because remembering to SHIFT+DEL every time I want to delete a folder from anywhere in my user profile directory (including but not limited to: My Documents, My Music, My Videos, My Pictures, etc.) is just not OK. Never mind what it’s going to do to programs that try to delete things – I can just see all the error messages now!

If anyone from Microsoft is reading this – especially anyone from the shell/explorer team – please, please, please bump this bug up in priority – I’m begging you!!

9 Responses

  1. batteryfast July 3, 2008 / 5:42 am

    […]belive me Time Theif this has nothing to do with an “actual” horse, or climb on Mt. Everest, this is metaphore for exactly what the tags say. YOU have to read deeper to understand[…]

  2. Sid August 3, 2008 / 3:08 am

    Oh, this has been fixed in Vista.

  3. Keithius August 3, 2008 / 9:39 am

    Yes, I know it’s been fixed in Vista – but I have XP, so that doesn’t really help me.

  4. Lupin January 16, 2009 / 7:55 pm

    I’ve done the same thing and moved the whole “document and settings” folder (which means all users, even NetworkService and LocalService) to another partition. I got used to the SHIFT+DELETE “workaround” (after a month or so).

    But I have another problem and would be interested if someone else with a similar setup has the same. Sometimes when I uninstall a program (seems to depend on the installer) the whole documents partition gets unmounted! With all the consequences of having no user profile anymore (programs resetting to default settings, all icons vanishing in the start menu, quicklaunch and desktop, aso.). I immediately have to open regedit change the profile path for every profile to the drive letter of the docs partition. Then I have to restart, because some programs already wrote in a new “docs and set” folder on the system drive, and as long as there are files in it you can’t mount a partition in it. After the restart you see which programs are intelligent and using the USERPROFILE variable and which use hardcoded paths. One annoying example is the AVG virus scanner which always uses the path given at install for logfiles. Logfiles you can’t delete until you killed all AVG processes, which is a challenge in it’s own. Whenn the directory is empty again, the docs partition can be mounted to it again (I keep the drive letter, too, because I know I’ll need it again).

    After changing the settings in the registry again and a reboot, everything is back to normal. Luckily I never lost any data or settings (programs reverting to defaults is temporary) or had other problems like not being able to login (which IMO is just big luck). So it’s mainly an annoyance (that took me some time to repair the first time it occured; now I’m done in 10 minutes).

    I don’t know why this happens. It seems to be a badly programmed uninstaller, that wreaks havoc when trying to delete something in the profile folder (e. g. start menu entries). Has someone else experienced this mediocre handling of NTFS mount points with XP? Man, I love linux for having a single TEXT! – file for it’s mounts (and not a cryptic, unmanageable registry) and completly transparent handling of mount points.

  5. Keithius January 17, 2009 / 9:52 am

    Hmmm… I’ve never run into the problem of having my “Documents and Settings” partition un-mount spontaneously yet.

    If it often happens while un-installing a program, I’d start by laying the blame on the un-installer. Un-installers are often the worst-written programs you will ever find on a computer, and the least tested. It wouldn’t surprise me that a badly written one could cause an entire partition to be un-mounted.

  6. Paul B. February 18, 2011 / 1:03 pm

    Keith, I enjoy your writing. But I’ve concluded that moving user profiles by junction points carries the potential of too many important snags down the line. MS really needs to step up to the plate and implement this as an inherent feature, at least on install, and most preferably at any time.

  7. Intuit April 7, 2011 / 11:32 am

    Ran across this thread while seeking out file/directory duplication software that supports NTFS Reparse Points (a.k.a. Junctions and Symbolic Links). (linked in from http://www.starkeith.net/coredump/2009/05/18/how-to-move-your-windows-user-profile-to-another-drive/ )

    Anyway, I have had my XP installation split-up over multiple physical drives for some time now.
    See: http://www.sudhian.com/index.php?/forums/viewthread/95156/

    Regarding XP post installation, there are specific locations in the registry that can be modified (while system is online or offline) to accommodate the fact that you’ve moved that specific user profile. See “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList”. In theory, the Recycle.Bin folder should start working properly. Any Explorer .LNK files, and other registry entries pointing to the old locations will continue to rely on the NTFS directory / folder junction; working properly.

    The problem here is caused by the fact that part of the RecycleBin implementation runs at a low level. Low-level programs and drivers, see through reparse points. This is true even for Vista/7. FYI regarding Vista/7, Symbolic Links will work on Folders (like “C:\Users” and “%ProgramData%”) where Junctions will not. (<– note: all reparse points will need to be manually updated to point to the truename locations) However if some program breaks protocol and places a driver file under one of these folders, that program will fail unless the driver is manually moved and it's associated registry entries updated.

    ———-
    I know of no install-parameters for Windows versions 6 and beyond. (they simply use special "Desktop.Ini" settings to customize folder names for different languages while the underlying folder names remains unchanged)

  8. Troy September 11, 2011 / 1:49 am

    The Registry Key switch got rid of the shift+del issue for me. Interestingly enough, I was only having to hit shift+del to get rid of folders, regular old del worked fine for files. Both work now that I changed the registry entry that Intuit mentioned.

    • Keithius September 11, 2011 / 9:14 am

      Yeah, this problem only affects deleting folders, not files.

      Glad the registry hack worked for you!

      By the way – if you’re having this problem, you must still be using Windows XP… why?? (Just a friendly jab!)

Comments are closed.