Annoyances.org
Home » Windows XP Discussion Forum » Message 1208056704 Search | Help | Home
  
re: Question about 'Force NumLock to Behave'
Saturday, April 12, 2008 at 8:18 pm
Windows XP Annoyances Discussion Forum
Posted by Michael (1 messages posted)


Ok, for those of you with users using multiple machines, try this.  It only works 
if you have Word installed, but I couldn't find an alternate method (not that I tried 
hard).  Also, to fire a .vbs file from a login batch script, just enter it like an 
.exe file; for instance, "\\MyServer\Logins\NumOn.vbs".

For those of you who just have one computer, the simple way is to just let Windows 
automatically restore the previous Numlock condition on login, but if that doesn't 
work, you can either set one of these scripts in the Startup folder or add a pointer 
in the registry at HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run\.

1. Set the .DEFAULT user on all the machines as desired using the registry when you 
image them.
2. Since the default for each user is to be on automatically (on my machine anyways) 
users who want Numlock On each time they login are left alone.
3. For the users who want Numlock Off each time they login, run the following .vbs 
file from their login script (yes, I know it's a really dumb-looking script, but 
the only way I know how):

Set WshShell = WScript.CreateObject("WScript.Shell")
Dim NumOn
Set objWord = CreateObject("Word.Application")
NumOn = objWord.NumLock
objWord.Quit
If NumOn = -1 Then
            WshShell.SendKeys "{NUMLOCK}"
End If

Note: if your machines default to Numlock Off, put the same script in the login scripts 
of those who want it on instead of those who want it off, but change "If NumOn = 
-1" to "If NumOn = 0".  Alternately, you could just run both scripts to be sure.

Also, this requires at least two login scripts per user type (one with the Numlock 
change and one without), so if you have a dozen login scripts (say, one for engineers, 
one for execs, etc.), it could be cumbersome.  However, it should get the job done 
without too much extra work, since you just set the script once in the user's profile 
and you're done.

When you change a script for whatever reason, just make the changes to the one with 
the NumOn/NumOff Entry, save, delete the entry, save as, done.  If using both a NumOn 
and NumOff script, make changes, save, change Off to On or vice versa (if you name 
the scripts NumOff/NumOn), save as, done.



Written in response to:
re: Question about 'Force NumLock to Behave' (Mike Jankowski: Wednesday, March 12, 2008 at 10:29 am)

Responses to this message:
*re: Question about 'Force NumLock to Behave' (Chris O.: Thursday, May 22, 2008 at 2:28 pm)

All messages in this thread [show all]
-Question about 'Force NumLock to Behave' (Ann: Sun, Jun 9, 2002, 11:22 pm)
*re: Question about 'Force NumLock to Behave' (techno: Thu, Jun 13, 2002, 7:50 pm)
-re: Question about 'Force NumLock to Behave' (Jeff: Fri, Jun 21, 2002, 12:37 pm)
*re: Question about 'Force NumLock to Behave' (Lane Craig: Fri, Apr 25, 2003, 6:56 am)
*re: Question about 'Force NumLock to Behave' (Floyd: Sat, Jul 27, 2002, 7:09 pm)
-re: Question about 'Force NumLock to Behave' (Valerie: Tue, Aug 6, 2002, 9:07 am)
*re: Question about 'Force NumLock to Behave' (S. Lambert: Fri, Sep 6, 2002, 6:08 am)
*re: Question about 'Force NumLock to Behave' (Ianpb: Tue, Nov 5, 2002, 6:38 pm)
*re: Question about 'Force NumLock to Behave' (Jock McGuire: Sat, Feb 8, 2003, 5:00 am)
-re: Question about 'Force NumLock to Behave' (Random: Mon, Oct 15, 2007, 6:47 am)
-re: Question about 'Force NumLock to Behave' (will: Wed, Jan 16, 2008, 7:20 am)
*re: Question about 'Force NumLock to Behave' (Random: Sat, Jan 19, 2008, 10:31 am)
-re: Question about 'Force NumLock to Behave' (John Burns: Sun, Jul 4, 2004, 5:30 am)
-re: Question about 'Force NumLock to Behave' (Mike Jankowski: Sun, Apr 24, 2005, 12:21 pm)
*re: Question about 'Force NumLock to Behave' (Cheryl Clark: Mon, Apr 25, 2005, 5:47 pm)
*re: Question about 'Force NumLock to Behave' (System Analyst: Wed, Jul 11, 2007, 8:06 pm)
-re: Question about 'Force NumLock to Behave' (Mike Jankowski: Tue, Mar 11, 2008, 5:31 pm)
-re: Question about 'Force NumLock to Behave' (will: Wed, Mar 12, 2008, 10:09 am)
-re: Question about 'Force NumLock to Behave' (Mike Jankowski: Wed, Mar 12, 2008, 10:29 am)
-re: Question about 'Force NumLock to Behave' (Michael: Sat, Apr 12, 2008, 8:18 pm)
-re: Question about 'Force NumLock to Behave' (Chris O.: Thu, May 22, 2008, 2:28 pm)
*re: Question about 'Force NumLock to Behave' (Chris O.: Thu, May 22, 2008, 2:55 pm)
*re: Question about 'Force NumLock to Behave' (Michael Patten: Sun, May 8, 2005, 6:52 am)
*re: Question about 'Force NumLock to Behave' (Rob: Thu, Jun 28, 2007, 9:24 am)
Return to the Windows XP Discussion Forum

All content at Annoyances.org is Copyright © 1995-2008 Creative Elementtm All rights reserved.
Please do not plagiarize; redistributing these pages without permission is strictly prohibited.