Cool use of Batch Scripting webfork. I tend to use a custom AutoIt Script (which I haven't released publicly.)
This is my poor attempt at creating a Batch Script, place in the same location as TrueCrypt.exe or change "Set TrueCrypt"
& "Set Path"
. It works in that when you double-click on the Batch File (e.g. Mount.bat,) it will Mount the TrueCrypt Container, if the Batch File (e.g. Mount.bat,) is double-clicked again it will automatically Dismount. Another feature is if you add EjectUSB
to the same directory as TrueCrypt and remove "REM"
on the line that executes EjectUSB
in Dismount, this will close all programs running from the Drive (e.g. Y:\)
Plus, if you remove "REM"
from "Del %0"
it will delete the Batch File on Dismount, it might be useful for someone?! :S
Code: Select all
IF EXIST %Drive%: GoTo Dismount
REM START /WAIT %EjectUSB% %Drive%:\
%TrueCrypt% /d %Drive% /f /w /q /s
REM Del %0
%TrueCrypt% /v /l %Drive% %Path% /m rm /m ts /q /e