Program the Scroll Lock key to Shut Down PC

edro

Lifer
Apr 5, 2002
24,326
68
91
How could you do this? Either in C++ or Visual Basic. I know it would be real easy, but I also know you could use an interupt or use the Windows .dll that controls it also.

How would you do this?

Is anyone up to writing it for me? hehe.

Thanks,
Ed
 

Homer

Senior member
Oct 9, 1999
686
0
0
These may do it for you. They are not my original work.

For W2K (and maybe WXP):

Create a text file called shutdown.vbs

Put the following as the contents of the file:

set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys "^{ESC}uls{ENTER}"

Save the file and place it on the desktop or in the Quicklaunch or whatever. It should shutdown Win2K when you double click it.

Or you can place the file anywhere, create a shortcut to it, and assign a shortcut key or keys


For Win98/SE

Create a new shortcut on the desktop.

Put the following as the contents of the command line:

C:\WINDOWS\RUNDLL.EXE user.exe,exitwindows

Assign a shortcut key or keys.

For both of these the F9 key works very well and interferes with nothing that I know of.