Monday, 05 May 2014 00:00

Making TrueCrypt on a usb stick a bit easier for end users (Windows)

I needed to make TrueCrypt a bit friendlier for end users (teachers).

  1. Format the USB stickas required
  2. reate a hidden folder SETUP_FILES
  3. Create a TrueCrypt volume in SETUP_FILES called ENCRYPTED_FILES_DO_NOT_DELETE_EVER.TC
  4. Copy the TrueCrypt Setup program: TrueCrypt Setup 7.1a.exe in SETUP_FILES
  5. Create a start.cmd script in SETUP_FILES containing the following:-
    set DIR=%CD%
    "C:\Program Files\TrueCrypt\TrueCrypt.exe" /v "%DIR%\SETUP_FILES\ENCRYPTED_FILES_DO_NOT_DELETE_EVER.TC" /lx /a /e /q
    
  6. Create a stop.cmd script in SETUP_FILES containing the following:-
    "C:\Program Files\TrueCrypt\TrueCrypt.exe"  /q /d
  7. In the \ folder of the USB stick create a file called 'Start Using Secure USB stick.vbs' containing the following:-
    on error resume next
    Set fso = CreateObject("Scripting.FileSystemObject")
    If fso.FileExists("C:\Program Files\TrueCrypt\TrueCrypt.exe") Then
     CreateObject("Wscript.Shell").Run "\SETUP_FILES\start.cmd", 0, False
    Else 
     if MsgBox("Some software is required to use this encrypted USB  stick. Please Follow the installation instructions. When finished please launch this program again to access the disk.",vbOK,"Software Installation (TrueCrypt)") = vbOK Then
      CreateObject("Wscript.Shell").Run """\SETUP_FILES\TrueCrypt Setup 7.1a.exe""", 1, False
     End If
    End If
    
  8. Lastly create a files called 'Stop Using Secure USB stick.vbs in the \ folder of the USB stick
    CreateObject("Wscript.Shell").Run "SETUP_FILES\stop.cmd", 0, False
        

Notes Stop script will unmount ALL TrueCrypt volumes.

Last modified on Monday, 05 May 2014 15:34

Leave a comment

Make sure you enter all the required information, indicated by an asterisk (*). HTML code is not allowed.