Used EjectUSB for Windows?
Developer’s Description
EjectUSB was designed to be a simple utility to close all programs running from a specified drive orfolder and then attempt ejection if a drive was specified. Extended functionality includesflushing the file cache, closing Explorer windows and removing registry entries and RecentDocument shortcuts referencing the specified drive or folder.