How do I unmount a volume (USB flash drive) via command-line or Visual Basic script?
Asked
Active
Viewed 7,924 times
6
-
AFAIK, neither DOS nor COMMAND.COM support USB flash drives. Did you mean `cmd.exe`? – u1686_grawity Mar 30 '11 at 18:41
-
2Check this out: http://stackoverflow.com/questions/296560/mount-unmount-usb-drives-with-vbscript and also check this out: http://portableapps.com/node/639 – MaQleod Mar 30 '11 at 18:42
3 Answers
5
Check out the two following Windows utilities:
Ƭᴇcʜιᴇ007
- 111,883
- 19
- 201
- 268
-
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. – u1686_grawity Mar 31 '11 at 13:06
1
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.)
u1686_grawity
- 426,297
- 64
- 894
- 966