Smart App Control is blocking the newly compiled unsigned C.exe; for local C development, turn Smart App Control off in Windows Security or sign every executable with a trusted code-signing certificate.
The policy ID in the message—{[GUID]}—is the Windows 11 VerifiedAndReputableDesktop policy used when Smart App Control is turned on.^1^
Turn off Smart App Control
- Open Settings.
- Go to Privacy & security → Windows Security → App & browser control.
- Select Smart App Control settings.
- Set Smart App Control to Off.
- Rebuild the program in VS Code, then run the newly generated
.exe.
Turning this off reduces protection against unsigned or untrusted applications. Microsoft documents that Smart App Control has no per-application bypass: the available choices are to disable it or use a valid signature. Recent Windows updates allow it to be enabled again through Windows Security.^2^
Do not use registry modifications or replace Code Integrity policy files for ordinary development. Those procedures are intended for controlled testing and can compromise the protection Smart App Control provides.^3^
Confirm the result if it remains blocked
Open:
Event Viewer → Applications and Services Logs → Microsoft → Windows → CodeIntegrity → Operational
Then rebuild and run the program. Smart App Control enforcement blocks are recorded as Event ID 3077. Check whether the event names the newly generated C.exe or another build tool or executable.^3^
If the event still shows the same Smart App Control policy after switching it off:
- Restart Windows.
- Delete only the old build output, such as
C.exe. - Recompile the source to produce a fresh executable.
- Run the new file.
Moving the project out of OneDrive may simplify build paths, but it does not resolve this specific signing-policy block. The event identifies the executable as failing the enforced trust requirement, not the folder as inaccessible.
Alternative: keep Smart App Control enabled
If Smart App Control must remain enabled, sign the generated executable with a valid certificate from a trusted certificate authority. Smart App Control first uses its security service to assess an application; when it cannot establish trust that way, an unsigned or invalidly signed application is blocked.^2^
That option is generally suited to software being distributed to other users, rather than temporary executables produced repeatedly while learning or debugging C.
If this is a school- or organization-managed computer and the setting cannot be changed, contact its administrator. Do not attempt to remove the Code Integrity policy manually.
References