FileRisk: Do not touch
SYSTEM C:\Windows\System32\config\SYSTEM
Registry hive HKLM\SYSTEM: control sets, services, drivers and hardware configuration needed to boot.
What it’s for
SYSTEM is the registry hive Windows loads first at startup, under HKEY_LOCAL_MACHINE\SYSTEM. The loader (winload) reads the list of boot drivers from it before the kernel is even running. The rules common to every hive (locking, reg save, never touching the file) are on the config folder page; this one keeps only what sets SYSTEM apart.
What it contains
- The control sets
ControlSet001,ControlSet002and so on.CurrentControlSetis only a link to the active one; theSelectkey tells you which (Current,Default,Failed,LastKnownGood). Services: one key per service and driver, withImagePathandStart(0 for a boot driver, 2 for automatic start, 3 manual, 4 disabled).- Detected hardware, load order and boot configuration.
- Alongside, the transaction files
SYSTEM.LOG1andSYSTEM.LOG2.
Risks and best practices
- A missing or corrupted
SYSTEMblocks startup with “Windows failed to start because the following file is missing or corrupt:\WINDOWS\SYSTEM32\CONFIG\SYSTEM”. Repair from WinRE or restore a system state backup. - From WinRE you can also mount the hive offline to fix a driver that prevents booting:
reg load HKLM\OFFSYSTEM D:\Windows\System32\config\SYSTEM, change theStartvalue of the faulty service underControlSet001\Services, thenreg unload HKLM\OFFSYSTEM. Skip thereg unloadand the hive stays locked. - Together with the
SAMhive, an offline copy ofSYSTEMprovides the boot key that decrypts local password hashes: protect it like an account backup.
Useful commands
# Control set active at startup (Current, Default, Failed, LastKnownGood)Get-ItemProperty 'HKLM:\SYSTEM\Select'
# Boot drivers (Start = 0) and their fileGet-ChildItem HKLM:\SYSTEM\CurrentControlSet\Services | Get-ItemProperty | Where-Object Start -eq 0 | Select-Object PSChildName, ImagePath
# Offline copy of the hive (as administrator)reg save HKLM\SYSTEM "$env:TEMP\system.hiv"