A Windows 11 utility for repairing inaccessible or greyed-out Memory Integrity and Kernel-mode Hardware-enforced Stack Protection settings.
Warning
This application changes system-wide Windows security configuration. An incorrect or unsupported configuration can cause instability, a blue screen, or a boot loop. Create a restore point or system backup first, run the driver scan, and do not force-enable a feature on unsupported hardware unless you understand the risk.
Windows Security Patcher provides direct controls for security settings that can become unavailable through the standard Windows Security interface. It can:
- Enable or disable Memory Integrity (HVCI).
- Enable or disable Kernel-mode Hardware-enforced Stack Protection (KSHSP).
- Check the Windows driver store for known driver patterns that may conflict with HVCI or KSHSP.
- Perform Windows, Windows Security app, and CPU compatibility checks before applying changes.
- Display an in-app activity log for audits and configuration changes.
This is an unofficial third-party utility and is not affiliated with or endorsed by Microsoft.
- Windows 11 22H2 or newer (build
22621or later). - Windows Security app version
1000.25330.0.9000or newer. - .NET Framework 4.8.
- An administrator account and elevated execution.
- Compatible CPU, firmware settings, and drivers for the feature being enabled.
- A restart after changing either security feature.
The built-in KSHSP hardware check recognizes supported families including AMD Zen 3 through Zen 5 and modern Intel Core, Core Ultra, Xeon, Atom, Pentium, and Celeron models. The check is a safeguard, not a guarantee of compatibility.
- Create a Windows restore point or another known-good backup.
- Right-click
Windows Security Patcher.exeand select Run as administrator. - Read and accept the authorization notice.
- Select Scan System for Driver Conflicts and review any flagged drivers.
- Choose the action you need:
- Enable Memory Integrity
- Disable Memory Integrity
- Enable Kernel Stack Protection
- Disable Kernel Stack Protection
- Confirm the requested action and review the in-app log.
- Restart Windows to apply the new configuration.
KSHSP depends on Memory Integrity. When enabling both features:
- Enable Memory Integrity.
- Restart Windows.
- Reopen the patcher as administrator.
- Enable Kernel Stack Protection.
- Restart Windows again.
The patcher sets Enabled DWORD values under these system registry paths:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\KernelShadowStacks
For KSHSP, it also updates the following policy value:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DeviceGuard
HvcicpKernelModeHardwareEnforcedStackProtection
Enabling a feature writes 1; disabling it writes 0. Changes do not fully take effect until Windows restarts.
The audit runs Get-WindowsDriver -Online -All, examines non-inbox drivers, and flags filenames matching a small list of known problematic patterns. It currently looks for patterns associated with:
- Western Digital (
wdcsam) - VirtualBox (
vbox) - Samsung USB drivers (
ssud) - Logitech Gaming Software (
lgcore) - ENE components (
ene) - GIGABYTE utilities (
gio) ngmsvsdrivers
The scan is heuristic: it may report false positives, and it cannot guarantee that every incompatible or hidden driver will be found.
- Visual Studio 2022 with the .NET desktop development workload.
- .NET Framework 4.8 Developer Pack.
- NuGet package restore enabled.
-
Clone the repository:
git clone https://github.com/AC-Storm-YT/windowssecuritypatcher.git cd windowssecuritypatcher
-
Open
Windows Security Patcher.slnin Visual Studio. -
Restore the NuGet packages if Visual Studio does not restore them automatically.
-
Select the
Releaseconfiguration. -
Choose Build > Build Solution.
The compiled application will be written to:
Windows Security Patcher\bin\Release\
From a Visual Studio Developer PowerShell prompt:
nuget restore "Windows Security Patcher.sln"
msbuild "Windows Security Patcher.sln" /p:Configuration=Release /p:Platform="Any CPU"- MaterialSkin.2 — Material Design controls for Windows Forms.
- Fody — extensible build-time assembly weaving.
- Costura.Fody — embeds managed dependencies in the output assembly.
Windows Security Patcher.sln
Windows Security Patcher/
├── Form1.cs # Main UI, feature controls, and driver audit
├── Program.cs # Startup and operating-system checks
├── app.manifest # Windows execution-level configuration
├── packages.config # NuGet dependencies
└── Windows Security Patcher.csproj
Issues and pull requests are welcome. When reporting a compatibility problem, include your Windows build, Windows Security app version, CPU model, and the relevant in-app log output. Do not include private system or account information.
Use this software at your own risk. Security features exist to protect the operating system, and disabling or overriding them can reduce protection. The authors and contributors are not responsible for data loss, system instability, boot failure, reduced security, or other damage resulting from use of this project.