Jump to content











Photo
- - - - -

[unmount related] Does anybody know how to force close all opened files on volume?

unmount dismount lock

  • Please log in to reply
1 reply to this topic

#1 Victor Milovanov

Victor Milovanov

    Newbie

  • Members
  • 15 posts
  •  
    United States

Posted 26 August 2012 - 10:26 PM

I have the common problem with explorer.exe holding opened files on my virtual disks, so I can't forcibly unmount them. It seems, that force unmount option in CPL works like disk ejecting, and I need something safe like chkdsk's force close files.
I can see opened handles with handle.exe, but is there a way to force close them? If so, it would be nice to try the following seq:
- try unmount
- if any files are still opened, force close them
- if they are still opened, force unmount

#2 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

  • Developer
  • 1416 posts
  • Location:Borås, Sweden
  •  
    Sweden

Posted 27 August 2012 - 05:11 AM

I have the common problem with explorer.exe holding opened files on my virtual disks, so I can't forcibly unmount them. It seems, that force unmount option in CPL works like disk ejecting, and I need something safe like chkdsk's force close files.
I can see opened handles with handle.exe, but is there a way to force close them? If so, it would be nice to try the following seq:
- try unmount
- if any files are still opened, force close them
- if they are still opened, force unmount


The unmount option in CPL asks you if you want to forcefully close all open handles. If you answer yes, it will try to do so in the same way as chkdsk and similar do. If that fails, it tries to just "eject" the volume anyway. There is nothing more or less "safe" with this, compared to how chkdsk and similar does it, except that chkdsk only tries first step, if closing of all open handles fails it would not forcefully "eject" the volume anyway.

One problem with imdisk.cpl could be if user who dismounts the volume has no permission to forcefully dismount filesystems. In that case it cannot try to close all open handles first. Instead it shows the "force?" message and tries to "eject" the volume anyway if you answer yes. But in this case "another method" for it would not help either, because the problem is basically with user's permissions.





Also tagged with one or more of these keywords: unmount, dismount, lock

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users