Locking your PC with a USB drive
PC security is always a pain when you get people using your computer without your permission then changes things around and messing up your settings, or worse even infecting it with a virus one way or another.
Setting up a password will block random users from using Windows but then again typing up your secret word everytime your pc boots up is not for everone, even me so here’s the alternative. Lock your PC from booting with a USB stick.
USB Key?
Windows, like all operationg systems, follows a set of steps to wake up your computer. All that you’ll be doing is separating some part of the process so that your PC doesnt load without it. Here’s what you need to know about it:
The moment windows boots, it checks what your primary boot device in bios which is by default is your hard drive. Once found, it looks for a system file called as Boot.ini which tells windows where to start booting from. Without this file windows will give you an error message ” Invalid Boot.ini ” or “Windows could not start “
The trick mainly involves directing your PC to use the USB as your primary boot device and using your USB drive to hold the necessary files to boot your PC. Sounds complicated? Not as much as you think.
Here’s what you do:
Make Hidden Files visible:
- On any Windows/File Explorer Window, go to Tools > Options > View
- Uncheck Hide Protected system files and close the dialog boxes
- Go to your default drive (usually Drive C:\)
- Copy (Not CUT! Just Copy) BOOT.INI, NTDETECT, NTLDR to your USB stick
- Rename your boot.ini file as boot.ini.bak or boot-bak.ini or whichever naming convention you are familiar with so that you can recall which file it is in case you want to revert back.
- Restart your and enter the BIOS (usually the DEL key but this entirely depends on the manufacturer of your motherboard)
- On the boot menu, look for the option to change your USB drive as the Primary Boot Device and your Hard Drive as the Secondary Boot Device
And you’re done.
To check if what you’ve done is working restart your system but don’t insert your USB stick just yet. If you have done everything right, you will be getting boot error I mentioned earlier. If not your BOOT.INI file is still intact.
Now insert your USB stick and reboot. Windows should load properly and that’s it. Your USB Drive is now the key to opening your PC.
If you’re prone to loosing your USB or breaking it just make a Windows Recovery Disk or revert back to let Windows re-create the boot.ini file by itself and your computer will boot normally again.
If you're new to Pinoy Tech Guy, you may want to subscribe to the site RSS feed for your RSS reader or for regular updates straight to your inbox, you can subscribe via email.



3 Responses to “Locking your PC with a USB drive”
By Mikko on Apr 12, 2008 | Reply
Nice guide.
I want to try it on our PC; but I’m afraid that I’d loose the key; again!
Mikko’s last blog post: Things I’ve Learned In Freelancing
By jhay on Apr 17, 2008 | Reply
Neat trick. But you could just put a password into the Windows Admin account so that no one else can use your PC without your permission.
It’s great risk having a USB drive as your “key” to your PC. What it you loose your usb drive? It gets corrupted or infected with a malware? It’s scary.
jhay’s last blog post: Naruto Chapter 397: Itachi really wanted to protect Sasuke
By sylv3rblade on Apr 17, 2008 | Reply
That’s the easiest trick I know but doing this makes it sort of umm.. daring to use your PC ^_^
On a side note I have a USB that has Write protection so it’s safe from those pesky malware from PC shops and the office.