How to have num lock enabled by default on log on screen?

35

7

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.

Matsemann

Posted 2012-10-31T09:19:49.213

Reputation: 2 358

"press Num Lock in logon screen and then restart you system without login" - from comments under http://tweaks.com/windows/64867/enable-num-lock-on-the-windows-8-logon-screen/

– Aprillion – 2015-02-07T11:09:53.230

2Have you considered setting it in the bios? – Mikhail – 2012-10-31T09:31:42.170

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 – 2012-10-31T09:41:26.763

Answers

16

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.

Sources:

ronalchn

Posted 2012-10-31T09:19:49.213

Reputation: 4 421

I'd press the numlock key, instead of going through all these trouble ;-) – noob – 2014-07-30T05:37:05.723

The instructions quoted from Microsoft do not work in Windows 8. There is no "console menu", the file menu contains "Add/Remove Snap-in" however the dialogue doesn't appear to contain the options that the instructions require. There is a list of items to add, including some referring to the group policy. However none of them seem to do the needed task. Furthermore in some cases it says "To manage group policy you must be logged on to the computer with a domain user account". – zeel – 2014-09-14T18:11:48.983

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 – 2015-08-11T16:43:31.467

@Matsemann Try to do same things except in HKEY_USERS\.Default\Control Panel\Keyboard registry location instead of HKEY_CURRENT_USER.... I had the same problem in my experience. but in this answer http://superuser.com/a/923731/248914 I find it out. Stevens and Acids answer in this page are mentioning the same point.

– Mojtaba Rezaeian – 2016-02-07T23:18:35.403

1I'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 – 2012-10-31T09:30:02.513

@Matsemann, try the 2nd part of my answer – ronalchn – 2012-10-31T09:43:23.927

@Matsemann, edited, it is the first part now. Use a Group Policy script which runs at logon. The script just sends num lock. – ronalchn – 2012-10-31T09:52:11.187

1Wonderful idea on the GPO front. – tom.dietrich – 2013-03-02T16:18:15.887

You say, "Setting InitialKeyboardIndicators will not work on Windows 8 if you are signed in with a Microsoft Account. It only works with a local account." So how do we get this working if we sign in with a MSFT account? – Doug – 2014-04-05T23:39:48.903

15

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.

Steven Depoorter

Posted 2012-10-31T09:19:49.213

Reputation: 167

Well, it does solve the issue With Numlock state at login, but raises another issue with the startup time... – awe – 2014-07-28T14:49:09.277

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 – 2019-08-25T15:25:01.033

14Turning 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 – 2013-03-11T22:53:05.500

9

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.

Edit:

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

AcidBeaver

Posted 2012-10-31T09:19:49.213

Reputation: 99

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 – 2015-03-24T20:00:15.017

The non-zero approach worked like a charm. – ZeeCoder – 2015-05-17T18:05:50.193

1Does not work on Windows 10 Pro.. even after ORing 2 with my initial value... – Rosdi – 2016-01-02T23:33:26.770

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. – StriplingWarrior – 2016-04-10T03:30:05.403

1My value in this field isn't 1, its 21474836... – maja – 2014-06-08T09:36:40.180

-1

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.

Austin ''Danger'' Powers

Posted 2012-10-31T09:19:49.213

Reputation: 5 992

Can this be fixed in the BIOS? How? – cpast – 2013-02-22T21:16:57.317

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. – Austin ''Danger'' Powers – 2013-02-22T21:18:30.987

@d-man: You might want to try to describe the process more clearly directly in your answer, by editing it.

– Der Hochstapler – 2013-02-22T21:30:57.683

9Using 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. – None – 2013-03-21T09:49:17.690

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 – 2013-05-10T10:08:17.740