Enabling Secure Boot via the Windows registry ensures your system boots only with signed, trusted firmware and operating system components, helping prevent rootkit malware. This method is only for advanced users who understand the risks of editing the registry; in most cases, Secure Boot should be enabled in UEFI/BIOS settings instead.

What You'll Need

  • A Windows 10 or Windows 11 computer with UEFI firmware (not legacy BIOS)
  • Administrator privileges on the local machine
  • Access to UEFI/BIOS setup (usually via F2, F10, Del, or Esc during startup)
  • Registry backup (recommended before making changes)

Step-by-Step

  1. Press Win + R to open the Run dialog, type regedit, and press Enter. When User Account Control prompts for permission, click Yes to run Registry Editor as administrator.
  2. Navigate to the following key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecureBoot\State. If the State subkey does not exist, right-click SecureBoot, choose New > Key, and name it State.
  3. Inside the State key, verify or create the following DWORD (32-bit) values. If a value already exists, double-click it to edit its data:
    • UEFISecureBootEnabled — Set to 1 (hexadecimal or decimal). This signals the OS that Secure Boot is enabled at the firmware level.
    • UEFIBaseOsSigning — Set to 1 to require signing of base operating system components.
    • UEFIVariableAccess — Set to 1 to allow access to UEFI variables required for Secure Boot.
  4. Next, navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecureBoot\UEFIPolicy. If this key does not exist, create it by right-clicking SecureBoot, selecting New > Key, and naming it UEFIPolicy.
  5. Inside UEFIPolicy, create or modify the following string values:
    • PK — Leave empty unless you are using custom keys (not recommended for general users).
    • KEK — Typically left blank. Contains key exchange keys if custom signing is used.
    • db — Contains allowed (authorized) signatures; leave blank unless using custom keys.
    • dbx — Contains revoked or blocked signatures; leave blank unless instructed otherwise.
  6. Close Registry Editor. Restart your computer.
  7. Before Windows loads, enter UEFI/BIOS setup (press the appropriate key during boot). Locate Secure Boot settings (often under Security or Boot tabs), and ensure Secure Boot is set to Enabled.
  8. Save changes and exit UEFI/BIOS. Windows should now boot with Secure Boot active. To verify, open Command Prompt as administrator and run msinfo32.exe. Under System Summary, confirm Secure Boot State shows On.

Common Mistakes

  • Editing registry values without first enabling Secure Boot in UEFI/BIOS — the OS registry alone cannot activate Secure Boot; firmware support is required.
  • Setting incorrect data types — always use DWORD (32-bit) for numeric values, not QWORD or String. Using REG_SZ instead of REG_DWORD can cause boot failures.
  • Modifying keys under HKEY_USERS or HKEY_CURRENT_USER — Secure Boot state is system-wide and must be configured under HKEY_LOCAL_MACHINE.
  • Ignoring driver signing enforcement — if Secure Boot is enabled but unsigned drivers are loaded, Windows may fail to boot. Use bcdedit /set testsigning off only if testing unsigned drivers, and disable it afterward.
  • Assuming registry edits alone are sufficient — always double-check UEFI/BIOS settings after registry changes.

Tips

  • Back up the registry before editing: In Registry Editor, go to File > Export, choose All under Export Range, and save the .reg file to a secure location.
  • Use the official Microsoft tool msinfo32 or PowerShell (Confirm-SecureBootUEFI) to verify Secure Boot status after changes.
  • If deploying to multiple machines, export the State and UEFIPolicy keys to a .reg file, then import on target systems — but always confirm UEFI/BIOS settings individually.
  • For enterprise environments, use Group Policy or MDT/SCCM to enforce Secure Boot policies rather than manual registry edits.
  • When in doubt, revert changes: delete the State and UEFIPolicy keys and reboot, then enable Secure Boot in UEFI/BIOS as usual.

Troubleshooting

If Secure Boot does not activate or the system fails to boot after registry changes:

  1. Boot into Windows Safe Mode (hold Shift while clicking Restart, then select Troubleshoot > Advanced Options > Startup Settings > Restart, followed by 4 or 5 to enable Safe Mode with Networking).
  2. Open Registry Editor and delete the State and UEFIPolicy keys under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecureBoot.
  3. Reboot normally and re-enter UEFI/BIOS to confirm Secure Boot is explicitly enabled (not Auto or Disallowed).
  4. Check for firmware updates from your motherboard or laptop manufacturer — outdated UEFI firmware may not fully support Secure Boot policies.
  5. Run sfc /scannow in Command Prompt (as admin) to repair corrupted system files that might interfere with Secure Boot validation.
  6. If Windows does not boot at all, use Windows Recovery Environment (accessed via forcing three power cycles during boot) to open Command Prompt and run:
    • bootrec /fixmbr
    • bootrec /fixboot
    • bootrec /rebuildbcd
  7. As a last resort, reset the UEFI/BIOS to default settings (often via a jumper or BIOS menu), then re-enable Secure Boot manually.

Frequently Asked Questions

Can I enable Secure Boot without entering UEFI/BIOS?

No. The registry key only reports or stores the Secure Boot state — it cannot override firmware settings. Secure Boot must be physically enabled in UEFI/BIOS.

Does editing the registry key affect Windows updates?

Not directly. However, if Secure Boot is disabled in UEFI/BIOS but set to 1 in the registry, Windows may display warnings or fail to install major updates that require Secure Boot compliance.

Is it safe to modify Secure Boot registry keys?

Only if you understand the purpose of each value. Incorrect values (especially under UEFIPolicy) can block Windows booting. For most users, modifying keys under State is unnecessary; use UEFI/BIOS instead.

Why does Secure Boot show as Off even after enabling it in BIOS?

Common causes include: Legacy Boot mode is enabled instead of UEFI; CSM (Compatibility Support Module) is turned on; or the OS installer was not UEFI-compatible. Reinstall Windows using UEFI mode, or convert the disk to GPT if it is currently MBR.

Can I use custom Secure Boot keys via the registry?

Yes, but Advanced users only. Custom keys require placing PK, KEK, and db data in the registry under UEFIPolicy in binary format. This is rarely needed on consumer systems and may void warranties or break OS support.

Does Secure Boot prevent malware?

It significantly reduces the risk of bootkit and rootkit infections by ensuring only signed code runs during startup. It does not protect against all malware — keep antivirus, updates, and safe browsing habits in place.