"It's the same as being able to embed TrueCrypt directly into any application or file of your liking"

free, open source, safe TrueCrypt volume mounter

before using, check that .NET 3.5 is installed on your machine
TrueCrypt has to be installed too




                      

Main window (normally not seen during use)



With this program, one can
create shortcuts to any files, folders or programs located inside TrueCrypt volumes to launch them instantly by clicking these shortcuts. The standard TrueCrypt password box appears and once the password is correct, the target file, folder or a program is opened/launched. Directly from temporarily mounted encrypted space. The encrypted location is automatically closed and unmounted upon closing the launched file, program or a folder.

So, it is a true "Click-Use-Close-and-Forget" scheme.


It's the same as being able to embed TrueCrypt directly into any application or file of your liking.

For example, this is how to add email encryption capability to Thunderbird:
(1)  Install Thunderbird into a TrueCrypt-encrypted folder.
      (Make sure your email is stored in the encrypted location too,
      not in the default C:\Users\....your_account....\AppData\Roaming\Thunderbird\)
(2) Install TrueClickt! and create tcx shortcut for
      "...Your_Encrypted_Location\Mozilla Thunderbird\thunderbird.exe"
      as described in the step-by-step guide below. 
      Place this shortcut for example, to Windows Desktop.

      What happens when you click the shortcut?
      Instead of seeing Thunderbird launching right away, you'll see TrueCrypt
      password box. Once correct password for the encrypted folder
      is entered, Thunderbird launches and down the road behaves just as if it is 
      launched from unencrypted source. Except it is not.
   
      When Thunderbird is closed, the encrypted folder is automatically
      dismounted, or "locked up". One-Click and all is back encrypted again.


Can you trust this program security-wise? Possibly. Granted you have read TrueCrypt manual and understand what it is and how it works. All security-sensitive steps are handled by TrueCrypt. The password is in no way communicated to the TrueClickt!. See the source code below. 
 
Some users may wonder why not just use a batch file like:

===================
Echo Off
truecrypt /q /lX /v \Device\Harddisk2\Partition1
cls
start x:
Echo Mounted As X:\
Echo Unmount Volume?
pause
cls
truecrypt /q /d /f
Echo Unmounted
pause
=================

One could. But this script will not dismount TrueCrypt volume when target file/folder/application is closed. Nor will it ensure that open files are terminatd once TC volume is dismounted.

TrueClickt will.

The behavior of TrueClickt+TrueCrypt is similar to that of
NETCPPcrypt
,  except TrueClickt provides On The Flight encryption and is best suited for large files.
 
Download
regular version. Windows setup file.
Download
portable version to use with USB flash drives.


Short step-by-step guide:

Operation of the program is simple: short configuration files *.tcx are created for your favorite TC volumes using the provided template. Clicking these files brings the TC password dialogue, the rest is standard TC use. Closing the opened encrypted folders or files will automatically dismount the volume they are in.  Shortcuts to the *.tcx file can be placed to Desktop/QuickLaunch etc.


Source code
:

#pragma once

 

 

namespace TrueCrypt_mounter_Netcpp {

 

                using namespace System;

                using namespace System::ComponentModel;

                using namespace System::Collections;

                using namespace System::Windows::Forms;

                using namespace System::Data;

                using namespace System::Drawing;

                using namespace System::IO;

 

                /// <summary>

                /// Summary for Form1

                ///

                /// This code was conceived and implemented by Alexei V Korennykh

                /// Anyone is free to distribute and use the code, but please keep this remark

                /// unchanged and summarize changes, if any, immediately below this line.

                /// </summary>

                public ref class Form1 : public System::Windows::Forms::Form

