Hi, I've used TrueCrypt for automating my backup procedures on Windows for many years, and it seemed like VeraCrypt's command line switches were near-identical but I'm having trouble. When I run this command:
I get a VeraCrypt dial-up box which I have to click OK for it (nothing else) to mount the partition. Is there something I'm missing in the command in order to get VeraCrypt to just mount the encrypted partition without any further interaction?
I've played with /q and or /s as well, /q seemingly does nothing to change the above outcome and /q and /s results in literally nothing at all happening (VeraCrypt doesn't even start, or it starts and closes so quickly that I didn't even see it in Task Manager).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
'dial-up box' - lol, just realised I typed that instead of 'dialog box' :D And yes it's harddisk3 now not 4, and I updated my command accordingly before running it.
Last edit: Michael Moratz-Coppins 2021-10-24
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
a. Your screenshots are showing up in the email I get, but not on the forum thread. Did you use the 'Add attachments' dialog? (I've screenshot yours as they appear in my email.)
b. What happens if you simply use /v \Device\Harddisk3?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Here's your screenshots, as they appear in the email notification I get, tho' they don't appear to me in the forum thread. Did you use the 'Add attachments' dialog?
What happens if you just specify /v \Device\Harddisk3?
Have you tried mounting it via its ID? Mount it, select it in the GUI, find its ID via 'Properties', and copy and paste that into /v ID:alongstringofhexadecimalnumbers!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
FYI: Windows can change the order of discovering your devices during boot/reboot. Especially if you add/remove devices.
You are using auto-mount /a in your command. Auto-mount is "Mount all device-hosted VeraCrypt volumes" which attempts to mount all discovered disk partitions attached to your PC.
FYI: By not creating a Windows partition of the entire HDD (partition1) since it appears you want to use the entire drive, Windows will be prompting you to format Harddisk3 once it is encrypted since it appears unavailable for use.
Too many users have lost their encrypted data or made recovery difficult because they accidently clicked on Format button instead of the Cancel button.
To avoid this problem, use Windows Create and Format Disk to create one partition for the entire size of the HDD since it appears you want to use the entire hard drive space.
Always have frequent backups of your data due to hardware failure, software issues or user error which can cause loss of access to both encrypted volumes and unencrypted drives.
Last edit: Enigma2Illusion 2021-10-25
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Get me to the 'enter password' dialog box (with the keyfile option already ticked and ready to go) that when I click OK, it successfully mounts the partition. What I'm trying to do is automate the mounting of the partition so I don't have to click on OK.
Btw, I've never been presented with the "do you want to format this volume" prompt, because as far as Windows is concerned, the disk hasn't even been initialised yet (Windows Disk Management asks me if I want to use GPT/MBR for that disk).
Last edit: Michael Moratz-Coppins 2021-10-25
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Btw, I've never been presented with the "do you want to format this volume" prompt, because as far as Windows is concerned, the disk hasn't even been initialised yet (Windows Disk Management asks me if I want to use GPT/MBR for that disk).
Another scenario that VeraCrypt users have encountered is when performing OS major upgrades, sometimes Windows tries to be helpful by initializing disks that appear uninitialized to make them ready for use in Windows.
An example of a major upgrade would be Windows 10 21H1 to 21H2.
👍
1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I've used TrueCrypt for automating my backup procedures on Windows for many years, and it seemed like VeraCrypt's command line switches were near-identical but I'm having trouble. When I run this command:
"C:\Program Files\VeraCrypt\VeraCrypt.exe" /v \Device\Harddisk4\Partition0 /a /k C:\users\mike\desktop\keyfile /mountoption rm
I get a VeraCrypt dial-up box which I have to click OK for it (nothing else) to mount the partition. Is there something I'm missing in the command in order to get VeraCrypt to just mount the encrypted partition without any further interaction?
I've played with /q and or /s as well, /q seemingly does nothing to change the above outcome and /q and /s results in literally nothing at all happening (VeraCrypt doesn't even start, or it starts and closes so quickly that I didn't even see it in Task Manager).
Do you really have a 'Partition0' on your PC; there are none on mine!
If you specify /q, /a is implicit, so redundant. If you specify /s, you will not see any Veracrypt generated error messages.
Last edit: Adrian Kentleton 2021-10-24
If you take a clean drive and set up a Veracrypt volume on it, it's partition 0. When it's not mounted, it looks like an unused disk to the OS.
Couid you post a screenshot of that, please. And of the Veracrypt 'dial-up box', whatever that is, when it appears?
I've no idea how to post a screenshot here, here's an attempt!
'dial-up box' - lol, just realised I typed that instead of 'dialog box' :D And yes it's harddisk3 now not 4, and I updated my command accordingly before running it.
Last edit: Michael Moratz-Coppins 2021-10-24
a. Your screenshots are showing up in the email I get, but not on the forum thread. Did you use the 'Add attachments' dialog? (I've screenshot yours as they appear in my email.)
b. What happens if you simply use /v \Device\Harddisk3?
the 'enter password' dialog box
the 'select partition' box
Here's your screenshots, as they appear in the email notification I get, tho' they don't appear to me in the forum thread. Did you use the 'Add attachments' dialog?
What happens if you just specify /v \Device\Harddisk3?
'\Device\Harddisk3': I get 'the handle is invalid'.
I used the image button on the forum toolbar the first time around, then did forum attachments after you asked.
Last edit: Michael Moratz-Coppins 2021-10-24
And if you use /v \Device\Harddisk3\Partition1?
'cannot find the file specified'
Have you tried mounting it via its ID? Mount it, select it in the GUI, find its ID via 'Properties', and copy and paste that into /v ID:alongstringofhexadecimalnumbers!
same problem as with ...\Partition0.
I think the two problems are:
Try:
FYI: By not creating a Windows partition of the entire HDD (partition1) since it appears you want to use the entire drive, Windows will be prompting you to format Harddisk3 once it is encrypted since it appears unavailable for use.
Too many users have lost their encrypted data or made recovery difficult because they accidently clicked on Format button instead of the Cancel button.
To avoid this problem, use Windows Create and Format Disk to create one partition for the entire size of the HDD since it appears you want to use the entire hard drive space.
Always have frequent backups of your data due to hardware failure, software issues or user error which can cause loss of access to both encrypted volumes and unencrypted drives.
Last edit: Enigma2Illusion 2021-10-25
I tried:
and
And I just get presented with the main VeraCrypt window as if I had just started VeraCrypt myself from the application shortcut.
Either of these commands:
Get me to the 'enter password' dialog box (with the keyfile option already ticked and ready to go) that when I click OK, it successfully mounts the partition. What I'm trying to do is automate the mounting of the partition so I don't have to click on OK.
Btw, I've never been presented with the "do you want to format this volume" prompt, because as far as Windows is concerned, the disk hasn't even been initialised yet (Windows Disk Management asks me if I want to use GPT/MBR for that disk).
Last edit: Michael Moratz-Coppins 2021-10-25
Are you using a password for the volume?
If yes, you are going to get prompted with the password dialog box because you did not hardcode the password switch /p option in your command.
If no password, then you need the /tryemptypass switch.
https://www.veracrypt.fr/en/Command%20Line%20Usage.html
Another scenario that VeraCrypt users have encountered is when performing OS major upgrades, sometimes Windows tries to be helpful by initializing disks that appear uninitialized to make them ready for use in Windows.
An example of a major upgrade would be Windows 10 21H1 to 21H2.
/tryemptypass did the trick, thank you!