Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My motherboard finally died after the better part of a decade, so I bought a used system. I put my old hard-drive and sound-card in the new system, and connected my old keyboard and mouse (the rest of the components—CPU, RAM, mobo, video card—are from the new system).

I knew beforehand that it would be a challenge to get Windows to boot and install drivers for the new hardware (particularly since the foundational components are new), but I am completely unable to even attempt to get through the work of installing drivers for things like the video card because the keyboard and mouse won't work (they do work, in the BIOS screen, in DOS mode, in Windows 7, in XP's boot menu, etc., just not in Windows XP itself).

Whenever I try to boot XP (in normal or safe mode), I get a bunch of balloons popping up for all the new hardware detected, and a New Hardware Found Wizard for Processor (obviously it has to install drivers for the lowest-level components on up). Unfortunately I cannot click Next since the keyboard and mouse won't work yet because the motherboard drivers (for the PS/2 or USB ports) are not yet installed. I even tried a serial mouse, but to no avail—again, it does work in DOS, 7, etc., but not XP because it doesn't have the serial port driver installed.

I tried mounting the SOFTWARE and SYSTEM hives under Windows 7 in order to manually set the "unsigned drivers warning" to ignore (using both of the driver-signing policy settings that I found references to). That didn't work; I still get the wizard.

They are not even fancy, proprietary, third-party, or unsigned drivers. They are drivers that come with Windows—as the drivers for CPU, RAM, IDE controller, etc. tend to be. And the keyboard and mouse drivers are the generic ones at that (but like I said, those are irrelevant since the drivers for the ports that they are connected to are not yet installed).

Obviously at some point in time over the past several years, a setting got changed to make Windows always prompt me when it detects new hardware. (It was also configured to show the Shutdown Event Tracker on abnormal shutdowns, so I had to turn that off so that I could even see the desktop.)

Oh, and I tried deleting all of the PNF files so that they get regenerated, but that too did not help.

Does anyone know how I can reset Windows to at least try to automatically install drivers for new hardware before prompting me if it fails? Conversely, does anyone know how exactly one turns off automatic driver installation (and prompt with the wizard)?

Thanks a lot.

Just to be clear since it will likely come up in the answers otherwise, I am NOT talking about the dialog below, I am talking about the one below that.

alt text

alt text

Oh, and to head off any suggestions of the following sort before they happen, using Device Manager to disable, uninstall, repair, etc. any devices is out of the question because if the keyboard and mouse (or any other input device) isn't installed/working, then how exactly would I perform any actions like using Device Manager?

share|improve this question
up vote 7 down vote accepted

I finally got Windows XP working on my new old system on Friday! Woohoo! (It only took 5½ months.)

I would state the specific steps required to fix it in case someone else encounters a similar problem, though unfortunately, due to growing frustration and impatience, I ended up taking a somewhat scorched-earth approach and performed multiple steps at a time. However, I did keep the working files I used, and ferreted out the changes I made, so I will list several things to try that will, or at least should help.

(Obviously this is advanced stuff for advanced users; though even advanced users can mess this up pretty badly, hence the initial backup step.)

To recap the problem, a hard-drive containing an existing installation of Windows is put into a new system, and Windows does not automatically install drivers for hardware and prompts the user to install unsigned drivers, even for drivers that are supposed to be signed. Further, the user is unable to accept the dialog(s) because Windows has not installed the drivers for the keyboard or mouse (or other input devices).

