Hi,
I'm starting with VeraCrypt.
I would like to write a script allowing to mount an external USB key just executing a .bat module, after a prompt to get the volume password.
The samples I found are not efficient. Could someone help me ?
Thanks in advance.
Guy
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
How much help do you need? Are you used to creating batch files? Are you familiar with VC command line syntax?
At its simplest, something like this would do it:
Thank you Adrian for your answer.
I have worked in IT, and think I will not have much problem with batch language, but I don’t manage VeraCrypt options.
My need is : for people using an USB key encrypted with VeraCrypt, to mount it in a very simple mode, running a batch, and just giving the password, and may be drive letter where the key is plugged.
(I think they will have to give either the USB key drive letter , or the name of the encrypted container ?).
So what could be the VC options to use ?
Thanks in advance.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
a. The file tests that mounting is not being attempted to a drive letter already in use.
b. The USB key is identified via its ID, which you can find out by mounting it once manually, right-clicking on its entry in the GUI, and viewing its 'Properties'. Using the ID avoids the USB key itself needing to be mounted to a (known) drive letter.
Last edit: Adrian Kentleton 2020-01-28
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I'm starting with VeraCrypt.
I would like to write a script allowing to mount an external USB key just executing a .bat module, after a prompt to get the volume password.
The samples I found are not efficient. Could someone help me ?
Thanks in advance.
Guy
How much help do you need? Are you used to creating batch files? Are you familiar with VC command line syntax?
At its simplest, something like this would do it:
Thank you Adrian for your answer.
I have worked in IT, and think I will not have much problem with batch language, but I don’t manage VeraCrypt options.
My need is : for people using an USB key encrypted with VeraCrypt, to mount it in a very simple mode, running a batch, and just giving the password, and may be drive letter where the key is plugged.
(I think they will have to give either the USB key drive letter , or the name of the encrypted container ?).
So what could be the VC options to use ?
Thanks in advance.
You should familiarise yourself with the Command Line documentation.
Something like this should work; test it on non-critical devices first!
a. The file tests that mounting is not being attempted to a drive letter already in use.
b. The USB key is identified via its ID, which you can find out by mounting it once manually, right-clicking on its entry in the GUI, and viewing its 'Properties'. Using the ID avoids the USB key itself needing to be mounted to a (known) drive letter.
Last edit: Adrian Kentleton 2020-01-28