I'm using a PIN code to log on my computer. However, Num ⇩ is always turned off, even if on before shutting down my computer. This is quite annoying as I always have to retype my PIN.

I've tried the suggestions here (same as here). But with no result.
If I don't enable num lock on log in screen and use the numbers above the normal keys, num lock turns on after log on. Then it's too late, unfortunately.

So, how can I make num lock enabled by default when logging in? Thanks.

Edit: While I still want to solve this, I've figured it is not such a big problem. I will need to press some key for the "enter PIN screen" to show, and using Num ⇩ works and enables num lock. But then, still annoying if the computer was only locked (with num lock on) and I turn it off, hehe.

  • 2
    Have you considered setting it in the bios?
    – Mikhail
    Commented Oct 31, 2012 at 9:31
  • Thank you for your response. I'm unable to find any such setting in my BIOS, however. Only boot, security and some power options, even in advanced mode.
    – Matsemann
    Commented Oct 31, 2012 at 9:41
  • "press Num Lock in logon screen and then restart you system without login" - from comments under tweaks.com/windows/64867/…
    – Aprillion
    Commented Feb 7, 2015 at 11:09

4 Answers 4


Before logon, Windows will ignore the BIOS numlock setting for security reasons. In addition, Windows does not use the registry setting for num lock until after login. If you need numlock on before that, see How to Set the NUM LOCK State at Logon in Windows XP (Article is about Windows XP, but works for Windows 7, as well - I assume it is the same for Windows 8).

To do this, put in numlock.vbs:

set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys "{NUMLOCK}"

Then set it to run for the logon screen using Group Policy. You just copy numlock.vbs into the Group Policy folder. The default path for a local logon script is %SystemRoot%\System32\GroupPolicy\User Computer\Scripts\Logon.

