Feb 172012
 

Just two simple scripts I wrote up to disable number lock on Windows 7 and Windows XP. They import the Default hive and then set the InitialKeyIndicator setting to “0″.

Win XP Script:

1
2
3
4
5
6
7
8
9
10
11
12
On Error Resume Next
'==========VARIABLE ASSIGNMENTS=========================
Dim objFSO, objShell, sCurPath
Set objShell = CreateObject("WScript.Shell")
 
strCommand = "reg load HKLM\defhive ""C:\Documents and Settings\Default User\NTUSER.DAT"""
objShell.Run strCommand, 0, True
 
objShell.RegWrite "HKLM\defhive\Control Panel\Keyboard\InitialKeyboardIndicators", "0"
 
strCommand = "reg unload HKLM\defhive"
objShell.Run strCommand, 0, True

Win 7 Script:

1
2
3
4
5
6
7
8
9
10
11
12
On Error Resume Next
'==========VARIABLE ASSIGNMENTS=========================
Dim objShell, sCurPath, strCommand
Set objShell = CreateObject("WScript.Shell")
 
strCommand = "reg load HKLM\defhive c:\Users\Default\NTUSER.DAT"
objShell.Run strCommand, 0, True
 
objShell.RegWrite "HKLM\defhive\Control Panel\Keyboard\InitialKeyboardIndicators", "0"
 
strCommand = "reg unload HKLM\defhive"
objShell.Run strCommand, 0, True

-Brian G.

Share

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>