Is it possible to turn on/off numberlock with command prompt?

13,755

Solution 1

If you search google for "utility to turn off num lock", you will get a good answer.

It is a command line tool, just a simple little exe, 'numlock.exe off'

Alternatively, there are dozens of code examples if you want to build your own application, using any number of free development tools :)

Solution 2

POWERSHELL [CONSOLE]::NumberLock | FIND /I "FALSE">NUL&&POWERSHELL ($WSH = New-Object -ComObject WScript.Shell)-AND($WSH.SendKeys('{NUMLOCK}'))>NUL

Here is a good mash up for command prompt. Checks if the numlock is off, and if so turns it on. If you want it the other way around, Change FALSE to TRUE in "FIND /I "FALSE">NUL"

Solution 3

Google gave a few quick answers when I tried it, for example NUMLOCK.EXE and CAPSLOCK.EXE from this site:

http://www.rjlsoftware.com/software/utility/default.cfm

Once installed, the relevant commands are:

NUMLOCK ON/OFF

CAPSLOCK ON/OFF

Solution 4

For UNIX there is NumLockX to enable and disable numlock from the console.

Share:
13,755

Related videos on Youtube

Jon
Author by

Jon

Hi, I'm Jon.

Updated on September 18, 2022

Comments

  • Jon
    Jon almost 2 years

    With command prompt, can I turn my number lock on or off? I'm hoping to do it with just one line, but I'm assuming I can't as that would have shown up in google.

    • terdon
      terdon about 11 years
      Please remember to include the OS you are using in your question. command-line can apply to Windows, Linux, Unix, OSX, BSD, BeOS, Dos, etc etc.
  • Michael
    Michael about 11 years
    I didnt take the risk of posting the rjl link :)
  • hdhondt
    hdhondt about 11 years
    It look like a reasonably legit site - there's even an address and phone number. Of course, as with any downloaded software, caveat emptor!
  • hdhondt
    hdhondt about 11 years
    BTW, I searched for "num lock command prompt"
  • Michael
    Michael about 11 years
    And thats my latin lesson for the day
  • Jon
    Jon about 11 years
    I should have said so in the original post, but I'd like to do it with just regular command prompt. Sorry.
  • Jon
    Jon about 11 years
    I should have said so in the original post, but I'd like to do it with just regular command prompt. Sorry.
  • Michael
    Michael about 11 years
    I don't understand. Hack the low level hardware with a one line command prompt? Without custom/3rd party tools?
  • hdhondt
    hdhondt about 11 years
    There is no way to do it with standard Windows commands. With Win 95(?) you could use Windows to create an assembler file that would do the job, but I doubt very much that will work with current versions of Windows. See support.microsoft.com/kb/151715
  • Davidson Lima
    Davidson Lima over 3 years
    It didn't work in Windows 10.
  • Dave
    Dave over 3 years
    worked for me in windows 10
  • Rodolfo G.
    Rodolfo G. over 2 years
    ($WSH = New-Object -ComObject WScript.Shell)-AND($WSH.SendKeys('{NUMLOCK}')) .... you can run only that portion in a Powershell prompt (I ran as Administrator JIC) and it works in Win 10...