Ensuring that NumLock is on at start up in Windows XP

Provided by the FMS Development Team

Because of Windows XP's multi-user functionality, the state of the NumLock key is always set to off when the computer starts up. Even if you have it set in your bios to the "on" state, Windows XP will override the behavior.

To work around this issue, you can manually set a registry key value or run a script at logon time.


Example

Method 1 - Change the registry manually

Note: Use extreme caution when modifying your registry as changing some values may affect your computer adversely. Prior to changing anything in your registry, you may want to consider making a backup of the registry first.

  1. Open the registry editor by clicking on Start, Run, and typing "regedit" (without quotes).
  2. Navigate to the key below and change the value of the InitialKeyboardIndicators value in this key from 0 to 2.

HKEY_USERS\.Default\Control Panel\Keyboard

Method 2 - Run a Script

Note: You will need the Windows Scripting Host files installed on your machine for this to properly run.

  1. Start Notepad.
  2. Copy the following code, and then paste the code into the text file:
  3. WshShell = CreateObject("WScript.Shell")
    WshShell.SendKeys "{NUMLOCK}"

  4. Save the file as "Numlock.vbs" (including the quotes). This properly creates the file with the .vbs extension. The icon changes from a Notepad icon to a script icon.
  5. To configure the script to run locally, copy the Numlock.vbs file to the user's Startup folder, which is normally found in the user's profile path.
  6. To configure the script to run for all users, copy the Numlock.vbs file to the Startup folder in the All Users profile.
    The default path for this folder is Documents and Settings\All Users\Start Menu\Programs\Startup.

Return to Tips & Techniques Page

Additional Resources

 

 

Thank you! Thank you! I just finished reading this document, which was part of a link in the recent Buzz newsletter. I have printed it for others to read, especially those skeptical on the powers of Access and its capabilities.

Darren D.


View all FMS products for Microsoft Access All Our Microsoft Access Products

 

 

Free Product Catalog from FMS