JSI Tip 9835. How to enable the NUM LOCK key for the logon screen?

Jerold Schulman

October 20, 2005

1 Min Read
ITPro Today logo in a gray background | ITPro Today


To enable NUM LOCK before you submit your credentials, you need to set the InitialKeyboardIndicators Value Name, a string data type, to 2 at KEY_USERS.DefaultControl PanelKeyboard.

NOTE: This does NOT apply Windows NT 4.0 Terminal Server or to Windows Servers running Terminal Services.

Using CMPAvail.bat, and REG.EXE, built into Windows XP, Windows Server 2003, and later, or installed on Windows 2000 from the Support Tools on the operating system CD-ROM, I have scripted NumLockLogon.bat to enable Num Lock on all computers in your network.

The syntax for running NumLockLogon.bat is NumLockLogon.

NumLockLogon.bat contains:

@echo offsetlocal ENABLEDELAYEDEXPANSIONfor /f "Tokens=1" %%c in ('net view^|find "\"') do ( set comp=%%c set work=!comp:=! call :isOK)endlocalgoto :EOF:isOKcall CMPAvail %work% OKif "%OK%" EQU "N" @echo %comp% not available.&goto :EOFfor /f "Tokens=1-3" %%a in ('reg query "%comp%HKU.DefaultControl PanelKeyboard" /V InitialKeyboardIndicators^|find "REG_SZ"') do ( if "%%c" EQU "2" set OK=N)if "%OK%" EQU "N" goto :EOF@echo reg ADD "%comp%HKU.DefaultControl PanelKeyboard" /V InitialKeyboardIndicators /T REG_SZ /F /D 2reg ADD "%comp%HKU.DefaultControl PanelKeyboard" /V InitialKeyboardIndicators /T REG_SZ /F /D 2@echo.



Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like