Create a mountable virtual encrypted hard drive in Windows Vista using TrueCrypt

TrueCrypt is a free, open-source application for Windows XP and Windows Vista that will create a mountable, virtual, encrypted, hard disk. The encrypted files can be easily transported to mobile media including thumb drives, CDs, external hard drives, etc. The entire process is graphical and can be completed by users of any experience level. TrueCrypt accepts command line parameters which allows you to create a batch file to automatically mount your encrypted virtual hard disk. TrueCrypt will dynamically increase the size of your partition if you run out of drive space.

Install TrueCrypt

The first step is to download and extract TrueCrypt from the project homepage. Double click TrueCrypt Setup to begin.
If you are prompted for an administrator password or confirmation, type the password or provide confirmation. Leave the default installation path and leave all five text boxes selected and click Install.
TrueCrypt1 small
TrueCrypt will create a system restore point and begin the installation process. It will take several minutes, click Ok.
TrueCrypt2 small
TrueCrypt Setup will prompt you to review the documentation. The documentation is very thorough and well worth the read, however, for the purposes of this tutorial click No.
TrueCrypt3 small
In the TrueCrypt Setup dialog, choose Exit.

Create A TrueCrypt Encrypted Volume

Launch TrueCrypt from the Start menu (Start >> All Programs >> TrueCrypt >> TrueCrypt)
TrueCrypt4 small
Click Create Volume.
TrueCrypt5 small
Leave the default selection as “Create a standard TrueCrypt Volume” and click Next.
TrueCrypt6 small
Click Select File…
TrueCrypt7 small
Create a file at C:’Users’USERNAME’Encryption and click Save.
TrueCrypt8 small
Click Next.
TrueCrypt9 small
Leave the default Encryption Algorithm as AES and the Hash Algorithm as RIPEMD-160 and click Next.
TrueCrypt10 small
Select a size for your volume. I will select 200 MB and click Next.
TrueCrypt11 small
Enter a password and click Next.
TrueCrypt12 small
If you do not enter a password 20 or more characters in length, TrueCrypt will suggest that you increase the strength of your password, click Yes.
TrueCrypt13 small
Leave the Filesystem as FAT, the Cluster as Default, leave the Random Pool check box selected and click Format.
TrueCrypt14 small
Congratulations, the TrueCrypt volume was successfully created. Click Ok.
TrueCrypt15 small
On the Volume Created prompt click Exit.
TrueCrypt16 small
Your volume is completely created. However, before you can begin creating encrypted files, you need to mount the encrypted volume.

Mount a TrueCrypt Encrypted Volume

Select any drive letter and click Select File… navigate to the C:’Users’USERNAME’Encryption file we created previously and click Mount.
TrueCrypt17 small
Enter your password and click Ok. Your new encrypted volume should be visible in your Computer.
TrueCrypt18 small
Anything you save to this newly mounted drive will be encrypted and stored in the C:’Users’USERNAME’Encryption file. If you would like to transport your encrypted files, just take the C:’Users’USERNAME’Encryption file with you. To unmount your encrypted drive click Unmount.
In order to automatically mount your hard drive with a script, copy the truecrypt.sys and truecrypt-x64.sys files into C:’Windows. Open Notepad (Start >> All Programs >> Accessories >> Notepad) and copy and paste the following into the file:

​@echo off
Set /P pw=”Password: “
truecrypt /v C:'Users'USERNAME'Encryption /l i /m /a /p %pw% /q

Remember to replace “USERNAME” with your username. Save the file as C:’Windows’System32’Encryption.bat and whenever you launch the batch file and enter your password, your encrypted volume will mount.
Note: Your password will be displayed briefly as you type it. The most secure way to mount your drive would be to manually do it through TrueCrypt.

Recent Security Forum threads

Got a question? Post it on our Security Forums!