To get the script to run (quoted from http://support.microsoft.com):

  1. Click Start, click Run, type mmc, and then click OK to start Microsoft Management Console (MMC).
  2. On the Console menu, click Add/Remove Snap-in.
  3. Click Add, click Group Policy, and then click Add.
  4. Click the appropriate Group Policy Object. The default selection is the local computer, but you can click Browse and select a different Group Policy Object.
  5. Click Finish, click Close, and then click OK.
  6. In the Group Policy Management snap-in, locate the User Configuration\Windows Settings\Scripts (Logon/Logoff) folder. (You can substitute the Computer Configuration folder for the User Configuration folder.)
  7. Double-click the Logon script object, click Add, click Browse, and then click the Numlock.vbs script.
  8. Click Open, and then click OK.
  9. Click OK, and then close the Group Policy Management console.

You can set the num lock default in the registry, but it only applies after logging on.

This involves setting InitialKeyboardIndicators to 2 in [HKEY_USERS.DEFAULT\Control Panel\Keyboard].

enter image description here

NB: Setting InitialKeyboardIndicators will not work on Windows 8 if you are signed in with a Microsoft Account. It only works with a local account.


  • 1
    I've already tried that, so the value is 2 but num lock still not on when shutting down and then turning computer on again.
    – Matsemann
    Commented Oct 31, 2012 at 9:30
  • @Matsemann, try the 2nd part of my answer
    – ronalchn
    Commented Oct 31, 2012 at 9:43
  • @Matsemann, edited, it is the first part now. Use a Group Policy script which runs at logon. The script just sends num lock.
    – ronalchn
    Commented Oct 31, 2012 at 9:52
  • 1
    Wonderful idea on the GPO front. Commented Mar 2, 2013 at 16:18
  • 1
    "Windows will ignore the BIOS numlock setting for security reasons": what the HELL kind of security hole could possibly be created from defaulting Num Lock to "on"? I'm calling shenanigans on that statement without a cited source.
    – Ben
    Commented Aug 11, 2015 at 16:43

I have a 100% working answer.

  • Hit the Windows key + R to open Run.
  • Type in regedit.exe, click Ok.
  • Go to HKEY_USERS on the left hand side then DEFAULT then Control Pannel then Keyboard.
  • Right click "InitialKeyboardIndicators" and click Modify and change the value to 2147483650.
  • Then on your screen, mouse over to the bottom right hand corner to open the Search bar on the right hand side of the screen, (your Windows 8 side bar), and click Search.
  • Search for "Control Panel", go to the Control Panel.
  • Click Power Options. On the left hand side, click Choose what the power buttons do.
  • Click Change settings that are currently unavailable. Uncheck the box that says Turn on fast startup (recommended), click Save Changes.
  • Shut down the computer, turn it back on.

It worked for me at my neighbor's house, it will work for you.

  • 16
    Turning off fast startup to not have to press the num lock key on startup seems a bit excessive. 20 second loss for a 1 second gain?
    – Matsemann
    Commented Mar 11, 2013 at 22:53
  • Well, it does solve the issue With Numlock state at login, but raises another issue with the startup time...
    – awe
    Commented Jul 28, 2014 at 14:49
  • I confirm this works with my Windows 10 (1903). I have not noticed any startup time difference. It takes about 10 seconds to start Windows, the same as before. My problem is not much about reboot which rarely happens, but about logging on that happens many times every day.
    – Hong
    Commented Aug 25, 2019 at 15:25

In case you still haven't fixed this or want a much easier way, this worked for me on Windows 8 Core.

  1. Press Windows+R
  2. Type regedit and hit ENTER
  3. Navigate to HKEY_USERS\.Default\Control Panel\Keyboard
  4. Back up the registry by clicking File → Export
  5. Change the value for InitialKeyboardIndicators from 0 to 2.


If the original value is something other than 0, the safest thing to do is:

  1. Launch Windows Calculator
  2. Hit Alt+3 for programmer mode
  3. Type in the original value
  4. Click the Or button
  5. Type 2, then ENTER
  6. Use the value shown rather than 2

If you're absolutely sure the num lock setting is currently disabled, you can just add 2 to the current value instead.

See: http://support.microsoft.com/kb/154529

  • 1
    My value in this field isn't 1, its 21474836...
    – maja
    Commented Jun 8, 2014 at 9:36
  • Works fine for me in Windows 8.1 Pro, including with a Microsoft Account. As for the value, I've updated the answer a bit.
    – Thorarin
    Commented Mar 24, 2015 at 20:00
  • The non-zero approach worked like a charm.
    – ZeeCoder
    Commented May 17, 2015 at 18:05
  • 1
    Does not work on Windows 10 Pro.. even after ORing 2 with my initial value...
    – Rosdi
    Commented Jan 2, 2016 at 23:33
  • I thought this worked for me in Windows 10 Home, but it turns out Restarting doesn't do the same thing as turning the computer off and on. Commented Apr 10, 2016 at 3:30

The registry solutions are excellent, but I would always try to fix this in the BIOS first and then modify the registry.

What I mean is:

The registry solutions are excellent, but if you fix this in the BIOS first, then you will probably have fewer problems in the long term, than if you use a software-based solution first.

Re-instealling Windows, or even going back to an earlier restore point will reintroduce this problem. However, if you fix it in the BIOS, then you can (for the most part) forget about it after you've fixed it one time. Sure, if your CMOS battery runs flat at some point then it will go back to defaults, but in most cases Num lock enabled on boot is the default anyway.

  • Can this be fixed in the BIOS? How?
    – cpast
    Commented Feb 22, 2013 at 21:16
  • Someone voted my answer down. Thanks. And yes, num lock is an option in many BIOS's, possibly most. It will vary depending on your PC and BIOS revision. Look through all the options. The reason I say try this first, is if you ever reinstall your OS, this issue will return if you fix it in the registry instead of the BIOS. I don't understand why good advice gets voted down sometimes. It's not like I said click your heels together 3 times then do a little dance. Commented Feb 22, 2013 at 21:18
  • @d-man: You might want to try to describe the process more clearly directly in your answer, by editing it. Commented Feb 22, 2013 at 21:30
  • 9
    Using the BIOS option will not work, as Windows disables Num Lock for the login screen. I have (always had) Num Lock enabled in the BIOS, so that it's just always on. Windows explicitly disables Num Lock on the login screen, it's on before and after. I've heard this is for security reasons, but I wouldn't really see why. I guess Microsoft just sorta "forgot" that when they offer pin code login with Windows 8, it'd be ideal to actually be allowed to use the numeric keypad. I didn't vote down your answer, but I figured I'd clarify that the solution will not work.
    – user209173
    Commented Mar 21, 2013 at 9:49
  • Won't work because on the logon screen of Windows 8 turns OFF NumLock. I have it ON in BIOS settings and the computer starts properly, but right after Windows 8 loads it always turns off. I voted down because your answer does not provide proper solution.
    – venimus
    Commented May 10, 2013 at 10:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .