Premetto che sono un pivello in questo ambito ma se preparo un file "smonta.bat" (H è la lettera da disconnettere) con dentro

@echo off

REM Be sure to change this to the drive you want to unmount!
set drive=H:

echo Unmounting Drive...
mountvol %drive% /p
echo Drive Unmounted!

pause
exit


Quando lo eseguo mi risponde "la directory non è vuota"
Enigmatico...