|
|
|
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.
|
All messages in this thread [show all]
 |  |  |  |  |  |  | re: Question about 'Force NumLock to Behave' (Michael: Sat, Apr 12, 2008, 8:18 pm) |
| |
| |
Return to the Windows XP Discussion Forum
|
|
|
|