So you've turned on Bitlocker encryption for a drive. You've unlocked it and done your work, but how do you re-lock it? Here's how to add an entry to the right-click context menu to re-lock the drive.
1. Open up Notepad and type in the following, replacing 'E:' with the drive letter of your Bitlocker drive:
manage-bde -lock E: forcedismount
2. Save the file as lock.bat somewhere accessible, such as C:\Windows or C:\Program Files\
3. Open up Registry Editor. Navigate to the following Key:
HKEY_CLASSES_ROOT\Drive\shell
4. Create a new key named
runas with the default value set to
Lock.
5. Now right-click on
runas in the left window pane and create a new key called
command.
6. Set the value of the Default Entry to
c:\windows\lock.bat or whatever locaiton you chose at step 2.
7. Navigate back to the
runas key and create a new String Value called
AppliesTo. Set the value to
E: or whichever drive you have encrypted.
8. Goto Windows Explorer and test your new right-click context menu entry!