Make Windows boot lightning-fast

The Windows Session Manager now creates a session that will allow programs to be run. Under Vista, session 0 is reserved for Windows services, and Session Manager creates a second session for programs. It then launches another core Windows component, the Windows Client-Server Runtime SubSystem ('\windows\system32\csrss.exe').

Session Manager's final initialisation step under XP is to launch the log-on process. This does much more than just logging on, though, starting a security process ('\Windows \System32\Lsass.exe') and launching the Service Control Manager ('\Windows\System\Services.exe'). Finally it checks HKKLM\Software\Microsoft\WindowsNT\ CurrentVersion\WinLogon\GinaDLL, using that DLL to log you on if one is specified or otherwise launching the default \Windows\System32\MSGINA.DLL.

Under Vista this changes a little. A new process called 'WinInit.exe' handles the security and Service Control Manager work, while the logon uses a much more flexible Credential Provider system. There can be more than one of these, and Session Manager checks the HKLM\Software\ Microsoft\Windows NT\Currentversion\Authentication\ Credential Providers to find out what it must launch.

The SCM starts by browsing the Registry at HKLM\System\CurrentControlSet\Control\ServiceGroupOrder\ List. This lists service groups in the order in which they should be loaded, so 'Primary Disk' comes before 'Boot File System', for instance (the PC can't manipulate a file system until it can access a disk). The SCM then scans your list of services (HKLM\SYSTEM\CurrentControlSet\Services), looking for 'DependOnGroup' and 'DependOnService' keys. A network-related service might have a DependOn Service entry of 'TcpIp', say, as the TCP/IP service must be loaded first. The SCM uses this data to determine the order in which services must be loaded, then initialises all services with a startup type of Automatic (that's a Start value of 2).

Once the SCM finishes loading your services, it waits for a signal from the Windows logon component to tell it that you've successfully logged on. If this happens, and all your autostart services have loaded without errors, then the current copy of HKLM\SYSTEM\CurrentControlSet is saved as the last known good confi guration, and will be used if you choose that option from the boot menu. Check the Registry key HKEY_LOCAL_MACHINE\SYSTEM\ Select to see the 'CurrentControlSet' copy you're using right now, and the one that's labelled as 'LastKnownGood'.