This project has moved and is read-only. For the latest updates, please go here.

Portable version auto dismount on Windows Explorer closing

Topics: Users Discussion
Apr 26, 2016 at 9:31 PM
Edited Apr 26, 2016 at 9:36 PM
I had been using TrueCrypt portable on a USB flash drive and had 2 batch files to mount and dismount volumes. The volumes would show up as normal drive letters in Windows Explorer. If I closed all Windows Explorer windows the drives would remain mounted. They would only be dismounted if I ran the dismount batch file.

In Veracrypt 1.17 the Mount batch file has the following command:

VeraCrypt\VeraCrypt.exe /q background /tc /e /m rm /v "EncryptedViolumeFileName"

When I close all the Windows Explorer windows the drive automatically dismounts. As well instead of the volume showing up as a normal hard drive letter its showing up a B: floppy drive letter.

Why is Veracrypt dismounting the volume automatically and why is it mounting it as a Floppy Drive letter?

These are the settings in Veracrypt:

Apr 28, 2016 at 11:36 PM

First of all, A: or B: are not dismounted when you close all Explorer instances, they become just invisible. You can still access them by typing A:\ or B:\ in Explorer address bar or by right clicking on VeraCrypt icon on the system tray to display its menu and then select "Open A:" or "Open B:".

What you seeing here is an issue in Windows Explorer that doesn't handle correctly volumes mounted as removable media in A: or B:. In this case, Explorer doesn't refresh correctly the drives list to include A: or B:.

Easiest way to solve the issue is to avoid mounting as removable media: this way, A: and B: will behave as normal disks.

Also, you can choose the drive letter explicitly to avoid using A: or B:.

In your command line, you are not specifying a drive letter and that's why VeraCrypt chooses A: since it is the first available drive letter. In order to avoid cases like yours, I have made a change in the drive letters selection algorithm in order to make VeraCrypt choose A: or B: only when there are no other free drive letters:

I have uploaded a new build of version 1.18-BETA that includes this modification. You can get it here:

You can use it if you don't want to change your command line but beware that the issue will appear again if the only free drive letter is A: or B: since the roor cause of this is Windows Explorer refresh issue for removable media mounted in A: or B:.

Thank you for sharing this issue.