Make Windows boot lightning-fast

Plug and Play

The PnP manager initially knows of just one virtual device on your PC, and it's named 'root'. This is used by the Hardware Abstraction Layer to detect your main bus and everything directly connected to the motherboard. Any discovered hardware returns a vendor ID representing the manufacturer and a product ID that tells Windows what it is.

The PnP Manager then looks in the Registry under HKLM\System\CurrentControlSet\Enum to find a key where the hardware type, vendor and product ID match the device. The key should contain a value called 'Driver' which points to a particular Registry key under HKLM\ SYSTEM\ControlSet001\Control\ Class and a value called 'infpath' that points to the driver INF file in \Windows\Inf.

You can also ask Windows to record the drivers loaded during boot (run msconfig.exe, select the Boot tab, enable a Boot Log, restart and check '\Windows\Ntbtlog.txt'). Remove or re-install hardware you've added recently and update other drivers, in particular for your motherboard.

Eventually, the kernel continues the boot process by launching Session Manager ('smss.exe'). This use the Registry keys at or below HKLM\ System\CurrentControlSet\Session Manager to call functions. It'll run any programs defined at the BootExecute Registry Key, for instance. Normally this just launches 'autochk.exe' (the boot version of 'chkdsk.exe'), but other programs – and some viruses – will add themselves to the list.