Solve a problem where Numlock is enabled in Microsoft Windows at startup with these steps.
Method 1 – Registry Setting
- Hold the Windows Key then press “R” to bring up the Run dialog box.
- Type “regedit“, then press “Enter“.
- Navigate to the following location in the registry:
- HKEY_USERS
- .Default
- Control Panel
- Keyboard
- Change the value of InitialKeyboardIndicators
- Set it to 0 to set NumLock OFF
- Set it to 2 to set NumLock ON
PowerShell Script
Use the following PowerShell code:
Enable Num Lock:
Set-ItemProperty -Path 'Registry::HKU\.DEFAULT\Control Panel\Keyboard' -Name "InitialKeyboardIndicators" -Value "2"
Disable Num Lock:
Set-ItemProperty -Path 'Registry::HKU\.DEFAULT\Control Panel\Keyboard' -Name "InitialKeyboardIndicators" -Value "0"
You can launch this and other PowerShell scripts at startup. Visit this post on using PowerShell to create a job that runs at startup to learn how.
Method 2 – Function Keys
You may have inadvertently pressed a key combination on your keyboard to cause certain letters on your keyboard to be used as a numeric keypad. This is normally the case for laptop users.
In most cases, you will have a “Fn” and “NumLk” key that can be used to toggle this setting on or off. Hold the “Fn” key, then press “NumLk” to toggle the numeric keypad on or off.
Method 3 – BIOS Setting
Most computers, including virtual machines will have a BIOS setting that controls whether or not NumLock is enabled or disabled at startup. You can usually enter the BIOS by pressing a certain key such as “Delete” or “F1” at startup before Windows loads. Once in the BIOS, you should be able to find a setting that controls NumLock.
Method 4 – Startup or Logon Script
If you’re an administrator looking for a way to set the Num Lock on at startup, you can do so using a logon script. There is no specific Group Policy setting to accomplish this. Instead use the following.
- Copy and paste the following into a Notepad document, then save it as “numlock.vbs“:
set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys "{NUMLOCK}" - Do one of the following:
- Place the “numlock.vbs” file in the “Startup” folder of the target computer or user.
- Run the script through Group Policy using these steps:
- Place the “numlock.vbs” in one of the following folders:
- Local logon script path = “%SystemRoot% \ System32 \ GroupPolicy \ User Computer\ Scripts \ Logon“
- Domain logon script path = “%SysVolFolder% \ Sysvol \ Sysvol \ DomainName \ Scripts“
- Hold down the Windows Key and press “R” to bring up the Windows Run dialog box.
- Type “mmc“, then press “Enter“.
- Go to “File” > “Add/Remove Snap-in” > “Add” > “Group Policy“.
- Select the GPO you wish to use by selecting “Browse“. The default is the local computer.
- Select “Finish” > “Close” > “OK“.
- From the Group Policy Management snap-in, navigate to “User Configuration” or “Computer Configuration” > “Windows Settings” > “Scripts“.
- Double-click “Logon script“, then go to “Add” > “Browse“, then select “numlock.vbs“.
- Select “Open” > “OK” > “OK“.
- Place the “numlock.vbs” in one of the following folders:
Note: The “numlock.vbs” script will simply act like it is pressing the “Num Lock” key once. So really, it will toggle it to the opposite of what it is by default. It’s probably better to use the Registry method, but this method is handy when you’re in a bind.
Kevin Carmody says
Methods 2 and 3 are not available on my machine. I tried methods 1 and 4. Neither one worked if I used the power button to shut the machine down. But method 1 works fine as long as I use software to shut the machine down, e.g. Start menu > Power or Win+X > Shut down.
Bill Murray says
I tried 2 and it did not work for me. However, entering 1 did work. I have the latest Windows 10 Pro with all feature updates as of 1/16/2021.
Luis says
Yes, This worked!!!
But what do I do with “2147483648” that was previously recorded there?
What does this number means?
Thanks
Danton Cavalcanti Franco Junior says
Perfect! Congratulations!
Helped me a lot.
Gino says
Perfect, thanks!
Udith Kumar says
Thanks for the useful information man, Its working fine after following your instructions for enabling the Num lock. Remember it will updated again if it fails to.
Pierre says
Perfect, Thanks
Youness says
Perfect solution for GPO managed environment.
Eelco Busch says
it worked,
thnx
Eelco (the Netherlands)
dangode Ganesh says
very useful information , Thank you very much
JOHNNY says
Initial value was 2147483648. changed to 0 and numlock is off. Thanks
Dave says
@Taltul No change, still as written. Even if you don’t have a physical numlock key (or it uses a Fn key) it’s still the “NUMLOCK” signal to be sent.
Taltul says
I don’t have a Numlock key on my keyboard (There is FN.) What combination should I use????
Susanne Jones says
YAY! The nightmare ended, NumLock is finally off.
Jeffery Whigham says
FINALLY!!!!