Skip to content

Instantly share code, notes, and snippets.

@femdiya
Created August 1, 2024 19:56
Show Gist options
  • Save femdiya/1791ffeee8a7841159059ec0dd067c20 to your computer and use it in GitHub Desktop.
Save femdiya/1791ffeee8a7841159059ec0dd067c20 to your computer and use it in GitHub Desktop.
@echo off
:: https://privacy.sexy — v0.13.5 — Thu, 01 Aug 2024 19:45:28 GMT
:: Ensure admin privileges
fltmc >nul 2>&1 || (
echo Administrator privileges are required.
PowerShell Start -Verb RunAs '%0' 2> nul || (
echo Right-click on the script and select "Run as administrator".
pause & exit 1
)
exit 0
)
:: Initialize environment
setlocal EnableExtensions DisableDelayedExpansion
:: Disable prevention of users and apps from accessing dangerous websites
echo --- Disable prevention of users and apps from accessing dangerous websites
PowerShell -ExecutionPolicy Unrestricted -Command "reg add 'HKLM\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\Network Protection' /v 'EnableNetworkProtection' /t 'REG_DWORD' /d '1' /f"
:: ----------------------------------------------------------
:: Pause the script to view the final state
pause
:: Restore previous environment settings
endlocal
:: Exit the script successfully
exit /b 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment