How do I unmount a volume (USB flash drive) via command-line or Visual Basic script?
3 Answers
Check out the two following Windows utilities:
-
3Despite the name,
mountvol
doesn't do the same thing as the other tools (which is to sync and unmount the filesystem); rather it only manages paths through which a mounted filesystem can be accessed. Mar 31, 2011 at 13:06
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.)
cmd.exe
?