Here is the tl;rd version:

  1. Make a backup of the registry hives.
  2. Disable every program, driver, and service that you can.
  3. Set things (like the taskbar) so that you can see everything (don’t hide any info).
  4. Have a .BAT file auto-run to have an easy way to make changes and perform online (in-OS) tasks.
  5. Use a macro/scripting app to automate key-presses and button-clicks since you can’t do it yourself.
  6. Make sure all system files are present.
  7. Manually remove problematic and no-longer-present hardware.

  1. :

    • Boot into (pure) DOS or other OS, and make a backup copy of the registry hives to another location. This includes %systemroot%\System32\CONFIG\* and %userprofile%\NTUSER.DAT

    • Make sure that drive/partition settings in BOOT.INI and SystemBootDevice in [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet00*\Control] are set correctly since your system drive may now be on a different drive/partition than it used to be (in my case, the (r)disk used to be 0, but was now 1 because of the new drive).

  2. :

    • Mount the appropriate registry hives and disable any and all extraneous auto-run programs, particularly anything that throws up windows and stuff that obscure your view since you won’t be able to minimize them or click the other windows/dialogs to the front (you must simplify to troubleshoot a problem like this). You don’t have to delete the auto-run entries, you can disable them instead, so that they’re still there for when you get Windows running and want to auto-run them again (especially for entries that have a bunch of command-line arguments):

      • For the Run keys, you can simply toss in a # character or something at the beginning of the command. That way, Windows won’t be able to run it since it’s not a valid file and will ignore it.

      • Mount the SYSTEM hive and set the start parameter to disabled (dword:4) for any extraneous drivers and services (especially those for hardware that is no longer present).

      • Disable PageDefrag, etc. in BootExecute in …\Control\Session Manager by adding a # to the beginning of the command (though leave autocheck alone since you’ll want the drives checked/fixed if you end up having to reboot via the reset button).

      • Instead of deleting any shortcuts in the Startup folders, just move them somewhere else.  

    • Set Windows to install drivers regardless of driver-signing by mounting the SOFTWARE and NTUSER registry hives and setting \Software\Microsoft\Driver Signing and \Software\Microsoft\Non-Driver Signing to BIN:00.

  3. :

    • You’ll want to see the taskbar and notification area, so turn on topmost and turn off autohide by mounting NTUSER and editing \Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects2 to set the 9th byte so that bit 0 is off and bit 1 is on (0x7A will show the maximum information). Also, disable any other taskbar consolidation/manipulation programs such as PCMag’s TrayManager (maybe you got it before they started selling their utilities).
  4. :

    • Mount the SOFTWARE hive and add an auto-run entry to run a .BAT file on startup (for no reason, I called mine C:\t\j.BAT). Now you can easily get Windows to do things without having any direct input. Granted, it requires a reboot to another OS, modification of the batch file, and booting Windows again to make a change, but it’s better than having no way of doing anything in Windows whatsoever. ;-) (You can comment out stuff instead of just deleting them.) Add a command at the end of the batch file to reboot Windows, eg shutdown -t 10 -r. Don’t forget that or else you’ll end up having to press the reset button!

    • In your batch file (eg j.bat), perform certain actions like importing any .REG files (which you can edit offline, in another OS just like you can with your batch file). Have the batch file run Device Manager and maximize the window (with a tool such as Nircmd) to give yourself an opportunity to view the current state of the hardware. (Try using a command-line tool like QRes to set the resolution to the maximum your video driver—which may be the generic VGA adapter at this point—can do, eg 1024x768.) You can also re-register .DLL files to fix some problems, especially those related to Windows Update.

    • You don’t want the batch file to run quickly and crazily, so you’ll want to get a command-line tool that can pause for a given number of seconds in order to pause script execution—no, the pause command is no good since it requires pressing a key to continue. (I used a program I wrote years ago, but there are plenty available on the Internet, or just use a common hack.)

  5. :

    • Get a macro-recorder/scripting app like HotkeyMaster, WinMacro, MacroMaker, AutoHotkey, AutoIt!, etc. and configure it to perform whatever keyboard or mouse actions you need (this way you can “do” things in Windows without actually having any input devices available). You’ll want to configure it to detect certain windows or dialog boxes by title and/or class and/or control and perform certain mouse-clicks or key-presses accordingly. For example, you can have it automatically detect the driver confirmation dialogs and trigger a click on the Next or Continue buttons. (Make sure to set the macro app to run on startup instead of in the .BAT file to make sure that they are running by the time that Windows detects the hardware and starts prompting for drivers; alternately, have them run at the beginning of the batch file using the start command to avoid the batch file being blocked on them since they will not be quitting.)
  6. :

    • Ensure that all of the required system files are in place. Run (via the batch file) sfc /scannow. Make sure to have your Windows disc in the drive—assuming that Windows even has the CD/DVD drivers installed. You can also try manually copying any missing files while offline. For example, I copied all of the files from my last backup of XP, specifying to not overwrite files that exist. That way, any missing files were restored (especially in the following directories:

      • C:\Windows
      • C:\Windows\INF
      • C:\Windows\Driver Cache
      • C:\Windows\ServicePackFiles
      • C:\Windows\System32
      • C:\Windows\System32\dllcache
      • C:\Windows\System32\Drivers

      • (I also happened to restore the following non-hardware-installation related directories not long before it finally started working again. Coincidence? I don’t know.)

      • C:\Windows\Assembly
      • C:\Windows\Microsoft.NET
      • C:\Windows\WinSxS
      • C:\Windows\Help
      • C:\Windows\System32\WBEM

      • (You may actually want to delete or rename C:\Windows\System32\CatRoot*)

  7. :

    • Delete all of the .PNF files in C:\Windows\INF. Windows will rebuild them from the existing .INF files the next time it needs to install a driver (which at this point is still at every boot). This is similar to clearing the browser cache when a page isn’t displaying correctly, in order to ensure that you are getting and using the most up-to-date copy of the files.

    • As a last resort, get and use the Microsoft tool DEVCON to remove certain devices so that Windows can try installing the hardware from scratch. First however, you’ll want to run the command (via your batch file) DEVCON findall * > C:\t\devcon.log to dump a list of all of your hardware and their corresponding IDs. That way, you can compile a proper, and custom list of what hardware you want to remove. Devices of note to remove include the following:

      • "*ACPI*"
      • "USB\ROOT_HUB*"
      • "SERENUM\MOUSE*"
      • "*VEN_8086*"
      • "HID*"
      • "*TUNMP*"
      • "PCI\VEN_1102*"
      • "PCI\VEN_1033*"
      • "PCI\VEN_1011*"
      • "PCI\VEN_1186*"
      • "PCI\VEN_11AB*"
      • "PCI\VEN_1274*"
      • "PCI\VEN_5333*"

      • (These are the main, motherboard related devices such as processors, ports, buses, input devices, network cards, hard drives, and optical drives.)

As you can see, it’s (not surprisingly) a huge pain to get Windows running again if you plunk your system drive into a new system (read motherboard) and want to avoid having to reinstall. Having no method of input makes it very difficult, but not impossible. It takes a lot of time, effort, patience, tools, attention to detail, and caution, but it is possible, and the rewards (putting off a complete re-installation and thus losing who-knows how many thousands of customizations made over time) can be worth it.

Fortunately, I finally managed to get it working because I’m not ready to just up and reinstall. Now I can not only use Outlook Express again (and download and purge the 5,000 or so emails that had piled up in my accounts), but I can do some programming again in my installed copy of good old VS2003. (Not that I wasn’t getting used to Windows 7; in fact for a little while, I felt weird back in XP, but I’m feeling at home again, like moving into a dormitory for a year, then moving back into your bedroom at home.)

share|improve this answer

The wizard only pops up when no matching driver is in the system driver path. According to technet, you would have to modify HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\DevicePath offline to add the folder(s) containing your driver infs in order to auto search them prior to popping up the wizard.

It might be simpler to reinstall with all of the drivers integrated if that doesn't work.

share|improve this answer
That looked promising, but unfortunately the setting is already correct (%SystemRoot%\inf). In fact, the entries in CurrentVersion\Setup are also good (like DriverCachePath and Installation Sources). I have even made sure that the files in INF, DriverCache, and DLLCache are all present and accounted for. Windows should be able to find and install drivers (at least for the basic components, even if the video card or whatever were newer than Windows—it's not—so it didn't have a driver. I just can't seem to get Windows to detect and install drivers for the ports or input devices. – Synetech Jan 10 '11 at 15:55
Maybe you have not checked their ORDER? Read this. It seems like you have run into a similar problem. I believe you could fix it by mounting hive and by reordering DevicePath entries, and make Windows find keyboard and mouse first. (Feedback after 3 years ;) ) – Jet Nov 30 '14 at 16:35

For this issue, I added Teamviewer at startup, and installed missing hardware (/w keyboard and mouse) thorugh it.

share|improve this answer
That would require either having previously installed it before needing it, or else being able to use the keyboard and mouse to be able to install it. Either way, remote-access could be a good idea, but won’t help in a situation like this. – Synetech Apr 25 '11 at 3:28
@Synetech, Couldn't installing it automatically via a script work? – Pacerier Apr 18 '15 at 6:18

You must log in to answer this question.

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