Files
qt5/coin/pre-provisioning/qtci-windows-11_21H2-x86_64/disable-smart-app-control.ps1
Toni Saario 15766a4132 Add Pre-provisioning task to Disable Windows smart app control
Smart app control(SAC) is a new feature in Windows 11 which
makes some installations extremely slow.
For example dotnet sdk takes 45 minutes to install with smart
app control and under a minute without it.

Reason why smart app control is so slow is that is tries to use
Windows defender and it is unable to connect to it as it is disabled.

At the moment it seems like it is not possible to disable the SAC
from shell effectively in provisioning. Registry edit does not
have immediate effect and forcing security service restarts cause
forced reboot. Only disabling it manually from settings will
have the desired effect.

Change-Id: I8c4ca7b87f31a13009ea02ab3186d9cdbc570272
Reviewed-by: Simo Fält <simo.falt@qt.io>
2024-06-08 19:03:08 +03:00

5 lines
366 B
PowerShell

# Disable Smart app control
# Smart app control makes installations extremely slow after defender is disabled.
reg.exe ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CI\Policy" /V VerifiedAndReputablePolicyState /T REG_dWORD /D 0 /F
# Verify: Settings -> Privacy & security -> Windows security -> App & browser control -> Smart App Control settings -> Off