Autorun TrueCrypt from a USB drive

TrueCrypt is free open-source disk encryption software for Windows Vista/XP/2000 and Linux. I use at work and at home.

Edited to add:

  • These instructions were written for version 4.3a and will work for version 6.0.
  • I also have an easy to follow HowTo using TrueCrypt’s built in “Traveling Disk Setup”
  • Additional information on making AUTORUN work…

It is possible to install TrueCrypt to a USB drive with an AUTORUN.INF file so that you have a self-contained, encrypted, portable storage.

Here is what I get when I insert my USB drive.
truecryptmount.jpg

I can just select “Mount TryeCrypt Volume” enter my password and begin working.

truecryptfiles.jpgWith the version I am using, I installed TrueCrypt to my machine, then copied TryeCrypt.exe and TrueCrypt.SYS to the root directory of the USB drive. I then used TrueCrypt to create a large file in the root directory of the USB drive called MyData.tc.

The last step was to create the AUTORUN.INF file below. Note that the my example mounts the TrueCrypt volume as drive I:. To change the letter, change the /li and /di parameters to meet your needs.

AUTORUN.INF

[autorun]
label=MyData
icon=truecrypt.exe


action=Mount TrueCrypt Volume
open=truecrypt /v MyData.tc /li /q /a /m rm /e


shell=mounttc
shell\mounttc=&Mount
shell\mounttc\command=truecrypt /v MyData.tc /li /q /a /m rm /e


shell=dismounttc
shell\dismounttc=Dismount
shell\dismounttc\command=truecrypt /di /q


shell=runtc
shell\runtc=Run TrueCrypt
shell\runtc\command=truecrypt

I used to dislike anything that “AutoRan” when I put the disk in the computer, now that I can make my own AUTORUN.INF files, they are cool!

If you are looking for more information, Microsoft Developer network (MSDN) has an article, which covers all the options in a AUTORUN.INF file and DailyCupofTech an article AUTORUN.INF Tweaking.

A number of people (including me) have had trouble with Autorun NOT working. First, make sure you have the latest patches and drivers.

Then, go into the registry with REGEDIT (Start->Run->RegEdit)

Look at this information:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\CDRom

If this is 0 (Zero) set it to 1 (One)

Then check (Windows 95 through XP, not Vista)

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDriveTypeAutoRun

If this is 149 (0x95 hex) set it to 145 (0x91 hex)

For details on the above information, check out document, KB 330135. It details things to try when AUTORUN or AUTOPLAY do not work and document, KB 136214 which details the second registry edit.

http://support.microsoft.com/kb/330135

http://support.microsoft.com/kb/136214

Microsoft has more hits than I can catalog when searching for AUTOPLAY at search.msdn.microsoft.com

http://search.msdn.microsoft.com/Default.aspx?query=autoplay&brand=msdn&locale=en-us&refinement=

 

I did have a machine that never ran my AUTORUN file. I eventually made it into a print server…

Be Sociable, Share!

Leave a Reply

Your email address will not be published. Required fields are marked *