                {

                public:

                                Form1(void)

                                {

                                                InitializeComponent();

                                                //

                                                //TODO: Add the constructor code here

                                                //

                                }

 

                protected:

                                /// <summary>

                                /// Clean up any resources being used.

                                /// </summary>

                                ~Form1()

                                {

                                                if (components)

                                                {

                                                                delete components;

                                                }

                                }

                private: System::Diagnostics::Process^  process1;

                private: System::Windows::Forms::Timer^  timer1;

                private: System::Diagnostics::Process^  process2;

                private: System::Windows::Forms::Timer^  timer2;

                private: System::Windows::Forms::Label^  label2;

                private: System::Windows::Forms::Label^  label1;

                private: System::Windows::Forms::Button^  button1;

                private: System::ComponentModel::IContainer^  components;

                protected:

 

                private:

                                /// <summary>

                                /// Required designer variable.

                                /// </summary>

 

 

#pragma region Windows Form Designer generated code

                                /// <summary>

                                /// Required method for Designer support - do not modify

                                /// the contents of this method with the code editor.

                                /// </summary>

                                void InitializeComponent(void)

                                {

                                                this->components = (gcnew System::ComponentModel::Container());

                                                System::ComponentModel::ComponentResourceManager^  resources = (gcnew System::ComponentModel::ComponentResourceManager(Form1::typeid));

                                                this->process1 = (gcnew System::Diagnostics::Process());

                                                this->timer1 = (gcnew System::Windows::Forms::Timer(this->components));

                                                this->process2 = (gcnew System::Diagnostics::Process());

                                                this->timer2 = (gcnew System::Windows::Forms::Timer(this->components));

                                                this->label1 = (gcnew System::Windows::Forms::Label());

                                                this->label2 = (gcnew System::Windows::Forms::Label());

                                                this->button1 = (gcnew System::Windows::Forms::Button());

                                                this->SuspendLayout();

                                                //

                                                // process1

                                                //

                                                this->process1->StartInfo->Domain = L"";

                                                this->process1->StartInfo->LoadUserProfile = false;

                                                this->process1->StartInfo->Password = nullptr;

                                                this->process1->StartInfo->StandardErrorEncoding = nullptr;

                                                this->process1->StartInfo->StandardOutputEncoding = nullptr;

                                                this->process1->StartInfo->UserName = L"";

                                                this->process1->SynchronizingObject = this;

                                                //

                                                // timer1

                                                //

                                                this->timer1->Tick += gcnew System::EventHandler(this, &Form1::timer1_Tick);

                                                //

                                                // process2

                                                //

                                                this->process2->EnableRaisingEvents = true;

                                                this->process2->StartInfo->Domain = L"";

                                                this->process2->StartInfo->LoadUserProfile = false;

                                                this->process2->StartInfo->Password = nullptr;

                                                this->process2->StartInfo->StandardErrorEncoding = nullptr;

                                                this->process2->StartInfo->StandardOutputEncoding = nullptr;

                                                this->process2->StartInfo->UserName = L"";

                                                this->process2->SynchronizingObject = this;

                                                this->process2->Exited += gcnew System::EventHandler(this, &Form1::process2_Exited);

                                                //

                                                // timer2

                                                //

                                                this->timer2->Tick += gcnew System::EventHandler(this, &Form1::timer2_Tick);

                                                //

                                                // label1

                                                //

                                                this->label1->AutoSize = true;

                                                this->label1->Font = (gcnew System::Drawing::Font(L"Impact", 24, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,

                                                                static_cast<System::Byte>(0)));

                                                this->label1->ForeColor = System::Drawing::Color::Blue;

                                                this->label1->Location = System::Drawing::Point(44, 3);

                                                this->label1->Name = L"label1";

                                                this->label1->Size = System::Drawing::Size(146, 39);

                                                this->label1->TabIndex = 0;

                                                this->label1->Text = L"TrueCrypt";

                                                //

                                                // label2

                                                //

                                                this->label2->AutoSize = true;

                                                this->label2->Location = System::Drawing::Point(8, 43);

                                                this->label2->Name = L"label2";

                                                this->label2->Size = System::Drawing::Size(214, 13);

                                                this->label2->TabIndex = 1;

                                                this->label2->Text = L"open source extension by www.netcpp.com";

                                                //

                                                // button1

                                                //

                                                this->button1->FlatStyle = System::Windows::Forms::FlatStyle::Flat;

                                                this->button1->Location = System::Drawing::Point(73, 61);

                                                this->button1->Name = L"button1";

                                                this->button1->Size = System::Drawing::Size(75, 23);

                                                this->button1->TabIndex = 2;

                                                this->button1->Text = L"close";

                                                this->button1->UseVisualStyleBackColor = true;

                                                this->button1->Click += gcnew System::EventHandler(this, &Form1::button1_Click);

                                                //

                                                // Form1

                                                //

                                                this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);

                                                this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;

                                                this->ClientSize = System::Drawing::Size(227, 88);

                                                this->Controls->Add(this->button1);

                                                this->Controls->Add(this->label2);

                                                this->Controls->Add(this->label1);

                                                this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::Fixed3D;

                                                this->Icon = (cli::safe_cast<System::Drawing::Icon^  >(resources->GetObject(L"$this.Icon")));

                                                this->Name = L"Form1";

                                                this->Text = L"netcpp_TrueCrypt";

                                                this->TopMost = true;

                                                this->WindowState = System::Windows::Forms::FormWindowState::Minimized;

                                                this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load);

