Click here to Skip to main content
15,868,016 members
Articles / Programming Languages / PowerShell
Tip/Trick

Automate VeraCrypt Container Mounting for Use with AbstractSpoon ToDoList

Rate me:
Please Sign up or sign in to vote.
5.00/5 (4 votes)
17 May 2016CPOL 14.7K   2  
I wrote this small PowerShell script to quickly access some AbstractSpoon ToDoList documents which are stored in VeraCrypt containers. The selected container stays mounted until the ToDoList executable is closed. I use OneDrive to automatically upload the then dismounted container to the cloud.

This allows me to securely access and transfer ToDoList documents between Windows devices without much effort. Of course, you can pick a different cloud provider and/or program executable to suit your scenario.

Start-Process [pathname]\VeraCrypt-x64.exe -ArgumentList '/l [driveletter]','/v [pathname]\[container.hc]','/q','/m ts' -Wait
Start-Process [pathname]\[ToDoList.tdl] -Wait
Start-Process [pathname]\VeraCrypt-x64.exe -ArgumentList '/d [driveletter]'

What happens when you execute the script? VeraCrypt presents a pop-up, asking for the container password. VeraCrypt then mounts the container to a driveletter, after which the ToDoList program opens the specified document. When closing the ToDoList program, VeraCrypt opens one last time for you to check if the container is really dismounted.

Perhaps useful:

  • For the script to execute in PowerShell, set the ExecutionPolicy accordingly.
  • The .tdl file extension has to be associated: Enable .tdl as a file extension for tasklists.
  • If you want to use multiple mounted containers: Allow multiple instances of ToDoList.
  • Use -windowstyle hidden to run the script without displaying the PowerShell console.

Used on Windows 10 and Windows 8.1; should work with Windows 7.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Rethink IT
Netherlands Netherlands
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
-- There are no messages in this forum --