How do you know who or what is locking a removable disk?
We've used process explorer from Microsoft (formerly Sysinternals). You can search for the file name and it will tell you which process is holding on and you can kill the handle on the file. The tool is also great at looking deep into your process tree. It's free too. Good luck!
Windows-centric:
Uwe Sieber's RemoveDrive can do this, some of the time, even optionally suspending the indexing service to do so.
On Vista x64 I've still sometimes found it necessary to manually close System's handle to the drive letter and/or the \Device\HarddiskVolumeX path RemoveDrive reports by using Process Explorer's Handle viewer, however. This even after verifying it not in use by any processes or services. (I've searched for an explanation for some time.)