Privacy and Security Add Lock Drive with BitLocker Context Menu in Windows 11


  • Staff
BitLocker_drive_banner.png

This tutorial will show you how to add Lock Drive to the context menu of all unlocked fixed and removable drives encrypted by BitLocker to lock the drive on demand in Windows 10 and Windows 11.

BitLocker Drive Encryption is a data protection feature that integrates with the operating system and addresses the threats of data theft or exposure from lost, stolen, or inappropriately decommissioned drives and computers.

You can turn on BitLocker to encrypt the operating system drive (Windows drive), fixed data drives (internal hard drives), and removable data drives (external hard drive or USB flash drive).

You can choose how you want to unlock an encrypted data drive: with a password or a smart card. For removable data drives encrypted with BitLocker To Go, you can set the drive to automatically unlock when you sign in to the PC. For fixed data drives, you can also set the drive to automatically unlock when you unlock the PC, if you prefer, as long as the operating system drive is BitLocker-protected.

To lock a fixed data drive encrypted by BitLocker, you could restart the computer unless you set the drive to automatically unlock when you sign in next.

To lock a removable data drive encrypted by BitLocker To Go, you could disconnect the drive or restart the computer unless you set the drive to automatically unlock when you connect the drive or sign in next.

You must be signed in as an administrator to add, use, or remove the "Lock Drive" context menu.

The Lock Drive context menu can be handy since it allows you to lock the drive without having to disconnect it or restart the computer. The drive will remain locked until you manually unlock it.

If you turn on auto-unlock for a fixed data drive or removable data drive encrypted by BitLocker, then the drive cannot be locked until you turn off auto-unlock for the drive.

BitLocker Drive Encryption is only available in the Windows 11 Pro, Enterprise, and Education editions.



Contents

  • Option One: Add Lock Drive Context Menu to BitLocker Fixed and Removable Data Drives
  • Option Two: Remove Lock Drive Context Menu from BitLocker Fixed and Removable Data Drives


EXAMPLE: "Lock Drive" context menu

When you right click on an unlocked BitLocker fixed or removable drive, you will need to click/tap on Show more options first, then click/tap on Lock Drive.


Lock_drive_context_menu.png






OPTION ONE

Add Lock Drive Context Menu to BitLocker Fixed and Removable Data Drives


1 Click/tap on the Download button below to download the ZIP file below.

Add_Lock_Drive_to_context_menu.zip


2 Save the .zip file to your desktop.

3 Unblock the .zip file.

4 Open the .zip file, and extract (drag and drop) the Add_Lock_Drive_to_context_menu.reg and lock-bde.bat files to your desktop.

(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Drive\shell\lock-bde]
"AppliesTo"="System.Volume.BitLockerProtection:=1 OR System.Volume.BitLockerProtection:=3 OR System.Volume.BitLockerProtection:=5 NOT C:"
@="Lock Drive"
"HasLUAShield"=""
"MultiSelectModel"="Single"

[HKEY_CLASSES_ROOT\Drive\shell\lock-bde\command]
@="PowerShell -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/s,/c, lock-bde.bat %1' -Verb runAs\""

(Contents of BAT file for reference)
Code:
@echo off
manage-bde -lock %~d1 -ForceDismount

5 Copy/Move the lock-bde.bat file into the C:\Windows folder, and click/tap on Continue when prompted to approve. (see screenshot below)

add_lock_drive.png

6 Double click/tap on the Add_Lock_Drive_to_context_menu.reg file to merge it.

7 When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.

8 You can now delete any remaining files on your desktop if you like.





OPTION TWO

Remove Lock Drive Context Menu from BitLocker Fixed and Removable Data Drives


This is the default setting.


1 Click/tap on the Download button below to download the REG file below.

Remove_Lock_Drive_from_context_menu.reg


(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\Drive\shell\lock-bde]

2 Save the .reg file to your desktop.

3 Double click/tap on the downloaded .reg file to merge it.

4 When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.

5 You can now delete the downloaded .reg file if you like.

6 Open the C:\Windows folder, delete the lock-bde.bat file, and click/tap on Continue when prompted to approve. (see screenshot below)

