You receive error code 126 or 2 when you try to start the HID service when you use a Microsoft USB keyboard, mouse, or Lifecam

Important This article contains information about how to modify the registry. Make sure that you back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows

Summary

When you try to start the Human Interface Device (HID) service when you use a Microsoft USB keyboard, mouse, or Lifecam device, you receive one of the following error messages:
Error message 1
Error Code 126
Error message 2
Error 2

Resolution

If you receive error code 126 or error code 2 when you try to start the HID service, follow the appropriate steps.

Error 126

If you receive error code 126, extract the hidserv.dll file. To do this, follow these steps:
  1. Search for the hidserv.dll file on your system drive. If you cannot locate the file on your system drive, locate the file on your Windows CD.
  2. Use the arrow keys to select Extract , and then press ENTER.
  3. Use the arrow keys to select the C:\Windows\System32 folder, and then set this folder as the destination.
  4. Restart the computer.

Error 2

If you receive error code 2, change the registry settings.
Note This issue may also occur because of changes in the registry settings.
Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall the operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.

To resolve this problem, turn on the HID service on the computer. To do this, follow these steps:

  1. Start Registry Editor.
    • In Windows Vista, click Start
      the Start button , type
      regedit
      in the
      Start Search
      box, and then press ENTER.

      User Account Control
      If you are prompted for an administrator password or for confirmation, type the password, or provide confirmation.
    • In Windows XP, click
      Start
      , click
      Run
      , type
      regedit
      in the
      Open
      box, and then click
      OK.
  2. Locate and then click the following registry key:
    HKEY_LOCAL_MACHINE/System
  3. Expand System.
  4. Expand ControlSet001.
  5. Expand Services, and then click HidServ.
  6. In the details pane, right-click Type, and then click Modify.
  7. In the Value data box, make sure that the value is set to 20, and then click OK.
  8. Expand HidServ , and then click Parameters.



    Note If the Parameters registry key does not exist, follow these steps:
    1. Click HidServ.
    2. On the Edit menu, point to New, and then click Key.
    3. Type Parameters, and then press ENTER.
  9. In the details pane, right-click ServiceDll, and then click Modify.

    Note If the ServiceDll registry value does not exist, follow these steps:
    1. Click Parameters.
    2. On the Edit menu, point to New, and then click Expandable String Value .
    3. Type ServiceDll, and then press ENTER.
  10. In the Value data box, verify that the value is set to %SystemRoot%\System32\hidserv.dll. If this is not the value, type %SystemRoot%\System32\hidserv.dll in the Value data box, and then click OK.
  11. Repeat steps 5 through 10 for each registry key that contains "ControlSet" in the key name. For example, if there is a registry key that is named CurrentControlSet or ControlSet002, click CurrentControlSet or click ControlSet002 . Then, repeat steps 5 through 10.
  12. Exit Registry Editor.
  13. Restart the computer.
Properties

Article ID: 975367 - Last Review: Sep 9, 2009 - Revision: 1

Feedback