                                                this->FormClosing += gcnew System::Windows::Forms::FormClosingEventHandler(this, &Form1::Form1_FormClosing);

                                                this->ResumeLayout(false);

                                                this->PerformLayout();

 

                                }

#pragma endregion

 

 

//general parameters

static String^ ini = ""; //input *.ntcx path; and *.ntcx text content

static String^ TC_exe = ""; //location of TrueCrypt.exe

static String^ TC_letter = ""; //TrueCrypt letter to use

static String^ TC_container = ""; //TrueCrypt container to mount

static String^ file_folder = ""; //file or folder to launch in process 2

static bool kill_on_closed = true; //kill app instance upon closing the child window

 

 

void readini(void) //read the launching file *.tcx

{

                        try

                                                {

                                                   ini = String::Join(" ", Environment::GetCommandLineArgs(), 1, Environment::GetCommandLineArgs()->Length - 1);

                                                   this->Text = ini->Substring(ini->Length-15, 15);

 

                                                   ini = File::ReadAllText(ini)->Replace("\r","");

 

                                                   array <String^>^ a =ini->Split('\n');

 

                                                   TC_container = a[1];

                                                   TC_exe = a[3];

                                                   TC_letter = a[5];

                                                   file_folder = a[7];

                                                   kill_on_closed = Convert::ToBoolean(a[9]);

                                                 }

                                                 catch(...)

                                                 {

                                                 }

}

 

 

void mount(void)

{

                                                   process1->StartInfo->FileName = TC_exe;

 

                                                   if (File::Exists(TC_container))

                                                   {

                                                   process1->StartInfo->WorkingDirectory = Path::GetDirectoryName(TC_container);

                                                   process1->StartInfo->Arguments = "/q "+"/l "+TC_letter+" /v"+ Path::GetFileName(TC_container);

                                                   }

                                                   else //it's a drive

                                                   {

                                                    process1->StartInfo->WorkingDirectory = TC_container;

                                                    process1->StartInfo->Arguments = "/q "+"/l "+TC_letter+" /v"+ TC_container;

                                                   }

               process1->Start();                

 

                                                   timer2->Interval = 200;

                                                   timer2->Start();

                                                  

}

 

 

static bool p2_started = false;

 

void d_mount(void)

{

 

                if (p2_started == true)

                {                               

                          process2->Kill();

    }

               

 

                                                                if (Directory::Exists(TC_letter))

                                                   {

                                                   process1->StartInfo->FileName = TC_exe;

                                                   process1->StartInfo->WorkingDirectory = Path::GetDirectoryName(TC_container);

                                                   process1->StartInfo->Arguments = "/q "+"/d "+TC_letter+" /f";

               process1->Start();

                                                   }

}

 

 

 

