Bitlocker - Lock an Unlocked Drive

How to Lock an Unlocked BitLocker Drive


Currently, if you unlock a drive that has been locked with Bitlocker, you will need to either restart explorer.exe or reboot your PC. Neither of these appeal to me so I found a way of adding "Lock" to the context menu menu which, when clicked, re-locks the drive.

   Warning
Involves editing the registry. Proceed with care if new to registry editing and back up your registry before hand




Here's How:
1. Open Notepad and paste this below in it.
NOTE: Replace x: with the drive letter you wish to apply it to.
manage-bde -lock x: -ForceDismount
2. Save the file as lock.bat to your desktop, then move it into your C:\Windows folder.

3. Open regedit and navigate to: HKEY_CLASSES_ROOT\Drive\shell

4. In the left pane of regedit, right click on shell, click on New and Key, type runas, and press enter.
NOTE: This key may already exist with the value of TakeOwnership. If it does, name the new key runas(2) instead.

5. In the right pane of runas or runas(2), double click on (default) to modify, type in Lock and click on OK.

6. In the left pane of regedit, right click on runas or runas(2), click on New and Key, type command and press enter.

7. In the right pane of command, double click on (default) to modify, type in C:\Windows\lock.bat and click on OK.

8. In the right pane of runas or runas(2), click on a empty space and click on New and String Value, type in AppliesTo and press enter.

9. Double click on AppliesTo to modify, type in X: and click on OK.
NOTE: Replace X: with the same drive location as you did in step 1.

10. Close regedit.
Now, when you right click the drive, you'll see "Lock". Clicking this will re-lock your drive.

Micrsoft needs to fix this IMO but this is an excellent work around. Props to "Jonathon" for coming up with the original method.









 
Last edited by a moderator:
Hello Amarnath, and welcome to Seven Forums.

Please post some screenshots showing this and what you are doing. This will better help us see what may be wrong. Be sure that you are using the correct drive letter in place of X in the commands for the BitLocker drive that you are wanting to lock. :)
 

My Computer My Computer

At a glance

64-bit Windows 11 Pro for WorkstationsIntel i7-8700K OC'd to 5 GHz64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600...ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
Some suggestions that may be useful:

Alt 1:
In Notepad
manage-bde x: -lock
replace x with the actual drive letter. Save as whatever.bat
Move the bat file to wherever you want to store it, then make a shortcut to it, placed wherever you want to run it from. Before 1st use: right-click shortcut > Properties > Advanced > Run as administrator > OK

Alt 2:
BitLocker Drives Unlocker [AddictiveTips Apps]
Does 'lock all' for those with several drives, and 'unlock all' if PW is the same. Somewhat sketchy program (cannot even be minimized), pinning it to taskbar helps. Has been working fine here.
 

My Computer My Computer

At a glance

W7, W8.1
Computer type
Laptop
Computer Manufacturer/Model Number
Dell \ Lenovo\ HP \ Toshiba
OS
W7, W8.1
Antivirus
MSE, Malwarebytes
Browser
FF
Back
Top