Menu

Unable to mount device by volume ID using command line [Win10x64]

Delebre
2015-09-10
2018-06-09
  • Delebre

    Delebre - 2015-09-10

    Windows 10 x64 [Updated]
    VeraCrypt 1.13

    I want to create an script which can run a command to mount my veracrypt USB device.

    My script looks like this:
    VeraCrypt.exe /volume \Device\Harddisk2\Partition0 /letter g /explore /wipecache /password "password" /q background

    This works fine! However.. The \Device\Harddisk2\ part changes based on the system. Sometimes it's \Device\Harddisk3\ or \Device\Harddisk4\

    As I cannot force this. I thought I would try the /volume option with a volume ID. I use mountvol.exe to find the proper (example): /v \?\Volume{5cceb196-48bf-46ab-ad00-70965512253a}\ Although, when running this.. it DOES show my device volume ID, but underneath it, it says: "The system cannot find the file specified." Which is weird.. as it clearly finds it and displays it.

    So I plugin the volume ID anyway after running this command:
    VeraCrypt.exe /volume \?\Volume{5cceb196-48bf-46ab-ad00-70965512253a}\ /letter g /explore /wipecache /password "password" /q background

    What comes up is a dialog box stating:
    VeraCrypt
    The system cannot find the file specified.
    Source: MountVolume:6785

     
  • Enigma2Illusion

    Enigma2Illusion - 2015-09-10

    Is your USB device a thumbdrive or HDD?

    Did you mount the volume before running the mountvol.exe command?

    On Windows 7 Pro 64-bit OS, I get the same error when I unmount the volume and run the mountvol.exe command. However, when the volume is mounted, I do not get the error:
    "The system cannot find the file specified."

    Your volume ID is missing an extra backslash at the beginning of the volume ID which may have been interpreted by the forum software when you posted.

    Should be:
    \\?\Volume{5cceb196-48bf-46ab-ad00-70965512253a}\

     

    Last edit: Enigma2Illusion 2015-09-10
  • Mounir IDRASSI

    Mounir IDRASSI - 2015-09-10

    Hi,

    There is no bug in VeraCrypt with regards to /volume switch and it works as expected.

    The Volume ID you specied simply doesn't belong to a connected device and the proof is that mountvol.exe itself says that the system can not find it.

    One thing you have to know is that the list of volume names displayed by mountvol may contain values that don't belong to currently connected devices but to devices previously connected and not purged by the system.

    Another fact is that the volume name displayed by mountvol is a logical name that can change. A simple test that you can do to check this is to connect your USB drive to another machine and you'll see that Windows will give it a different volume name.

    I advice you to search for the real volume name of your device using mountvol.exe. If there is no letter assigned to your USB drive, temporarely assign it a letter so that it will be easy for your to find its new volume name.

    Anyway, because the volume name reported by mountvol.exe is not fixed and it can changed, it is planned to implemented a new feature that will enable to uniquely identify driver throug a value derived from their VeraCrypt header so that it can be passed as a argument to the mount command: https://veracrypt.codeplex.com/workitem/112

     
  • DP

    DP - 2018-06-09

    Did anything ever come of work item #112? I am facing this situation also

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.