Before I begin, I want to tell you that this method is by no way crack proof. It's easy to bypass the "lock", for those who know how to do it. But still it's an effective way to keep away your nosy friends.
Here is the process:
- For this method to work your motherboard's BIOS must support booting from a USB drive. If it does, then enter BIOS and set first boot device to USB drive. You might have to activate the "USB legacy support" and "USB 2 Controller" for this to work. Check your BIOS and motherboard's website for details if you have trouble booting from an USB drive.
- Format the USB pen drive. Anything with around 256MB capacity will do.
- Open Windows explorer and go to Tools>Folder Options and click on View tab. Select "Show hidden files" and uncheck "Hide protected system files".
- Now open the drive where Windows is installed (usually c) and copy the files boot.ini, NTDETECT.COM and ntdlr from the hard disk to the pen drive. Rename the file boot.ini to boot.bak (the file present on the hard disk, not the file copied to the pen drive)
Windows will now not be able to boot from the hard disk because the boot.ini file is missing. Your PC will be able to boot only if you plug in your pen drive. So the pen drive now behaves as a key to your PC!!
To enable Windows to once again boot from the hard disk, rename boot.bak to boot.ini. If you fail to boot into your PC completely, you will have to repair the boot.ini file. You can do it through the Recovery Console. The procedure is described here.
Also read Lock your Windows PC with a USB pen drive - Part 2 for a better solution.