Skip to content

Commit

Permalink
Removed Smart Screen script (I'll work on it later)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShivamXD6 committed Nov 13, 2024
1 parent def9043 commit 3fe14f5
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 55 deletions.
27 changes: 0 additions & 27 deletions Add-More-Features.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -230,33 +230,6 @@ shutdown /r /f /t 1
"@
Create-File -fileContent $Defender -fileName 'Enable - Defender.cmd' -fileDirectory $securityPath

# Toggle Smart Screen
$smartScreen = @"
@echo off & reg query "HKU\S-1-5-19" >nul 2>&1
if %errorLevel% neq 0 (
echo Please Run as Administrator.
pause & exit
)
set reg1="HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer"
set reg2="HKLM\SOFTWARE\Policies\Microsoft\Windows Defender"
set reg3="HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\MpEngine"
set reg4="HKLM\SOFTWARE\Policies\Microsoft\Windows Defender Security Center\App and Browser protection"
if "%~n0"=="Enable - Smart Screen" (
reg add %reg1% /v "SmartScreenEnabled" /t REG_SZ /d "Warn" /f
reg add %reg2% /v "PUAProtection" /t REG_DWORD /d 1 /f
reg add %reg3% /v "MpEnablePus" /t REG_DWORD /d 1 /f
reg delete %reg4% /v "UILockdown" /f
ren "%~dpnx0" "Disable - Smart Screen.cmd"
) else (
reg add %reg1% /v "SmartScreenEnabled" /t REG_SZ /d "Off" /f
reg add %reg2% /v "PUAProtection" /t REG_DWORD /d 0 /f
reg add %reg3% /v "MpEnablePus" /t REG_DWORD /d 0 /f
reg add %reg4% /v "UILockdown" /t REG_DWORD /d 1 /f
ren "%~dpnx0" "Enable - Smart Screen.cmd"
)
"@
Create-File -fileContent $smartScreen -fileName 'Enable - Smart Screen.cmd' -fileDirectory $securityPath

# Toggle Core Isolation
$coreIsolation = @"
@echo off & reg query "HKU\S-1-5-19" >nul 2>&1
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
- Everything which have "*" are only available in Add More Features Script. Not available by default to make folder less cluttered.

#### 🔐 **Security**
- 🛡️ Toggle Windows Defender, SmartScreen and Core Isolation
- 🛡️ Toggle Windows Defender and Core Isolation
- 🛡️ *Toggle Unused Security Pages

#### 📦 **Software**
Expand Down
27 changes: 0 additions & 27 deletions ventoy/autounattend.xml
Original file line number Diff line number Diff line change
Expand Up @@ -615,30 +615,6 @@ shutdown /r /f /t 1
"@
Create-File -fileContent $Defender -fileName 'Disable - Defender.cmd' -fileDirectory $securityPath
# Toggle Smart Screen
$smartScreen = @"
@echo off & reg query "HKU\S-1-5-19" >nul 2>&1
if %errorLevel% neq 0 (
echo Please Run as Administrator.
pause & exit
)
set reg1="HKLM\SOFTWARE\Policies\Microsoft\Windows Defender"
set reg2="HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\MpEngine"
set reg3="HKLM\SOFTWARE\Policies\Microsoft\Windows Defender Security Center\App and Browser protection"
if "%~n0"=="Enable - Smart Screen" (
reg add %reg1% /v "PUAProtection" /t REG_DWORD /d 1 /f
reg add %reg2% /v "MpEnablePus" /t REG_DWORD /d 1 /f
reg delete %reg3% /v "UILockdown" /f
ren "%~dpnx0" "Disable - Smart Screen.cmd"
) else (
reg add %reg1% /v "PUAProtection" /t REG_DWORD /d 0 /f
reg add %reg2% /v "MpEnablePus" /t REG_DWORD /d 0 /f
reg add %reg3% /v "UILockdown" /t REG_DWORD /d 1 /f
ren "%~dpnx0" "Enable - Smart Screen.cmd"
)
"@
Create-File -fileContent $smartScreen -fileName 'Enable - Smart Screen.cmd' -fileDirectory $securityPath
# Toggle Core Isolation
$coreIsolation = @"
@echo off & reg query "HKU\S-1-5-19" >nul 2>&1
Expand Down Expand Up @@ -1099,9 +1075,6 @@ reg add "HKLM\SOFTWARE\Microsoft\Windows Defender\Spynet" /v SubmitSamplesConsen
:: Disable Smart Screen (Fixes Slow App Loading in Windows 11)
reg add "HKLM\SYSTEM\CurrentControlSet\Control\CI\Policy" /v "VerifiedAndReputablePolicyState" /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v "PUAProtection" /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\MpEngine" /v "MpEnablePus" /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender Security Center\App and Browser protection" /v "UILockdown" /t REG_DWORD /d 1 /f
:: Disable Reserved Storage
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\ReserveManager" /v "ShippedWithReserves" /t REG_DWORD /d 0 /f
Expand Down

0 comments on commit 3fe14f5

Please sign in to comment.