[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4143
  • Last Modified:

run numlock on in group policy

is there anyway to turn numlock on in group policy so that numlock is on at logon?
0
bjv211
Asked:
bjv211
  • 5
1 Solution
 
LazarusCommented:
'xp_numlock_on.vbs - Sets Numlock to on at system boot.
'© Doug Knox - 10/09/2001

Option Explicit
On Error Resume Next

'Declare variables
Dim WSHShell, MyBox, p, p1, q1, t, itemtype
Dim jobfunc

'Set the Windows Script Host Shell and assign values to variables
Set WSHShell = WScript.CreateObject("WScript.Shell")
p = "HKEY_USERS\.Default\Control Panel\Keyboard\InitialKeyboardIndicators"
p1 = "HKEY_CURRENT_USER\Control Panel\Keyboard\InitialKeyboardIndicators"
itemtype = "REG_DWORD"
q1 = 2

'Describe the funtion of the script for a dialog box

jobfunc = "NumLock will be on at boot up."

'This section writes the correct values to the Registry

WSHShell.RegWrite p, q1
WSHShell.RegWrite p1, q1

t = "Confirmation"
MyBox = MsgBox (jobfunc, 4096, t)
0
 
LazarusCommented:
Sorry I should have explained. This is a VBS script. You would use that in your client login script.
0
 
LazarusCommented:
Also another note, this will also set the client to always have numlock on because it's setting a registery key. Run once is all it needs.
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LazarusCommented:
This will work better if you don't want a registery hack. Still used in a VBS script though:

set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys "{NUMLOCK}"
0
 
bjv211Author Commented:
i'm not familiar with vbs, do i just drop this in a notepad and save as vbs and run as startupscript?
0
 
LazarusCommented:
Yes, exactly.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now