How to lock Windows 11/10 using a USB drive

If you are tired of people who use your computer, here is a small trick that will not allow your computer to boot without a USB Drive. It will act as a key to boot your PC. There are two ways of doing this. First is instead a crude method only for those who can modify system files on the computer. Second, is a list of free applications that can do the same for you. Let’s figure out how to lock Windows 11/10 using a USB drive.

How to lock Windows 11/10 using a USB drive

Locking the Boot Process: Understanding what you are going to do

  • When Windows boots, it checks for the primary boot device in bios, which is, by default, your hard drive.
  • Then it looks for a system file called Boot.ini, which tells Windows from where to start the boot. Without this file, windows will throw you an error ” Invalid Boot.ini ” or “Windows could not start “

So what this trick does? It will make the windows look for BOOT.INI in the USB drive. The Boot.ini files contain the path to the partition where Windows is installed. Since it cannot find the file in the system partition of the hard disk, it will simply halt without the USB key.

1] Make Hidden Files visible

Boot.ini is a hidden file by default. Open C drive and go to Tools > Options > View. Look for Hide Protected system files. Uncheck it. Now you should be able to see the BOOT.INI file.

2] Copy System Files

Copy BOOT.INI, NTDETECT, and NTLDR to your USB stick from your System Drive. ( Usually C Drive)

How to lock Windows 10 using a USB drive

3] Setting up BIOS

  • Restart your computer and keep the [F8] key pressed as soon as the computer starts.
  • After you get into the BIOS, Look for the menu item where you can change your Boot Device.
  • After you find it, set the USB device as the first boot device and the Hard disk as the secondary.

Next time you restart the computer, it will look for a USB stick to boot. It will look for your hard drive when it does not find it. Restart your system now.

4] Renaming the Boot file

Now the main trick starts. Rename your boot.ini file as book.ini.bak. This way, you have created a backup file that can be used in case you want to revert.

5] Checking the setup

Restart your system. Don’t insert your USB stick now. If you do everything okay, you will get a boot error. If not, your BOOT.INI file is not renamed correctly.

6] Using a USB stick as a key

Now insert your UB stick and reboot. You should be able to see Windows loading correctly. That’s all. Now, whenever you need to load Windows, you must use your USB drive.

What if I lose my USB drive or it fails to work?

You can make a Windows Recovery Disk or Follow the steps here to revert back. It creates the boot.ini file again, and your computer boots normally. If this feels geeky, Below is the list of applications you can use to lock your computer.

Instantly Lock Computers using USB as a key with these apps

USB Raptor

USB Raptor Lock Computer

  • Automated USB lock and unlock function
  • Lock file contents are encrypted
  • The password to override the lock (can be enabled by the user)
  • Network command to override lock (can be activated by the user)
  • USB drive serial number check (can be enabled by the user)
  • Unique key for each system (can be activated by the user)
  • Status report function

Download from here


Keylock USB Lock

It offers passwordless access to Windows 10 PC. It will automatically lock your computer when the USB is taken out. You can also disable it temporarily by turning off the protection state. Download from here

USB System Lock 

This application works on similar lines as the above application. It auto-detects your USB drive and then creates a key disk. This key disk has a unique value, checked every few seconds. The computer gets locked once the USB is unplugged, and there is no way to unlock it without it. Download it from here.


  1. EY man 😀 Nicely done, I will buy a Seperate USB for this ^^ One who will match my Laptop, But is it possible to lock youre Window Account and unlock it again with a USB? That would be handy 😀 so you can Lock every account with a Own USB Stick for on school.

  2. hi,

    you can use the USB Drive Monitor to lock your PC using your USB as an access key, you can also record logs of files contained on unauthorized USB Drives inserted to your pc up to 3 folder levels deep…….and much more

    try it its free, type “USB Drive Monitor Download” in google.

  3. I know a program that can not only lock and unlock your PC but also helps you automatically log in/out. You will need a USB stick for it and it will act as a car key to your machine. Come-> plug it in -> start work. No need to type in your password. Rohos Logon Key is not just a primitive desktop locker but two-factor authentication solution. You may read more on it.

  4. Nice thinking, that’s a pretty smart way to do it without relying on potentially failing software 🙂
    Just one thing: is there an equivalent for WIndows 7? :/

    Oh, and that Olga character with her Rohos stuff is a spammer, i’ve seen her on dozens of sites already with that same stupid ad, which leads to a non-free program… Care to block her, please?


Please enter your comment!
Please enter your name here