remove_lock_drive.png


That's it,
Shawn Brink


 

Attachments

  • Add_Lock_Drive_to_context_menu.zip
    956 bytes · Views: 564
  • Remove_Lock_Drive_from_context_menu.reg
    516 bytes · Views: 331
Last edited:
Thanks Brink.

The option was added to the right click menu. When I clicked it, I assume the drive closed as it just disappeared from Explorer. Where did it go?

Tom R.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro. Version 23H2, Build 10.0.22631
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Built
    CPU
    Intel i7-13700K
    Motherboard
    Gigabyte Z790 Aorus Elite AX
    Memory
    Corsair Vengeance 64 Gb
    Graphics Card(s)
    Nvidia GeForce GTX 1660 TI
    Sound Card
    Integrated
    Monitor(s) Displays
    43" Samsung. UN43AU8000FF
    Screen Resolution
    4096 X 2160
    Hard Drives
    C: Samsung 980 Pro M.2 Gen 4 2 Tb
    D: Fantom VM8X20 M.2 Gen 4 $ Tb
    Z: Seagate 8 Tb HDD
    E, F, G, H: WD 14 Tb HDD
    PSU
    Corsair SF-1000L
    Case
    Cooler Master N400 ATX
    Cooling
    Noctua NH-D9L Push/Pull
    Keyboard
    Logitech MX Keys
    Mouse
    Logitech MX Master 3S
    Internet Speed
    >400 Mbps Down, >40 Mbps Up.
    Browser
    Google Chrome
    Antivirus
    McAfee
    Other Info
    Not a gamer. Just like tinkering. That has been the reason for many hours of searching for solutions!
  • Operating System
    Windows 11 Pro. Version 22H2, Build 22621
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Built
    CPU
    Intel i7-11700K
    Motherboard
    Gigabyte B560M Aorus Pro mATX
    Memory
    Kingston Fury Beast DDR4 3600 CL18 64 Gb(2-32 Sticks)
    Graphics card(s)
    Vision Tek Radeon 7750SFF
    Sound Card
    Integrated
    Monitor(s) Displays
    43" Samsung. UN43AU8000FF
    Screen Resolution
    4096 X 2160
    Hard Drives
    C: Sabrent Rocket M.2 Gen 4 2 Gb
    D: Samsung 870 QVO 8 Tb SSD
    E: HGST Ultrastar HDD 8 Tb
    PSU
    Rosewill PMG 550
    Case
    Cooler Master N-200 Micro ATX
    Cooling
    Noctura NH-D9L Push-Pull
    Mouse
    Logitech MX Master 3S
    Keyboard
    Logitech MX Keys
    Internet Speed
    > 175 Mbps Down, >40 Mbps Up
    Browser
    Google Chrome
    Antivirus
    McAfee
    Other Info
    Just built it for something to do. Used mostly for backup for important stuff.
Disregard last stupid comment. Refreshed and it is where it should be.

Sorry, I guess I'm just too impatient!:(
 

My Computers

