Click here to Skip to main content
14,927,434 members
Articles / Programming Languages / PowerShell
Tip/Trick
Posted 17 May 2016

Tagged as

Stats

12.3K views
2 bookmarked

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
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)

Share

About the Author

Ron Bos
Rethink IT
Netherlands Netherlands
No Biography provided

Comments and Discussions

 
-- There are no messages in this forum --