VeraCrypt Command line volume switch (/v) error (Solved, see update at end)

35 Views Asked by At

Many visits but this is my first posting to Stack overflow - any help would be much appreciated!

I am writing a batch file to mount a VeraCrypt volume & cannot get the volume to mount.

Installed VeraCrypt vers 1.26.7 64 bit release date 10/1/23 on:

OS Name Microsoft Windows 11 Pro    Version 10.0.22631 Build 22631

Created a 15GB volume (regular, not hidden) at "G:\Doug\Data\Data15n". Mounted. Copied data to the volume. Closed. Can open and close easily with the VC GUI.

BAT program: blah, blah, blah all good, then:

    start "C:\Program Files\VeraCrypt\VeraCrypt.exe" /v G:\Doug\Data\Data15n /lz /p mypassword /q
    echo.
    echo Z Drive mounted, waiting 5 seconds...

Doesn't work. 


Opened cmd & tried:
    start "C:\Program Files\VeraCrypt\VeraCrypt.exe" /v G:\Doug\Data\Data15n /lz /p mypassword /q
response: Invalid switch - "/v". Next, eliminate the /q switch:
    start "C:\Program Files\VeraCrypt\VeraCrypt.exe" /v G:\Doug\Data\Data15n /lz /p mypassword 
response: Invalid switch - "/v". Next, eliminate the /p and /q switches:
    start "C:\Program Files\VeraCrypt\VeraCrypt.exe" /v G:\Doug\Data\Data15n /lz 
response: Invalid switch - "/v".
Then (still in DOS shell):
    cd "C:\Program Files\VeraCrypt\"
    VeraCrypt.exe /v G:\Doug\Data\Data15n /lz /p mypassword /q
response - pop-up window from VeraCrypt "Error while parsing command line"
    VeraCrypt.exe /v "G:\Doug\Data\Data15n" /lz /p mypassword /q
response - pop-up window from VeraCrypt "Error while parsing command line"
    start VeraCrypt.exe /v G:\Doug\Data\Data15n /lz /p mypassword /q
response - pop-up window from VeraCrypt "Error while parsing command line"

All the above running as admin but cmd shell NOT elevated. Tried running the cmd shell as admin (elevated), same responses.

What am I doing wrong? It seems that VC doesn't like my /v switch (and I did try /volume too) but I can't figure out why. I have used a very similar batch file on W8.1 with no problems. veracrypt /? still says the /v switch is available. I'm stumped!

3 Screenshots - https://drive.google.com/drive/folders/1EXTw5MvcURHdbOEzhCaEcmRB4YoxipDf?usp=sharing

Update - Adrian Kentleton solved my problem in the VeraCrypt forums. (here https://sourceforge.net/p/veracrypt/discussion/general/thread/6086453f57/ ) The solution was to change the drive letter switch from

/lz to 
/l z adding a space.
0

There are 0 best solutions below