System One System Two

  • OS
    Windows 11 Pro. Version 23H2, Build 10.0.22631
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Built
    CPU
    Intel i7-13700K
    Motherboard
    Gigabyte Z790 Aorus Elite AX
    Memory
    Corsair Vengeance 64 Gb
    Graphics Card(s)
    Nvidia GeForce GTX 1660 TI
    Sound Card
    Integrated
    Monitor(s) Displays
    43" Samsung. UN43AU8000FF
    Screen Resolution
    4096 X 2160
    Hard Drives
    C: Samsung 980 Pro M.2 Gen 4 2 Tb
    D: Fantom VM8X20 M.2 Gen 4 $ Tb
    Z: Seagate 8 Tb HDD
    E, F, G, H: WD 14 Tb HDD
    PSU
    Corsair SF-1000L
    Case
    Cooler Master N400 ATX
    Cooling
    Noctua NH-D9L Push/Pull
    Keyboard
    Logitech MX Keys
    Mouse
    Logitech MX Master 3S
    Internet Speed
    >400 Mbps Down, >40 Mbps Up.
    Browser
    Google Chrome
    Antivirus
    McAfee
    Other Info
    Not a gamer. Just like tinkering. That has been the reason for many hours of searching for solutions!
  • Operating System
    Windows 11 Pro. Version 22H2, Build 22621
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Built
    CPU
    Intel i7-11700K
    Motherboard
    Gigabyte B560M Aorus Pro mATX
    Memory
    Kingston Fury Beast DDR4 3600 CL18 64 Gb(2-32 Sticks)
    Graphics card(s)
    Vision Tek Radeon 7750SFF
    Sound Card
    Integrated
    Monitor(s) Displays
    43" Samsung. UN43AU8000FF
    Screen Resolution
    4096 X 2160
    Hard Drives
    C: Sabrent Rocket M.2 Gen 4 2 Gb
    D: Samsung 870 QVO 8 Tb SSD
    E: HGST Ultrastar HDD 8 Tb
    PSU
    Rosewill PMG 550
    Case
    Cooler Master N-200 Micro ATX
    Cooling
    Noctura NH-D9L Push-Pull
    Mouse
    Logitech MX Master 3S
    Keyboard
    Logitech MX Keys
    Internet Speed
    > 175 Mbps Down, >40 Mbps Up
    Browser
    Google Chrome
    Antivirus
    McAfee
    Other Info
    Just built it for something to do. Used mostly for backup for important stuff.
Disregard last stupid comment. Refreshed and it is where it should be.

Sorry, I guess I'm just too impatient!:(
No worries Tom. I'm glad it could help. :-)
 

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gbps Download and 35 Mbps Upload
    Browser
    Google Chrome
    Antivirus
    Microsoft Defender and Malwarebytes Premium
    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
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Surface Laptop Copilot+ PC
    CPU
    Snapdragon X Elite (12 core) 3.42 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Monitor(s) Displays
    15" HDR
    Screen Resolution
    2496 x 1664
    Hard Drives
    1 TB SSD
    Internet Speed
    Wi-Fi 7 and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Windows Defender
I sent you a message about this, but I followed option 1 and it worked up until I would try to lock that drive. I would get a message from the user control asking if I was okay for this app to make changes to the computer, I would click yes but the drive would still be unlocked. I do not know what I did wrong so i removed it.
 

My Computer

System One

  • OS
    Windows 11Pro
    Computer type
    Laptop
    Manufacturer/Model
    HP Envy x360
I sent you a message about this, but I followed option 1 and it worked up until I would try to lock that drive. I would get a message from the user control asking if I was okay for this app to make changes to the computer, I would click yes but the drive would still be unlocked. I do not know what I did wrong so i removed it.
Hello, and welcome. :alien:

As a test, does it lock the drive if you manually lock it using option 2 or 3 below instead?

 

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gbps Download and 35 Mbps Upload
    Browser
    Google Chrome
    Antivirus
    Microsoft Defender and Malwarebytes Premium
    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
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Surface Laptop Copilot+ PC
    CPU
    Snapdragon X Elite (12 core) 3.42 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Monitor(s) Displays
    15" HDR
    Screen Resolution
    2496 x 1664
    Hard Drives
    1 TB SSD
    Internet Speed
    Wi-Fi 7 and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Windows Defender
yes it locks with option 2, but this is a very long way to lock the drive.
 

My Computer

System One

  • OS
    Windows 11Pro
    Computer type
    Laptop
    Manufacturer/Model
    HP Envy x360
yes it locks with option 2, but this is a very long way to lock the drive.

Good. That's the same command the BAT file uses when ran by the context menu.

As a test, remove the context menu and start completely over being sure to unblock the BAT file before moving it into the Windows folder to see if it may work this round.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gbps Download and 35 Mbps Upload
    Browser
    Google Chrome
    Antivirus
    Microsoft Defender and Malwarebytes Premium
    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
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Surface Laptop Copilot+ PC
    CPU
    Snapdragon X Elite (12 core) 3.42 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Monitor(s) Displays
    15" HDR
    Screen Resolution
    2496 x 1664
    Hard Drives
    1 TB SSD
    Internet Speed
    Wi-Fi 7 and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Windows Defender
Back
Top Bottom