Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Bitlocker - Lock an Unlocked Drive



Bitlocker - Lock an Unlocked Drive

How to Lock an Unlocked BitLocker Drive
Published by tw33k
11 Jun 2010
Default 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   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.









Published by
09 Dec 2010   #1
hackerboyessar

windows 7 ultimate x32
 
 
unable to copy lock.bat into c:\windows

As per your suggestion, I tried to copy the notepad named lock.bat into c:\windows folder but the permission is denied even after logging in as admin.help me..,,


My System SpecsSystem Spec
09 Dec 2010   #2
Brink
Microsoft MVP

64-bit Windows 8.1 Enterprise
 
 

Hello Hackerboyessar, and welcome to Seven Forums.

Tutorial updated.

Save the file as lock.bat to your desktop, then move it into your C:\Windows folder.

Hope this helps,
Shawn
My System SpecsSystem Spec
12 Dec 2010   #3
hackerboyessar

windows 7 ultimate x32
 
 

sir.,
Thanks for the concern.But even after doing all these things "correctly" as per the given order, I am getting a msg '"Filename,directory name or volume label syntax is incorrect"....what to do?
My System SpecsSystem Spec
.


12 Dec 2010   #4
Brink
Microsoft MVP

64-bit Windows 8.1 Enterprise
 
 

Set known file extensions to be displayed, then double check to make sure that the lock.bat file name is name correctly and not something like lock.bat.txt instead.

Also make sure that the drive letter used in the command is correct for the drive.
My System SpecsSystem Spec
03 Mar 2011   #5
boogieboy

Windows 7 Ultimate x64 SP1
 
 

I'm following the same exact steps and i get the same error when i try to lock the drive "Filename,directory name or volume label syntax is incorrect"... i triend on my both PC's...
My System SpecsSystem Spec
04 Aug 2011   #6
ItachiSharingan

Windows 7 Ultimate 32bit
 
 

hello

I know I'm new but I need quick help. does this work also on unlocking eksternal drive that has been locked with BitLocker?

I'm trying to unlock it with recovery key but I get error message every time. can somebody help or redirect me to topic that could help? thx
My System SpecsSystem Spec
04 Aug 2011   #7
Brink
Microsoft MVP

64-bit Windows 8.1 Enterprise
 
 

Hello Itachi, and welcome to Seven Forums.

What is the error message that you are getting?

Did you click on the I forgot my password link to be able type in the Bitlocker recovery key as shown in it's .txt file?

Name:  image1.png
Views: 4051
Size:  67.1 KBName:  image2.png
Views: 4055
Size:  24.0 KB




My System SpecsSystem Spec
04 Aug 2011   #8
ItachiSharingan

Windows 7 Ultimate 32bit
 
 

ok so this is the message I get ..

"Error recovering disk H: The recovery key you tipped is not correct.Type it again."

note that I already removed my password, started decrypting my external hard drive (took about 24 hours) and then at the end of unlocking, I guess because I wasn't there, I got message there is an error on drive please run disk check and there was some command but I clicked to close and did not wrote it down..

forgot to upload one more pic.. I am typing that number.. still got the same result

It put's dashes automatically..even if I try to put them nothing happens..

sry about that.. yeah I notice that also but he corrected me and send that one part was wrong.. the part where I put 9 instead of 0

I have a question.. this option that tw33k put here is for locking. so if I follow tutorial in my locked drive I should have option Unlock?


Attached Images
     
My System SpecsSystem Spec
04 Aug 2011   #9
Brink
Microsoft MVP

64-bit Windows 8.1 Enterprise
 
 

Be sure that you are typing in the real long number at the very bottom of that .txt file, and not the ID numbers above it. I can't remember if the dashes have to be included or not, so try both ways.

653939-.............

EDIT for your addition:
You have a typo in that last number you typed.
My System SpecsSystem Spec
Comment

 Bitlocker - Lock an Unlocked Drive




Tutorial Tools



Similar help and support threads for2: Bitlocker - Lock an Unlocked Drive
Windows 7 Tutorial Category
BitLocker Drive Encryption - Unlock a Locked Data or Removable Drive Tutorials
BitLocker Drive Encryption - BitLocker To Go - Turn On or Off Tutorials
Solved How to add to lock the bitlocker drive context menu? General Discussion
Bitlocker: Lock an Unlocked Drive System Security
I tried to lock my D drive with bitlocker General Discussion
Lock Drive with Bitlocker? System Security
Cannot lock drive with bitlocker. System Security

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 11:16 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33