In the past, I used TrueCrypt for Virtual Disks to encrypt and store my work files. Now, with VHD and the built-in BitLocker of Win7, the system can implement this function, compared with TrueCrypt, it has more powerful functions. However, if you encounter a problem during use, the virtual disk will not be automatically mounted after each system restart. You need to re-mount the VHD with the system disk management tool, very troublesome. After studying it, I finally found the solution:
First, compile a diskpartinstance script file mount.txt, for example:
Select vdisk file = d: \ work. VHD
Attach vdisk
Exit
Then, create a new task scheduler in the computer management interface. The task content is diskpart/s c: \ mount.txt.
Next, set the properties of the task:
Trigger condition: User Logon
Check run with the highest permission
After restarting, you can see that the virtual disk is automatically mounted.
In addition, Microsoft's Virtual Disk VHD is really a good thing and can implement many advanced functions, such as starting a system in VHD and creating a system in differential mode. We will not discuss it here, if you are interested, You can google it on your own.