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>
This commit is contained in:
Toni Saario 2024-05-23 10:14:41 +03:00
parent 30443436c4
commit 15766a4132
4 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,4 @@
# 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

View File

@ -0,0 +1,4 @@
# 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

View File

@ -0,0 +1,4 @@
# 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

View File

@ -0,0 +1,4 @@
# 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