I said to someone the other day "Do it in Safe Mode and it will work."
To which they replied, "How do I get to Safe Mode?"
Update for USB keyboards.
This is how:

Windows 95
- Click Start.
- Select Shutdown.
- Select Restart The Computer and click OK.
- Hold down the F8 key on your keyboard as your PC restarts
- If your PC starts beeping then release the key for a few seconds before holding it down again.
- If Windows doesn't restart in Safe Mode then try again.
Windows 98, 98SE & ME
- Click Start.
- Select Shutdown.
- Select Restart The Computer and click OK.
- During restart, hold down the Ctrl key on your keyboard until the Windows Startup menu appears.
- If your PC starts beeping then release the key for a few seconds before holding it down again.
- Select Safe Mode from the Startup menu, and press the Enter button on your keyboard.
- If Windows doesn't restart in Safe Mode then please try again.
Windows 2000
- Click Start.
- Select Shutdown.
- Select Restart and click OK.
- During restart, hold down the F8 key on your keyboard until the Windows Startup menu appears.
- If your PC starts beeping then release the key for a few seconds before holding it down again.
- Select Safe Mode from the Startup menu, and press the Enter button on your keyboard.
- If Windows doesn't restart in Safe Mode then please try again.
Windows XP (XP Home edition below)
- Click Start.
- Select Shutdown.
- Select Restart and click OK.
- During restart, hold down the F8 key on your keyboard until the Windows Startup menu appears.
- If your PC starts beeping then release the key for a few seconds before holding it down again.
- Select Safe Mode from the Startup menu, and press the Enter button on your keyboard.
- If Windows doesn't restart in Safe Mode then please try again.
Windows XP Home Edition
- Click Start.
- Select Turn off computer.
- Select Restart.
- During restart, hold down the F8 key on your keyboard until the Windows Startup menu appears.
- If your PC starts beeping then release the key for a few seconds before holding it down again.
- Select Safe Mode from the Startup menu, and press the Enter button on your keyboard.
- If Windows doesn't restart in Safe Mode then try again.
Windows Vista
- Click Start (that's the Windows logo, bottom left of the screen by default).
- Select the Arrow to the right of the padlock.
- Select Restart and click OK.
- During restart, hold down the F8 key on your keyboard until the Windows Startup menu appears.
- If your PC starts beeping then release the key for a few seconds before holding it down again.
- Select Safe Mode from the Startup menu, and press the Enter button on your keyboard.
- If Windows doesn't restart in Safe Mode then try again.

UPDATED 27/07/2008 Robin points out (via email):
Your method is only guaranteed to work if the PC has an "old" PS2 keyboard. Your method is hit and miss with a new style USB keyboard. This is because software drivers are required to interact with a USB keyboard and these are not loaded and active until Windows starts, so if you are trying to press F8 on a USB keyboard before these drivers have loaded then this method will fail…
All noted Robin, I can confirm that some motherboards do offer onboard (BIOS) support for USB keyboards, so the above method should work with them, if the BIOS support for USB keyboard is switched on.
Robin continued:
A much better method is as follows…
- click START
- click RUN
- Type msconfig and press ENTER
- select the BOOT tab
- click the checkmark for SAFEBOOT
- click OK
- reboot the PC
This method will continue booting into SAFE mode every time, until you remove the checkmark from the box (i.e. repeat the above but in step 5 click the checkmark to remove it).
Thanks for that Robin, personally I've no experience of USB keyboards yet. I have used the methods I described above to good effect since 1995 and they do work for "normal" (PS/2 and the older 5 pin DIN) keyboards.
I will write out 100 times: "I must keep up with technology"!