Introduction: How to Make a Computer Lock

About: I find a quote from Bill Gates makes a very good description. "Be nice to nerds. Chances are you'll end up working for one."

Do you have a computer that someone knows the password, or are to lazy to lock the computer when you leave, even for a minute? Well this is an instructable our friendly neighborhood nerd has made for us. You will need:

a computer (running Windows 3.1 or higher)
notepad or other simple text editing software
arms and legs are optional if you have speech recognition
keyboard

NOTE:This will not work on Macs (sorry macs)

Step 1: Open Notepad

First open notepad.

Win 95-2000, Me
Start>Programs>Accesories>Notepad

Win XP and up
Start>All Programs>Accesories>Notepad

If you see the window shown below then you have notepad.

Step 2: Code

Copy and paste this code:

dim Password
dim Input

Password = inputbox ("Enter the password","Password","Enter text here")
do
Input=inputbox ("This computer is locked. Enter the password.","Password","Enter text here")
if Password = Input then
a=msgbox ("Correct! Welcome back.",0+64,"Computer")
else
if Input = "0000" then
b=msgbox ("Reset code entered.",0+64,"Computer")
else
c=msgbox ("Incorrect. Try again.",0+16,"Computer")
end if
end if
loop until Password = Input or Input = 0000

Step 3: Reset Code

Look for the part of the code that says

if Input = "0000" then

and also

loop until Password = Input or Input = 0000

These are the program's reset codes. If you forget your password the reset codes will allow you in. You can change them to any number you want but both the 0000 parts of the code must be the same for this to work. For example they could be the year you were born or your house #.

Step 4: Save Me!!

To make this script work we need to save it in a special way, follow along carefully. :o

Go to
File>Save As

Now we can save it as anything you want, but it has to end with the file extension .vbs

ex.
CompLock.vbs

Step 5:

Test this program. The best part of this program is you can add a new password every time, so if an annoying sister, brother, parent, co-worker ect. finds out your password you can add a new one the next time you run this program. As always comment any problems this program has so I can debug it. Super_Nerd signing out.