TrueCrypt automatically dismounts its volumes when Windows is shutting down.
(i.e. the user is "logged off" and there is a setting for auto-dismount when this happens.)
If you hibernate your PC and want the volume to dismount you can also set this in the options.
![enter image description here](../../I/static/images/749f747e644f2a6d895a7179da635088d4063fd4930aa9429504f3274513fdb6.png)
Edit:
Please note that when mounting a volume via a script you need to make sure TrueCrypt.exe is also loaded. This is the "TrueCrypt Background Task" and is responsible for the Auto-dismount and more.
TrueCrypt Background Task:
When the main TrueCrypt window is closed, the TrueCrypt Background Task takes care of the following tasks/functions:
- Hot keys
- Auto-dismount (e.g., upon logoff, inadvertent host device removal, time-out, etc.)
- Auto-mount of favorite volumes
- Notifications (e.g., when damage to hidden volume is prevented)
- Tray icon
See also http://andryou.com/truecrypt/docs/background-task.php
You can run truecrypt /q background
to start it directly in the background.
You should dismount the drive before you restart. – Ramhound – 2015-03-18T10:41:32.800