
RemoveDrive V1.6.0 - prepares removable drives for save removal
Freeware by Uwe Sieber - www.uwe-sieber.de

Works under Window 2000, XP, Server 2003 and Vista only.


Usage:
RemoveDrive DriveSpec: [-l][-h][-w:nnnn]

DriveSpec: is the drive to remove, e.g. U:
[-l] loop until success
[-h] show open handles (admin rights required, exprimental, may freeze!)
[-w:nnnn] wait nnnn milliseconds before close
[-d] show debug information

or

RemoveDrive "DeviceName" [-l]

DeviceName is the name of the device e.g. "Corsair Flash Voyager USB Device"
or short "Corsair Flash Voyager" as shown in the 'safe removal' dialog


No admin rights required :-)


Returns Errorlevels:

0 - successfully removed a device
1 - device identified but not removed
2 - device not found or parameters are invalid

4 - RemoveDrive.exe located on the drive to remove -> temporary copy 
    created and executed

If the removal fails then someone still accesses the drive. This can be something banal
like an open Word document or some kind of monitoring tool like a virus scanner or a
SMART tool.

By means of SysInternals ProcessExplorer you may discover which program holds an open handle
to the drive.
http://www.sysinternals.com/Utilities/ProcessExplorer.html
After starting it go to 'Find' -> 'Find Handle or DLL', enter a part of the volume's or the
drive's DOS device name (as volume12 or disk5) and search.








