Mount TrueCrypt volume from command line

You can mount/unmount TrueCrypt volumes from command line or .BAT file automatically, using key files, like shown below.

This example uses two key files to mount the encrypted disk image as drive T. Both shall be present for the encrypted volume to be mounted.

 

mount.bat:

"C:\Program Files\TrueCrypt\TrueCrypt.exe" /q /s /l T /v "C:\Usr\Data\User.dat" /k "E:\Keys01.key" /k "F:\Keys02.key" 

umount.bat:

"C:\Program Files\TrueCrypt\TrueCrypt.exe" /q /s /d T 

Advertisements

One Comment on “Mount TrueCrypt volume from command line”

  1. Peter Holger Kram says:

    Thank you! Helped me a lot! You can also pass a Device like “\Device\HarddiskVolume5” with the /v (Volume) Flag.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s