diff --git a/Perfect Windows/Start Optimize Windows.bat b/Perfect Windows/Start Optimize Windows.bat index 5efbbcf..0fc7a80 100644 --- a/Perfect Windows/Start Optimize Windows.bat +++ b/Perfect Windows/Start Optimize Windows.bat @@ -1,386 +1,403 @@ @echo off -setlocal enabledelayedexpansion cd /d "%~dp0" - -:: Enable color support -for /f "tokens=*" %%a in ('echo prompt $E^|cmd') do set "ESC=%%a" - -:: Set console properties chcp 65001 >nul 2>&1 -mode con lines=35 cols=140 -title Perfect Windows Optimizer - -:: Check for Administrator Privileges -net session >nul 2>&1 -if %errorlevel% neq 0 ( - echo %ESC%[91mThis script requires administrator privileges. Please run as administrator.%ESC%[0m - pause - exit /b 1 -) +mode con lines=30 cols=136 +setlocal enabledelayedexpansion +title Perfect Windows +call :Colors -:: Define color codes -call :SetColors +REM Check for Administrator Privileges +whoami /groups | findstr /i /c:"S-1-16-12288" >nul 2>&1 || (echo %BRIGHT_BLACK%To continue, run this tool as %DARK_RED%administrator%DARK_WHITE%. && pause && exit) -:MainMenu +REM Main Menu +:Main-Menu cls echo. -echo %CYAN%██████╗ ███████╗██████╗ ███████╗███████╗ ██████╗████████╗ ██╗ ██╗██╗███╗ ██╗██████╗ ██████╗ ██╗ ██╗███████╗ -echo %CYAN%██╔══██╗██╔════╝██╔══██╗██╔════╝██╔════╝██╔════╝╚══██╔══╝ ██║ ██║██║████╗ ██║██╔══██╗██╔═══██╗██║ ██║██╔════╝ -echo %CYAN%██████╔╝█████╗ ██████╔╝█████╗ █████╗ ██║ ██║ ██║ █╗ ██║██║██╔██╗ ██║██║ ██║██║ ██║██║ █╗ ██║███████╗ -echo %CYAN%██╔═══╝ ██╔══╝ ██╔══██╗██╔══╝ ██╔══╝ ██║ ██║ ██║███╗██║██║██║╚██╗██║██║ ██║██║ ██║██║███╗██║╚════██║ -echo %CYAN%██║ ███████╗██║ ██║██║ ███████╗╚██████╗ ██║ ╚███╔███╔╝██║██║ ╚████║██████╔╝╚██████╔╝╚███╔███╔╝███████║ -echo %CYAN%╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚══════╝ ╚═════╝ ╚═╝ ╚══╝╚══╝ ╚═╝╚═╝ ╚═══╝╚═════╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝ +echo %WHITE%███████%BRIGHT_RED%╗ %WHITE%██████%BRIGHT_RED%╗%WHITE%██████%BRIGHT_RED%╗ %WHITE%██%BRIGHT_RED%╗%WHITE%██████%BRIGHT_RED%╗ %WHITE%████████%BRIGHT_RED%╗ %WHITE%██████%BRIGHT_BLUE%╗ %WHITE%██%BRIGHT_BLUE%╗ %WHITE%██%BRIGHT_BLUE%╗ %WHITE%██%BRIGHT_CYAN%╗%WHITE%██%BRIGHT_CYAN%╗%WHITE%███████%BRIGHT_CYAN%╗%WHITE%██%BRIGHT_CYAN%╗ %WHITE%██%BRIGHT_CYAN%╗ +echo %WHITE%██%BRIGHT_RED%╔════╝%WHITE%██%BRIGHT_RED%╔════╝%WHITE%██%BRIGHT_RED%╔══%WHITE%██%BRIGHT_RED%╗%WHITE%██%BRIGHT_RED%║%WHITE%██%BRIGHT_RED%╔══%WHITE%██%BRIGHT_RED%╗╚══%WHITE%██%BRIGHT_RED%╔══╝ %WHITE%██%BRIGHT_BLUE%╔══%WHITE%██%BRIGHT_BLUE%╗╚%WHITE%██%BRIGHT_BLUE%╗ %WHITE%██%BRIGHT_BLUE%╔╝ %WHITE%██%BRIGHT_CYAN%║%WHITE%██%BRIGHT_CYAN%║%WHITE%██%BRIGHT_CYAN%╔════╝%WHITE%██%BRIGHT_CYAN%║ %WHITE%██%BRIGHT_CYAN%║ +echo %WHITE%███████%BRIGHT_RED%╗%WHITE%██%BRIGHT_RED%║ %WHITE%██████%BRIGHT_RED%╔╝%WHITE%██%BRIGHT_RED%║%WHITE%██████%BRIGHT_RED%╔╝ %WHITE%██%BRIGHT_RED%║ %WHITE%██████%BRIGHT_BLUE%╔╝ ╚%WHITE%████%BRIGHT_BLUE%╔╝ %WHITE%██%BRIGHT_CYAN%║%WHITE%██%BRIGHT_CYAN%║%WHITE%███████%BRIGHT_CYAN%╗%WHITE%██%BRIGHT_CYAN%║ %WHITE%██%BRIGHT_CYAN%║ +echo %BRIGHT_RED%╚════%WHITE%██%BRIGHT_RED%║%WHITE%██%BRIGHT_RED%║ %WHITE%██%BRIGHT_RED%╔══%WHITE%██%BRIGHT_RED%╗%WHITE%██%BRIGHT_RED%║%WHITE%██%BRIGHT_RED%╔═══╝ %WHITE%██%BRIGHT_RED%║ %WHITE%██%BRIGHT_BLUE%╔══%WHITE%██%BRIGHT_BLUE%╗ ╚%WHITE%██%BRIGHT_BLUE%╔╝ %WHITE%██ %WHITE%██%BRIGHT_CYAN%║%WHITE%██%BRIGHT_CYAN%║%BRIGHT_CYAN%╚════%WHITE%██%BRIGHT_CYAN%║%WHITE%██%BRIGHT_CYAN%║ %WHITE%██%BRIGHT_CYAN%║ +echo %WHITE%███████%BRIGHT_RED%║%BRIGHT_RED%╚%WHITE%██████%BRIGHT_RED%╗%WHITE%██%BRIGHT_RED%║ %WHITE%██%BRIGHT_RED%║%WHITE%██%BRIGHT_RED%║%WHITE%██%BRIGHT_RED%║ %WHITE%██%BRIGHT_RED%║ %WHITE%██████%BRIGHT_BLUE%╔╝ %WHITE%██%BRIGHT_BLUE%║ %BRIGHT_CYAN%╚%WHITE%█████%BRIGHT_CYAN%╔╝%WHITE%██%BRIGHT_CYAN%║%WHITE%███████%BRIGHT_CYAN%║%WHITE%███████%BRIGHT_CYAN%╗%WHITE%███████%BRIGHT_CYAN%╗ +echo %BRIGHT_RED%╚══════╝ ╚═════╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ %BRIGHT_BLUE%╚═════╝ ╚═╝ %BRIGHT_CYAN%╚════╝ ╚═╝╚══════╝╚══════╝╚══════╝ +echo ══════════════════════════════════════════════════════════════ +echo. %BRIGHT_BLACK%Twitter @Jisllos%WHITE% +echo %BRIGHT_BLUE%1%BRIGHT_WHITE%: Run Perfect Windows +echo %BRIGHT_BLUE%2%BRIGHT_WHITE%: Information +echo %BRIGHT_RED%E%BRIGHT_WHITE%: Exit echo. -echo %WHITE%═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════ -echo. %BRIGHT_BLACK%Twitter @Jisllos%WHITE% -echo %YELLOW%[1] %WHITE%Run All Optimizations -echo %YELLOW%[2] %WHITE%Manage Services -echo %YELLOW%[3] %WHITE%Clean Temporary Files -echo %YELLOW%[4] %WHITE%Optimize Privacy Settings -echo %YELLOW%[5] %WHITE%Disable Telemetry and Data Collection -echo %YELLOW%[6] %WHITE%Optimize System Performance -echo %YELLOW%[7] %WHITE%Disable System Mitigations (Advanced) -echo %YELLOW%[8] %WHITE%Information -echo %RED%[E] %WHITE%Exit -echo. -set /p "choice=%WHITE%Enter your choice: %YELLOW%" - -if "%choice%"=="1" goto :RunAllOptimizations -if "%choice%"=="2" goto :ManageServices -if "%choice%"=="3" goto :CleanTemp -if "%choice%"=="4" goto :OptimizePrivacy -if "%choice%"=="5" goto :DisableTelemetry -if "%choice%"=="6" goto :OptimizePerformance -if "%choice%"=="7" goto :DisableMitigations -if "%choice%"=="8" goto :Information -if /i "%choice%"=="E" exit /b -goto :MainMenu - -:RunAllOptimizations -call :ManageServices -call :CleanTemp -call :OptimizePrivacy -call :DisableTelemetry -call :OptimizePerformance -echo %GREEN%All optimizations have been applied. It's recommended to restart your computer.%WHITE% -pause -goto :MainMenu - -:ManageServices -cls -echo %CYAN%Managing Windows Services...%WHITE% - -:: Services to be set to Automatic -set "services_auto=AudioEndpointBuilder Audiosrv BITS BFE BluetoothUserService_dc2a4 BrokerInfrastructure Browser BthAvctpSvc BthHFSrv CaptureService_dc2a4 CDPUserSvc_dc2a4 COMSysApp CoreMessagingRegistrar CredentialEnrollmentManagerUserSvc_dc2a4 CryptSvc DPS Dhcp Dnscache DoSvc DsmSvc DusmSvc EapHost EventLog EventSystem FrameServer GraphicsPerfSvc HvHost IKEEXT LanmanServer LanmanWorkstation LicenseManager MMCSS MpsSvc NaturalAuthentication NgcCtnrSvc NgcSvc NlaSvc OneSyncSvc_dc2a4 ProfSvc Power PrintWorkflowUserSvc_dc2a4 RasAuto RasMan RemoteRegistry RpcEptMapper RpcLocator RpcSs SamSs Schedule SecurityHealthService SENS ShellHWDetection Spooler SSDPSRV SysMain TabletInputService Themes UsoSvc VGAuthService VMTools VSS WebClient WdiServiceHost WinDefend WlanSvc WpnUserService_dc2a4 XblAuthManager XboxNetApiSvc bthserv gpsvc iphlpsvc mpssvc nsi p2psvc perceptionsimulation sppsvc svsvc tzautoupdate vds webthreatdefusersvc_dc2a4 wscsvc" - -:: Services to be disabled -set "services_disabled=AJRouter AppVClient DiagTrack DialogBlockingService DistributedLinkTrackingService EdgeUpdate edgeupdatem embeddedmode hidserv shpamsvc spectrum ssh-agent uhssvc wercplsupport webthreatdefsvc wuauserv" - -:: Services to be set to Automatic (Delayed Start) -set "services_delayed=BITS DoSvc WSearch wscsvc" +set "choice=" +set /p choice=%DARK_WHITE%Choose an option to continue: !BRIGHT_BLUE! +if not defined choice goto :Main-Menu +call :Menu_[%choice%] 2>nul || (echo %BRIGHT_BLACK%Invalid choice, please try again.%DARK_WHITE% & pause) +goto :Main-Menu + +REM Option 1: Perfect Windows +:Menu_[1] Run Perfect Windows + +REM Services +set services_auto=AudioEndpointBuilder Audiosrv BITS BFE BluetoothUserService_dc2a4 BrokerInfrastructure Browser BthAvctpSvc BthHFSrv CaptureService_dc2a4 CDPUserSvc_dc2a4 COMSysApp CoreMessagingRegistrar CredentialEnrollmentManagerUserSvc_dc2a4 CryptSvc DPS Dhcp Dnscache DoSvc DsmSvc DusmSvc EapHost EventLog EventSystem FrameServer GraphicsPerfSvc HvHost IKEEXT LanmanServer LanmanWorkstation LicenseManager MMCSS MpsSvc NaturalAuthentication NgcCtnrSvc NgcSvc NlaSvc OneSyncSvc_dc2a4 ProfSvc Power PrintWorkflowUserSvc_dc2a4 RasAuto RasMan RemoteRegistry RpcEptMapper RpcLocator RpcSs SamSs Schedule SecurityHealthService SENS ShellHWDetection Spooler SSDPSRV SysMain TabletInputService Themes UsoSvc VGAuthService VMTools VSS WebClient WdiServiceHost WinDefend WlanSvc WpnUserService_dc2a4 XblAuthManager XboxNetApiSvc bthserv gpsvc iphlpsvc mpssvc nsi p2psvc perceptionsimulation sppsvc svsvc tzautoupdate vds webthreatdefusersvc_dc2a4 wscsvc +set services_disabled=AJRouter AppVClient DiagTrack DialogBlockingService DistributedLinkTrackingService EdgeUpdate edgeupdatem embeddedmode hidserv shpamsvc spectrum ssh-agent uhssvc wercplsupport webthreatdefsvc wuauserv +set services_autodelay=BITS DoSvc WSearch wscsvc + +echo !BRIGHT_WHITE!Adjusting Service Settings... +echo !BRIGHT_WHITE!Setting All Services to Manual: +for /f "tokens=1,2" %%a in ('sc query state^= all ^| find "SERVICE_NAME:"') do ( + echo !DARK_YELLOW!Configuring %%b to start manually... + sc config "%%b" start= demand + echo Successfully set %%b to Manual +) -echo %WHITE%Setting services to Automatic... +echo !BRIGHT_WHITE!Setting Important Services to Automatic: for %%s in (%services_auto%) do ( - sc query "%%s" >nul 2>&1 - if %errorlevel% equ 0 ( - sc config "%%s" start= auto - sc start "%%s" >nul 2>&1 - if %errorlevel% equ 0 ( - echo Set %%s to Automatic - ) else ( - echo Failed to start %%s - ) - ) else ( - echo Service %%s does not exist. - ) + echo !DARK_BLUE!Configuring %%s to start automatically... + sc config "%%s" start= auto + echo Successfully set %%s to Automatic ) -echo. -echo %WHITE%Setting services to Disabled... -for %%s in (%services_disabled%) do ( - sc query "%%s" >nul 2>&1 - if %errorlevel% equ 0 ( - sc config "%%s" start= disabled - sc stop "%%s" >nul 2>&1 - if %errorlevel% equ 0 ( - echo Disabled %%s - ) else ( - echo Failed to stop %%s - ) - ) else ( - echo Service %%s does not exist. - ) +echo !BRIGHT_WHITE!Setting AutomaticDelayedStart Services: +for %%s in (%services_autodelay%) do ( + echo !DARK_GREEN!Configuring %%s to start automatically with delay... + sc config "%%s" start= delayed-auto + echo Successfully set %%s to AutomaticDelayedStart ) -echo. -echo %WHITE%Setting services to Automatic (Delayed Start)... -for %%s in (%services_delayed%) do ( - sc query "%%s" >nul 2>&1 +echo !BRIGHT_WHITE!Setting Disabled Services: +for %%s in (%services_disabled%) do ( + echo !DARK_RED!Disabling %%s... + sc config "%%s" start= disabled + echo Successfully set %%s to Disabled +) +echo !BRIGHT_WHITE!All service settings have been successfully adjusted. + +REM Disable Scheduled Tasks +echo !BRIGHT_WHITE!Disable Scheduled Tasks +schtasks /change /tn "Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" /disable +schtasks /change /tn "Microsoft\Windows\Application Experience\ProgramDataUpdater" /disable +schtasks /change /tn "Microsoft\Windows\Autochk\Proxy" /disable +schtasks /change /tn "Microsoft\Windows\Customer Experience Improvement Program\Consolidator" /disable +schtasks /change /tn "Microsoft\Windows\Customer Experience Improvement Program\UsbCeip" /disable +schtasks /change /tn "Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticDataCollector" /disable +schtasks /change /tn "Microsoft\Windows\Feedback\Siuf\DmClient" /disable +schtasks /change /tn "Microsoft\Windows\Feedback\Siuf\DmClientOnScenarioDownload" /disable +schtasks /change /tn "Microsoft\Windows\Windows Error Reporting\QueueReporting" /disable +schtasks /change /tn "Microsoft\Windows\Application Experience\MareBackup" /disable +schtasks /change /tn "Microsoft\Windows\Application Experience\StartupAppTask" /disable +schtasks /change /tn "Microsoft\Windows\Application Experience\PcaPatchDbTask" /disable +schtasks /change /tn "Microsoft\Windows\Maps\MapsUpdateTask" /disable + +REM Disable Telemetry via Registry +echo !BRIGHT_WHITE!Disable Telemetry via Registry +reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection" /v AllowTelemetry /t REG_DWORD /d "0" /f +reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v AllowTelemetry /t REG_DWORD /d "0" /f +reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v ContentDeliveryAllowed /t REG_DWORD /d "0" /f +reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v OemPreInstalledAppsEnabled /t REG_DWORD /d "0" /f +reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v PreInstalledAppsEnabled /t REG_DWORD /d "0" /f +reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v PreInstalledAppsEverEnabled /t REG_DWORD /d "0" /f +reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v SilentInstalledAppsEnabled /t REG_DWORD /d "0" /f +reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v SubscribedContent-338387Enabled /t REG_DWORD /d "0" /f +reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v SubscribedContent-338388Enabled /t REG_DWORD /d "0" /f +reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v SubscribedContent-338389Enabled /t REG_DWORD /d "0" /f +reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v SubscribedContent-353698Enabled /t REG_DWORD /d "0" /f +reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v SystemPaneSuggestionsEnabled /t REG_DWORD /d "0" /f +reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\CloudContent" /v DisableWindowsConsumerFeatures /t REG_DWORD /d "1" /f +reg add "HKCU\SOFTWARE\Microsoft\Siuf\Rules" /v "NumberOfSIUFInPeriod" /t REG_DWORD /d "0" /f +reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v DoNotShowFeedbackNotifications /t REG_DWORD /d "1" /f +reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows\CloudContent" /v DisableTailoredExperiencesWithDiagnosticData /t REG_DWORD /d "1" /f +reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo" /v DisabledByGroupPolicy /t REG_DWORD /d "1" /f +reg add "HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting" /v Disabled /t REG_DWORD /d "1" /f +reg add "HKLM\SYSTEM\CurrentControlSet\Control\Remote Assistance" /v fAllowToGetHelp /t REG_DWORD /d "0" /f +reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\OperationStatusManager" /v EnthusiastMode /t REG_DWORD /d "1" /f +reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ShowTaskViewButton /t REG_DWORD /d "0" /f +reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People" /v PeopleBand /t REG_DWORD /d "0" /f +reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v LaunchTo /t REG_DWORD /d "1" /f +reg add "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v LongPathsEnabled /t REG_DWORD /d "1" /f +reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DriverSearching" /v SearchOrderConfig /t REG_DWORD /d "1" /f +reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" /v SystemResponsiveness /t REG_DWORD /d "0" /f +reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" /v NetworkThrottlingIndex /t REG_DWORD /d "4294967295" /f +reg add "HKCU\Control Panel\Desktop" /v MenuShowDelay /t REG_DWORD /d "1" /f +reg add "HKCU\Control Panel\Desktop" /v AutoEndTasks /t REG_DWORD /d "1" /f +reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v ClearPageFileAtShutdown /t REG_DWORD /d "0" /f +reg add "HKLM\SYSTEM\ControlSet001\Services\Ndu" /v Start /t REG_DWORD /d "2" /f +reg add "HKCU\Control Panel\Mouse" /v MouseHoverTime /t REG_SZ /d "400" /f +reg add "HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" /v IRPStackSize /t REG_DWORD /d "30" /f +reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows\Windows Feeds" /v EnableFeeds /t REG_DWORD /d "0" /f +reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Feeds" /v ShellFeedsTaskbarViewMode /t REG_DWORD /d "2" /f +reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v HideSCAMeetNow /t REG_DWORD /d "1" /f +reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\Games" /v GPU Priority /t REG_DWORD /d "8" /f +reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\Games" /v Priority /t REG_DWORD /d "6" /f +reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\Games" /v Scheduling Category /t REG_SZ /d "High" /f + +REM Change boot menu policy to Legacy +echo !BRIGHT_WHITE!Changing boot menu policy to Legacy mode... +bcdedit /set {current} bootmenupolicy Legacy +echo !BRIGHT_WHITE!Boot menu policy has been successfully changed to Legacy mode. + +REM Check Windows version before executing additional commands +echo !BRIGHT_WHITE!Check Windows version before executing additional commands... +ver | find "Version 10.0." > nul +if errorlevel 1 goto :eof + +REM Modify Task Manager settings for Windows versions older than 22557 +echo !BRIGHT_WHITE!Modify Task Manager settings for Windows versions older than 22557... +set taskmgr="" +for /f "tokens=2 delims= " %%v in ('reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\TaskManager" /v Preferences ^| find Preferences') do set taskmgr=%%v +if %taskmgr% lss 22557 ( + start "" /min taskmgr.exe + :loop + ping -n 1 127.0.0.1 > nul + reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\TaskManager" /v Preferences > nul 2>&1 if %errorlevel% equ 0 ( - sc config "%%s" start= delayed-auto - echo Set %%s to Automatic (Delayed Start) + taskkill /f /im taskmgr.exe + reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\TaskManager" /v Preferences /t REG_BINARY /d 0 /f ) else ( - echo Service %%s does not exist. + goto loop ) ) -echo. -echo %GREEN%Services have been optimized.%WHITE% -pause -goto :MainMenu - -:CleanTemp -cls -echo %CYAN%Cleaning Temporary Files...%WHITE% - -:: Define log file -set "logFile=%~dp0cleanup_log.txt" -echo [%date% %time%] Cleaning Temporary Files >> "%logFile%" - -:: Function to clean directories -call :CleanDirectory "C:\Windows\Temp" "%logFile%" -call :CleanDirectory "%TEMP%" "%logFile%" -call :CleanDirectory "C:\Windows\Prefetch" "%logFile%" -call :CleanDirectory "C:\Windows\SoftwareDistribution" "%logFile%" -call :CleanDirectory "%SystemDrive%\$Recycle.Bin" "%logFile%" - -:: Stop and start Windows Update service for SoftwareDistribution -echo [%date% %time%] Stopping Windows Update Service >> "%logFile%" -net stop wuauserv >nul 2>&1 -echo [%date% %time%] Starting Windows Update Service >> "%logFile%" -net start wuauserv >nul 2>&1 - -:: Clean Windows.old if it exists -if exist C:\Windows.old ( - echo [%date% %time%] Removing Windows.old >> "%logFile%" - rd /s /q C:\Windows.old >> "%logFile%" 2>&1 -) +REM Group svchost.exe processes +echo !BRIGHT_WHITE!Group svchost.exe processes... +for /f "tokens=1,2,*" %%a in ('wmic memorychip get capacity ^| find /i " " ^| find "."') do set ram=%%c +reg add "HKLM\SYSTEM\CurrentControlSet\Control" /v SvcHostSplitThresholdInKB /t REG_DWORD /d %ram% /f -:: Clear Event Logs -echo [%date% %time%] Clearing Event Logs >> "%logFile%" -for /F "tokens=*" %%G in ('wevtutil el') do ( - wevtutil cl "%%G" >nul 2>&1 - echo Cleared %%G +REM Delete AutoLogger-Diagtrack-Listener.etl and deny permissions +echo !BRIGHT_WHITE!Delete AutoLogger-Diagtrack-Listener.etl and deny permissions... +set "autoLoggerDir=%PROGRAMDATA%\Microsoft\Diagnosis\ETLLogs\AutoLogger" +if exist "%autoLoggerDir%\AutoLogger-Diagtrack-Listener.etl" ( + del "%autoLoggerDir%\AutoLogger-Diagtrack-Listener.etl" ) +icacls "%autoLoggerDir%" /deny SYSTEM:(OI)(CI)F +:continue + +REM Disable Wi-Fi Sense +echo !BRIGHT_WHITE!Disable Wi-Fi Sense +reg add "HKLM\Software\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting" /v Value /t REG_DWORD /d 0 /f +reg add "HKLM\Software\Microsoft\PolicyManager\default\WiFi\AllowAutoConnectToWiFiSenseHotspots" /v Value /t REG_DWORD /d 0 /f + +REM Disable Activity Feed +echo !BRIGHT_WHITE!Disable Activity Feed +reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v EnableActivityFeed /t REG_DWORD /d 0 /f +reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v PublishUserActivities /t REG_DWORD /d 0 /f +reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v UploadUserActivities /t REG_DWORD /d 0 /f + +REM Delete Temporary Files +echo !BRIGHT_WHITE!Delete Temporary Files +rd /s /q C:\Windows\Temp +rd /s /q %TEMP% +rd /s /q C:\Windows\Prefetch +del /q /s /f "%LocalAppData%\Microsoft\Windows\INetCache\*.*" > nul +rd /s /q %LocalAppData%\Microsoft\Windows\INetCache +rd /s /q %SystemDrive%\$Recycle.Bin +net stop wuauserv +rd /s /q C:\Windows\SoftwareDistribution +net start wuauserv +for /F "tokens=*" %%G in ('wevtutil el') do (wevtutil cl "%%G") +rd /s /q C:\ProgramData\Microsoft\Windows\WER\ReportQueue +rd /s /q C:\ProgramData\Microsoft\Windows\WER\ReportArchive +rd /s /q C:\Windows.old +rd /s /q %LocalAppData%\DirectX Shader Cache +del /f /s /q /a %LocalAppData%\Microsoft\Windows\Explorer\thumbcache_*.db + +REM Deny location access +echo !BRIGHT_WHITE!Deny location access +reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location" /v Value /t REG_SZ /d "Deny" /f +reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Sensor\Overrides\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}" /v SensorPermissionState /t REG_DWORD /d 0 /f +reg add "HKLM\SYSTEM\CurrentControlSet\Services\lfsvc\Service\Configuration" /v Status /t REG_DWORD /d 0 /f +reg add "HKLM\SYSTEM\Maps" /v AutoUpdateEnabled /t REG_DWORD /d 0 /f + +REM Stop HomeGroup Services +echo !BRIGHT_WHITE!Stop HomeGroup Services +net stop "HomeGroupListener" +net stop "HomeGroupProvider" +sc config HomeGroupListener start= demand +sc config HomeGroupProvider start= demand +reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\HomeGroup" /v DisableHomeGroup /t REG_DWORD /d 1 /f + +REM Disable Storage Sense +echo !BRIGHT_WHITE!Disable Storage Sense +reg delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy" /f + +REM Disable Hibernate +echo !BRIGHT_WHITE!Disable Hibernate +reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Power" /v HibernateEnabled /t REG_DWORD /d 0 /f +reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FlyoutMenuSettings" /v ShowHibernateOption /t REG_DWORD /d 0 /f +powercfg.exe /hibernate off + +REM Disable GameDVR +echo !BRIGHT_WHITE!Disable GameDVR +reg add "HKCU\System\GameConfigStore" /v GameDVR_FSEBehavior /t REG_DWORD /d 2 /f +reg add "HKCU\System\GameConfigStore" /v GameDVR_Enabled /t REG_DWORD /d 0 /f +reg add "HKCU\System\GameConfigStore" /v GameDVR_DXGIHonorFSEWindowsCompatible /t REG_DWORD /d 1 /f +reg add "HKCU\System\GameConfigStore" /v GameDVR_HonorUserFSEBehaviorMode /t REG_DWORD /d 1 /f +reg add "HKCU\System\GameConfigStore" /v GameDVR_EFSEFeatureFlags /t REG_DWORD /d 0 /f +reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\GameDVR" /v AllowGameDVR /t REG_DWORD /d 0 /f + +REM Disable Telemetry +echo !BRIGHT_WHITE!Disable Telemetry... +reg add "HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows\\DataCollection" /v AllowTelemetry /t REG_DWORD /d 0 /f + +REM Disable Compatibility Telemetry +echo !BRIGHT_WHITE!Disable Compatibility Telemetry... +reg add "HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows\\DataCollection" /v AllowTelemetry /t REG_DWORD /d 0 /f + +REM Disable Advertising ID +echo !BRIGHT_WHITE!Disable Advertising ID... +reg add "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\AdvertisingInfo" /v Enabled /t REG_DWORD /d 0 /f + +REM Disable Wi-Fi Sense +echo !BRIGHT_WHITE!Disable Wi-Fi Sense... +reg add "HKLM\\Software\\Microsoft\\PolicyManager\\default\\WiFi\\AllowWiFiHotSpotReporting" /v Value /t REG_DWORD /d 0 /f +reg add "HKLM\\Software\\Microsoft\\PolicyManager\\default\\WiFi\\AllowAutoConnectToWiFiSenseHotspots" /v Value /t REG_DWORD /d 0 /f + +REM Disable Diagnostic Data +echo !BRIGHT_WHITE!Disable Diagnostic Data... +reg add "HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows\\DataCollection" /v MaxTelemetryAllowed /t REG_DWORD /d 0 /f + +REM Disable Handwriting Data Sharing +echo !BRIGHT_WHITE!Disable Handwriting Data Sharing... +reg add "HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows\\HandwritingErrorReports" /v PreventHandwritingErrorReports /t REG_DWORD /d 1 /f + +REM Disable Windows Hello Biometrics +echo !BRIGHT_WHITE!Disable Windows Hello Biometrics... +reg add "HKLM\\SOFTWARE\\Policies\\Microsoft\\Biometrics" /v Enabled /t REG_DWORD /d 0 /f + +REM Disable Timeline Function +echo !BRIGHT_WHITE!Disable Timeline Function... +reg add "HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows\\System" /v EnableActivityFeed /t REG_DWORD /d 0 /f + +REM Disable Location Tracking +echo !BRIGHT_WHITE!Disable Location Tracking... +reg add "HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows\\LocationAndSensors" /v DisableLocation /t REG_DWORD /d 1 /f + +REM Disable Feedback Notifications +echo !BRIGHT_WHITE!Disable Feedback Notifications... +reg add "HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows\\DataCollection" /v DoNotShowFeedbackNotifications /t REG_DWORD /d 1 /f + +REM Disable Windows Tips +echo !BRIGHT_WHITE!Disable Windows Tips... +reg add "HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows\\CloudContent" /v DisableSoftLanding /t REG_DWORD /d 1 /f + +REM Disable Lock Screen Ads +echo !BRIGHT_WHITE!Disable Lock Screen Ads... +reg add "HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows\\Personalization" /v NoLockScreenCamera /t REG_DWORD /d 1 /f + +REM Disable Automatic Installation of Apps +echo !BRIGHT_WHITE!Disable Automatic Installation of Apps... +reg add "HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows\\CloudContent" /v DisableWindowsConsumerFeatures /t REG_DWORD /d 1 /f + +REM Disable Start Menu App Suggestions +echo !BRIGHT_WHITE!Disable Start Menu App Suggestions... +reg add "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\ContentDeliveryManager" /v SystemPaneSuggestionsEnabled /t REG_DWORD /d 0 /f + +REM Disable Setting App Ads +echo !BRIGHT_WHITE!Disable Setting App Ads... +reg add "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\ContentDeliveryManager" /v SubscribedContent-338393Enabled /t REG_DWORD /d 0 /f + +REM Disable Customer Experience Improvement Program +echo !BRIGHT_WHITE!Disable Customer Experience Improvement Program... +reg add "HKLM\\SOFTWARE\\Policies\\Microsoft\\SQMClient\\Windows" /v CEIPEnable /t REG_DWORD /d 0 /f + +REM Disable Help Experience Program +echo !BRIGHT_WHITE!Disable Help Experience Program... +reg add "HKLM\\SOFTWARE\\Policies\\Assist" /v NoImplicitFeedback /t REG_DWORD /d 1 /f + +REM Disable Experimental Features +echo !BRIGHT_WHITE!Disable Experimental Features... +reg add "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\FlightSettings" /v UserPreferredRedirectStage /t REG_DWORD /d 0 /f + +REM Disable Inventory Collector +echo !BRIGHT_WHITE!Disable Inventory Collector... +reg add "HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\DataCollection" /v AllowTelemetry /t REG_DWORD /d 0 /f + +REM Disable Get More Out of Windows +echo !BRIGHT_WHITE!Disable Get More Out of Windows... +reg add "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\ContentDeliveryManager" /v SubscribedContent-353698Enabled /t REG_DWORD /d 0 /f -:: Clear thumbnail cache -echo [%date% %time%] Clearing Thumbnail Cache >> "%logFile%" -del /f /s /q /a "%LocalAppData%\Microsoft\Windows\Explorer\thumbcache_*.db" >> "%logFile%" 2>&1 - -echo %GREEN%Temporary files have been cleaned.%WHITE% -pause -goto :MainMenu - -:CleanDirectory -:: %1 - Directory path -:: %2 - Log file -if exist %1 ( - rd /s /q %1 >> "%2%" 2>&1 - md %1 >> "%2%" 2>&1 - echo Cleaned %1 +cls +echo Are you sure you want to disable system mitigations? +echo This can improve performance but also increases security risks. +echo. +echo !BRIGHT_GREEN!Positive: Improved system performance. +echo !BRIGHT_RED!Negative: Increased vulnerability to security threats.!BRIGHT_WHITE! +echo. +echo Please type !BRIGHT_MAGENTA!YES !BRIGHT_WHITE!to continue or any other key to abort. +set /p UserInput="Enter your choice: " +if /I "%UserInput%"=="YES" ( + echo !BRIGHT_WHITE!Disabling Mitigations... + call :DisableMitigations + echo !BRIGHT_WHITE!Mitigations have been disabled. ) else ( - echo Directory %1 does not exist. >> "%2%" + echo !BRIGHT_RED!Operation aborted. ) -exit /b - -:OptimizePrivacy -cls -echo %CYAN%Optimizing Privacy Settings...%WHITE% - -:: Define log file -set "logFile=%~dp0privacy_log.txt" -echo [%date% %time%] Optimizing Privacy Settings >> "%logFile%" - -:: Function to add registry keys -call :AddRegKey "HKLM\Software\Microsoft\PolicyManager\default\WiFi" "AllowWiFiHotSpotReporting" "REG_DWORD" "0" "%logFile%" -call :AddRegKey "HKLM\Software\Microsoft\PolicyManager\default\WiFi" "AllowAutoConnectToWiFiSenseHotspots" "REG_DWORD" "0" "%logFile%" - -call :AddRegKey "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" "EnableActivityFeed" "REG_DWORD" "0" "%logFile%" -call :AddRegKey "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" "PublishUserActivities" "REG_DWORD" "0" "%logFile%" -call :AddRegKey "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" "UploadUserActivities" "REG_DWORD" "0" "%logFile%" - -call :AddRegKey "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location" "Value" "REG_SZ" "Deny" "%logFile%" -call :AddRegKey "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Sensor\Overrides\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}" "SensorPermissionState" "REG_DWORD" "0" "%logFile%" -call :AddRegKey "HKLM\SYSTEM\CurrentControlSet\Services\lfsvc\Service\Configuration" "Status" "REG_DWORD" "0" "%logFile%" -call :AddRegKey "HKLM\SYSTEM\Maps" "AutoUpdateEnabled" "REG_DWORD" "0" "%logFile%" -call :AddRegKey "HKLM\SOFTWARE\Policies\Microsoft\Biometrics" "Enabled" "REG_DWORD" "0" "%logFile%" -call :AddRegKey "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" "EnableActivityFeed" "REG_DWORD" "0" "%logFile%" -reg delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy" /f >> "%logFile%" 2>&1 -echo Deleted Storage Sense StoragePolicy >> "%logFile%" - -echo %GREEN%Privacy settings have been optimized.%WHITE% pause -goto :MainMenu - -:DisableTelemetry -cls -echo %CYAN%Disabling Telemetry and Data Collection...%WHITE% - -:: Define log file -set "logFile=%~dp0telemetry_log.txt" -echo [%date% %time%] Disabling Telemetry and Data Collection >> "%logFile%" - -call :AddRegKey "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" "AllowTelemetry" "REG_DWORD" "0" "%logFile%" -call :AddRegKey "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection" "AllowTelemetry" "REG_DWORD" "0" "%logFile%" +exit -call :AddRegKey "HKLM\SOFTWARE\Policies\Microsoft\SQMClient\Windows" "CEIPEnable" "REG_DWORD" "0" "%logFile%" -call :AddRegKey "HKLM\SOFTWARE\Policies\Microsoft\SQMClient" "CEIPEnable" "REG_DWORD" "0" "%logFile%" - -call :AddRegKey "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppCompat" "AITEnable" "REG_DWORD" "0" "%logFile%" -call :AddRegKey "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppCompat" "DisableInventory" "REG_DWORD" "1" "%logFile%" -call :AddRegKey "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppCompat" "DisableUAR" "REG_DWORD" "1" "%logFile%" - -call :AddRegKey "HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting" "Disabled" "REG_DWORD" "1" "%logFile%" - -echo %GREEN%Telemetry and data collection have been disabled.%WHITE% +:DisableMitigations + powershell -Command "& {ForEach($v in (Get-Command -Name 'Set-ProcessMitigation').Parameters['Disable'].Attributes.ValidValues){Set-ProcessMitigation -System -Disable $v.ToString() -ErrorAction SilentlyContinue}}" + powershell -Command "& {Remove-Item -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\*' -Recurse -ErrorAction SilentlyContinue}" + call :UpdateRegistry + goto :eof + +:UpdateRegistry + reg add "HKLM\SOFTWARE\Policies\Microsoft\FVE" /v "DisableExternalDMAUnderLock" /t REG_DWORD /d "0" /f + reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DeviceGuard" /v "EnableVirtualizationBasedSecurity" /t REG_DWORD /d "0" /f + reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DeviceGuard" /v "HVCIMATRequired" /t REG_DWORD /d "0" /f + reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel" /v "DisableExceptionChainValidation" /t REG_DWORD /d "1" /f + reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel" /v "KernelSEHOPEnabled" /t REG_DWORD /d "0" /f + reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "EnableCfg" /t REG_DWORD /d "0" /f + reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager" /v "ProtectionMode" /t REG_DWORD /d "0" /f + reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "FeatureSettings" /t REG_DWORD /d "1" /f + reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "FeatureSettingsOverride" /t REG_DWORD /d "3" /f + reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "FeatureSettingsOverrideMask" /t REG_DWORD /d "3" /f pause -goto :MainMenu -:OptimizePerformance cls -echo %CYAN%Optimizing System Performance...%WHITE% - -:: Define log file -set "logFile=%~dp0performance_log.txt" -echo [%date% %time%] Optimizing System Performance >> "%logFile%" - -:: Disable Superfetch (SysMain) -sc stop SysMain >> "%logFile%" 2>&1 -sc config SysMain start= disabled >> "%logFile%" 2>&1 -echo Disabled SysMain (Superfetch) >> "%logFile%" - -:: Optimize visual effects for performance -call :AddRegKey "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects" "VisualFXSetting" "REG_DWORD" "2" "%logFile%" - -:: Disable Transparency -call :AddRegKey "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize" "EnableTransparency" "REG_DWORD" "0" "%logFile%" - -:: Disable Animations -call :AddRegKey "HKCU\Control Panel\Desktop\WindowMetrics" "MinAnimate" "REG_SZ" "0" "%logFile%" - -:: Increase DNS Cache -ipconfig /flushdns >> "%logFile%" 2>&1 -call :AddRegKey "HKLM\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters" "CacheHashTableBucketSize" "REG_DWORD" "1" "%logFile%" -call :AddRegKey "HKLM\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters" "CacheHashTableSize" "REG_DWORD" "384" "%logFile%" - -:: Optimize Boot Performance -bcdedit /set {current} bootmenupolicy Standard >> "%logFile%" 2>&1 -echo Set bootmenupolicy to Standard >> "%logFile%" - -:: Disable Hibernation -powercfg /h off >> "%logFile%" 2>&1 -echo Disabled Hibernation >> "%logFile%" - -:: Optimize for performance power plan -powercfg /setactive 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c >> "%logFile%" 2>&1 -echo Set Power Plan to High Performance >> "%logFile%" - -:: Disable Fast Startup -call :AddRegKey "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Power" "HiberbootEnabled" "REG_DWORD" "0" "%logFile%" - -echo %GREEN%System performance has been optimized.%WHITE% -pause -goto :MainMenu - -:DisableMitigations +echo !BRIGHT_WHITE!All tweaks have been successfully applied! For the changes to take effect, please restart your computer. +echo Press !BRIGHT_MAGENTA!ENTER !BRIGHT_WHITE!to return to the main menu. +pause >nul cls -echo %RED%WARNING: Disabling system mitigations can improve performance but may increase security risks.%WHITE% -echo Are you sure you want to proceed? Type %YELLOW%YES%WHITE% to continue or any other key to abort. -set /p "confirm=>" -if /i not "%confirm%"=="YES" goto :MainMenu - -:: Define log file -set "logFile=%~dp0mitigations_log.txt" -echo [%date% %time%] Disabling System Mitigations >> "%logFile%" - -echo %CYAN%Disabling System Mitigations...%WHITE% - -:: Disable Process Mitigations via PowerShell -powershell -Command "Get-ProcessMitigation -System | ForEach-Object { Set-ProcessMitigation -System -Disable @{($_.Feature)} }" >> "%logFile%" 2>&1 - -:: Remove Image File Execution Options -powershell -Command "Remove-Item -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\*' -Recurse -ErrorAction SilentlyContinue" >> "%logFile%" 2>&1 -echo Removed Image File Execution Options >> "%logFile%" - -:: Modify Registry to Disable Various Security Features -call :AddRegKey "HKLM\SOFTWARE\Policies\Microsoft\FVE" "DisableExternalDMAUnderLock" "REG_DWORD" "0" "%logFile%" -call :AddRegKey "HKLM\SOFTWARE\Policies\Microsoft\Windows\DeviceGuard" "EnableVirtualizationBasedSecurity" "REG_DWORD" "0" "%logFile%" -call :AddRegKey "HKLM\SOFTWARE\Policies\Microsoft\Windows\DeviceGuard" "HVCIMATRequired" "REG_DWORD" "0" "%logFile%" -call :AddRegKey "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel" "DisableExceptionChainValidation" "REG_DWORD" "1" "%logFile%" -call :AddRegKey "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel" "KernelSEHOPEnabled" "REG_DWORD" "0" "%logFile%" -call :AddRegKey "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" "EnableCfg" "REG_DWORD" "0" "%logFile%" -call :AddRegKey "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager" "ProtectionMode" "REG_DWORD" "0" "%logFile%" -call :AddRegKey "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" "FeatureSettingsOverride" "REG_DWORD" "3" "%logFile%" -call :AddRegKey "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" "FeatureSettingsOverrideMask" "REG_DWORD" "3" "%logFile%" - -echo %GREEN%System mitigations have been disabled.%WHITE% -echo %RED%WARNING: Your system may be more vulnerable to certain types of attacks.%WHITE% -echo %YELLOW%It's recommended to re-enable mitigations if you're not experiencing significant performance issues.%WHITE% -pause -goto :MainMenu +goto :Main-Menu -:Information +REM Option 2: Information +:Menu_[2] Information cls -echo %CYAN%Perfect Windows Optimizer - Information%WHITE% echo. -echo This tool is designed to enhance your Windows experience by optimizing various -echo system settings for improved performance, privacy, and user experience. +echo %BRIGHT_BLUE%Welcome to Perfect Windows - Your Ultimate Performance Enhancer! echo. -echo %YELLOW%Features:%WHITE% -echo - Service Management -echo - Temporary File Cleanup -echo - Privacy Optimization -echo - Telemetry and Data Collection Control -echo - System Performance Enhancement -echo - Advanced System Tweaks (Mitigation Control) +echo %WHITE%Perfect Windows is a meticulously crafted tool, designed with the sole aim of elevating your Windows experience to new heights. +echo %WHITE%It does so by fine-tuning various system parameters, optimizing your system's settings to deliver peak performance and robust security. echo. -echo %RED%Disclaimer:%WHITE% -echo This tool makes significant changes to your Windows configuration. -echo While these changes are designed to improve performance and privacy, -echo they may cause compatibility issues with some software or reduce -echo certain security protections. +echo %DARK_RED%Disclaimer: We strive to ensure the highest quality and reliability. However, the use of this tool is at your own discretion. +echo %DARK_RED%We strongly recommend maintaining a backup of your system for safety. echo. -echo It's strongly recommended to: -echo 1. Create a system restore point before using this tool -echo 2. Only use this tool if you understand the implications of the changes -echo 3. Keep your system and all software up-to-date +echo %BRIGHT_BLUE%Stay Connected: +echo %WHITE%For updates, insights and more, follow us on Twitter: @Jisllos +echo %WHITE%To contribute or report issues, visit our GitHub page: https://github.com/Jisll/windows11 echo. -echo %CYAN%For updates and support, visit: https://github.com/Jisll/windows11%WHITE% -echo %CYAN%Follow us on Twitter: @Jisllos%WHITE% pause -goto :MainMenu - -:SetColors -set "BLACK=%ESC%[30m" -set "RED=%ESC%[31m" -set "GREEN=%ESC%[32m" -set "YELLOW=%ESC%[33m" -set "BLUE=%ESC%[34m" -set "MAGENTA=%ESC%[35m" -set "CYAN=%ESC%[36m" -set "WHITE=%ESC%[37m" -set "BRIGHT_BLACK=%ESC%[90m" -set "BRIGHT_RED=%ESC%[91m" -set "BRIGHT_GREEN=%ESC%[92m" -set "BRIGHT_YELLOW=%ESC%[93m" -set "BRIGHT_BLUE=%ESC%[94m" -set "BRIGHT_MAGENTA=%ESC%[95m" -set "BRIGHT_CYAN=%ESC%[96m" -set "BRIGHT_WHITE=%ESC%[97m" -exit /b - -:AddRegKey -:: %1 - Registry Path -:: %2 - Value Name -:: %3 - Value Type -:: %4 - Value Data -:: %5 - Log File -reg add "%1" /v "%2" /t "%3" /d "%4" /f >> "%5%" 2>&1 -if %errorlevel% equ 0 ( - echo Added/Updated "%2" in "%1" >> "%5%" -) else ( - echo Failed to add/update "%2" in "%1" >> "%5%" -) +goto :Main-Menu + +REM Option E: Exit +:Menu_[E] Exit +exit + +REM Colors +:Colors +set "DARK_BLACK=" +set "DARK_RED=" +set "DARK_GREEN=" +set "DARK_YELLOW=" +set "DARK_BLUE=" +set "DARK_MAGENTA=" +set "DARK_CYAN=" +set "DARK_WHITE=" +set "BRIGHT_BLACK=" +set "BRIGHT_RED=" +set "BRIGHT_GREEN=" +set "BRIGHT_YELLOW=" +set "BRIGHT_BLUE=" +set "BRIGHT_MAGENTA=" +set "BRIGHT_CYAN=" +set "BRIGHT_WHITE=" +set "WHITE=" exit /b - :EOF