Windows 11 Smart App Control blocks cargo build scripts: build-script-build never executed (os error 4551) #2972

Open
opened 2026-11-29 19:13:35 +00:00 by github-bot · 1 comment
Owner

@⁠Tanju42 on GitHub · 2026-11-29 19:08 UTC · original

Symptom (cargo on Windows 11, fresh cargo build --profile diag -p victory after a large upstream merge wave):

error: failed to run custom build command for `victory-shader v0.1.0`
Caused by:
  could not execute process `C:\minivi\target\diag\build\victory-shader-909c034ebc93bfd5\build-script-build` (never executed)
Caused by:
  Eine Anwendungssteuerungsrichtlinie hat diese Datei blockiert. (os error 4551)

(English Windows shows: "An application control policy prevented this file from running." / ERROR_ACCESS_DISABLED_BY_POLICY_OTHER)

Diagnosis: this is Windows 11 Smart App Control (Settings > Privacy & security > Windows Security > App & browser control > Smart App Control settings) blocking freshly compiled, unsigned build scripts by reputation - not Defender, not a code problem. Get-MpComputerStatus shows SmartAppControlState: On.

Evidence it is SAC and not our build: the SAME commit compiled cleanly within minutes after turning SAC off (exit 0, 3m22s). SAC's verdicts are reputation-based and time-varying - the same repo built three times earlier the same day, then started blocking every new build-script hash after a large dependency churn. SAC cannot be disabled programmatically or via GPO by design; the toggle is GUI-only and one-way (re-enabling requires a Windows reinstall).

Suggestion: add this exact error string to a Windows build-troubleshooting doc so 8 GB laptop tinkerers (who are exactly the people most likely to have SAC still enabled on a fresh Win11 install) don't lose an afternoon, and keep pushing prebuilt signed release binaries as the recommended path for non-builders.

**@⁠Tanju42** on GitHub · 2026-11-29 19:08 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2972) Symptom (cargo on Windows 11, fresh `cargo build --profile diag -p victory` after a large upstream merge wave): ``` error: failed to run custom build command for `victory-shader v0.1.0` Caused by: could not execute process `C:\minivi\target\diag\build\victory-shader-909c034ebc93bfd5\build-script-build` (never executed) Caused by: Eine Anwendungssteuerungsrichtlinie hat diese Datei blockiert. (os error 4551) ``` (English Windows shows: "An application control policy prevented this file from running." / ERROR_ACCESS_DISABLED_BY_POLICY_OTHER) Diagnosis: this is Windows 11 **Smart App Control** (Settings > Privacy & security > Windows Security > App & browser control > Smart App Control settings) blocking freshly compiled, unsigned build scripts by reputation - not Defender, not a code problem. `Get-MpComputerStatus` shows `SmartAppControlState: On`. Evidence it is SAC and not our build: the SAME commit compiled cleanly within minutes after turning SAC off (exit 0, 3m22s). SAC's verdicts are reputation-based and time-varying - the same repo built three times earlier the same day, then started blocking every new build-script hash after a large dependency churn. SAC cannot be disabled programmatically or via GPO by design; the toggle is GUI-only and one-way (re-enabling requires a Windows reinstall). Suggestion: add this exact error string to a Windows build-troubleshooting doc so 8 GB laptop tinkerers (who are exactly the people most likely to have SAC still enabled on a fresh Win11 install) don't lose an afternoon, and keep pushing prebuilt signed release binaries as the recommended path for non-builders.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 19:13:35 +00:00
Author
Owner

@⁠github-actions[bot] on GitHub · 2026-11-29 19:08 UTC · original

Please attach both logs from the run that went wrong. Without them we can only guess. Paste %LOCALAPPDATA% into the address bar of File Explorer to get there.

  1. The play log, in %LOCALAPPDATA%\victory\logs\: the newest victory-nvidia-play-<date>-<time>-<number>.log (from victory.exe) or victory-nvidia-<date>-<time>.log (from the script launcher). The window shows its path at the start, on the line Log: ....
  2. The crash log: %LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, and, if there is one from that run, the newest victory-<date>-<time>-<number>.crash.log in %LOCALAPPDATA%\VIctory\data\7952987A\temp\.

Also say which GPU, Windows version (10 or 11)

**@⁠github-actions[bot]** on GitHub · 2026-11-29 19:08 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2972#issuecomment-7261046044) Please attach both logs from the run that went wrong. Without them we can only guess. Paste `%LOCALAPPDATA%` into the address bar of File Explorer to get there. 1. The play log, in `%LOCALAPPDATA%\victory\logs\`: the newest `victory-nvidia-play-<date>-<time>-<number>.log` (from `victory.exe`) or `victory-nvidia-<date>-<time>.log` (from the script launcher). The window shows its path at the start, on the line `Log: ...`. 2. The crash log: `%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log`, and, if there is one from that run, the newest `victory-<date>-<time>-<number>.crash.log` in `%LOCALAPPDATA%\VIctory\data\7952987A\temp\`. Also say which GPU, Windows version (10 or 11)
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA#2972
No description provided.