How do I unmount a volume (USB flash drive) via command-line or Visual Basic script?
Check out the two following Windows utilities:
From a batch script, the easiest way is to call USB Disk Ejector. (Sync might work too, but it wants a drive letter, which is not always predictable.)
You can use DevEject.
5 years ago