void launch_file_folder(void)

{

                if (File::Exists(file_folder))

                {

                                process2->StartInfo->FileName = file_folder;

                                process2->StartInfo->WorkingDirectory = Path::GetDirectoryName(file_folder);

                }

                else

                {

                                process2->StartInfo->FileName = "Explorer.exe";

                                process2->StartInfo->Arguments = file_folder;

                }

               

                p2_started = true;

    process2->Start();

               

               

}

 

 

 

 

static bool failedload = false;

private: System::Void Form1_Load(System::Object^  sender, System::EventArgs^  e) {

 

                                                 readini();

 

                                                 if (ini == "") //launched without ini tcx, abort

                                                 {

                                                                 cancel = true;

                 Close();

                                                 }

 

 

                                                 if (Directory::Exists(TC_letter)) //location already mounted

                                                 {

                                                                 failedload = true;

                                                                 cancel = true;

                                                                 MessageBox::Show("Specified TC letter is already mounted.","Attention");

                 Close();

                                                                 

                                                 }

 

 

                                                 if (File::Exists(TC_exe))

                                                 {

                                                     mount();

                                                 }

                                                 else

                                                 {

                                                                 MessageBox::Show("TrueCrypt.exe was not found.","Attention");

                                                 }

 

}

 

 

 

static bool cancel = false;

private: System::Void Form1_FormClosing(System::Object^  sender, System::Windows::Forms::FormClosingEventArgs^  e) {

 

                                                 timer1->Interval = 200;

                                                 timer1->Start();

 

                                                 if (cancel == false)

                                                 {

                                                    e->Cancel = true;

                                                 }

 

                                                 if (failedload == false) //only if directory was originally mounted by this instance of the app

                                                 {

                                                        d_mount();

                                                                                failedload = true; //this is done to prevent repeated dismounts

                                                 }

 

                                 }

 

 

 

static int trials = 0;

private: System::Void timer1_Tick(System::Object^  sender, System::EventArgs^  e) {

 

                                                 if (! Directory::Exists(TC_letter))

                                                 {

                                                                 cancel = true; //finally, a successfull dismount: escape e->Cancel = true statement

                 Close();

                                                 }

 

                                                 if (trials > 100) // 20 sec

                                                 {

                                                                 MessageBox::Show("Could not dismount TrueCrypt volume.\nPlease explore in TrueCrypt to eliminate\npossible security exposures.","Attention");

                                                                 System::Diagnostics::Process::Start(TC_exe);

                                                                 cancel = true; //unsuccessful dismount but close anyway

                                                                 timer1->Stop();

                 Close();

                                                 }

                                                 trials++;

 

                                 }

 

 

 

static int timer2trials = 0;

 

private: System::Void timer2_Tick(System::Object^  sender, System::EventArgs^  e) {

 

                                                 if (Directory::Exists(TC_letter))

                                                 {

                                         timer2->Stop();

                                                     launch_file_folder();

                                                 }

 

                                                 if (timer2trials > 100) //(20 seconds)

                                                 {

                                                                 timer2->Stop();

                                                                 MessageBox::Show("Aborting due to unusually long TrueCrypt startup time\n","Attention");

                                                                 cancel = true; //still could not mount anything, now abort and exit

                 Close();

                                                 }

 

                                                 timer2trials++;

 

                                 }

 

 

 

 

private: System::Void process2_Exited(System::Object^  sender, System::EventArgs^  e) {

                                                 if (kill_on_closed == true) //close app when true is selected in tcx file

                                                 {

                   p2_started = false; //child window has now been killed

                   Close();

                                                 }

 

}

 

private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {

                                                 Close();

                                 }

};

}