VeraCrypt Windows commandline - encrypt whole USB

2.9k Views Asked by At

I'm trying to format whole USB from windows commandline. In Linux it's quite easy - veracrypt --create diskPath

But when i'm trying to do that in windows it's impossible.

I'm trying to use this command

"VeraCrypt Format.exe" /create \\?\Volume{ad4200bf-2236-11e8-9b79-bcee7b594766}\ /password test /size 100M

Also this:

"VeraCrypt Format.exe" /create F: /password test /size 100M

Also - i want to encrypt whole partition, not only 100M, but i can't execute /craete without /size

1

There are 1 best solutions below

2
On

VeraCrypt format command goes like this:

"VeraCrypt Format.exe" [/n] [/create] [/size number[{K|M|G|T}]] [/p password] [/encryption {AES | Serpent | Twofish | AES(Twofish) | AES(Twofish(Serpent)) | Serpent(AES) | Serpent(Twofish(AES)) | Twofish(Serpent)}] [/hash {sha256|sha-256|sha512|sha-512|whirlpool|ripemd160|ripemd-160}] [/filesystem {None|FAT|NTFS}] [/dynamic] [/force] [/silent]

Now what you were trying should go like the below. You are missing the path or the subset of the parameters.

Create a 100 MB file container using the password test and formatted using FAT:

"C:\Program Files\VeraCrypt\VeraCrypt Format.exe" /create c:\pathofthevolume\testvolume.hc /password test /hash sha512 /encryption serpent /filesystem FAT /size 100M /force

And if you want to mount that automatically, then it should go like this: Mount a volume called testvolume.tc using the password test, as the drive letter X.

veracrypt /v testvolume.tc /l x /a /p test /e /b

Refer the source LINK for details.

Hope it helps.