добавь проверку на запуск скрипта от имени администратора, если скрипт запущен не от…
- User
добавь проверку на запуск скрипта от имени администратора, если скрипт запущен не от имени администратора, то скрипт не будет работать
@echo off echo. call :USER_DEFINED REM Set processor affinities; if not set, leave as is :processaffinity REM CREDIT TO SPDLL for the fastest code if defined affinity ( if not %affinity% GTR 0 goto INVALID_AFFINITY PowerShell -NoLogo -NoProfile -NonInteractive -Command "Get-Process dwm,audiosvchost,audiodg,lsass,svchost,WmiPrvSE | ForEach-Object {$_.ProcessorAffinity=%affinity%}" ) :INVALID_AFFINITY REM Set winlogon to normal priority to prevent child processes from inheriting high priority wmic process where name="winlogon.exe" call setpriority 32 >nul 2>&1 REM Clear temporary files rd /s /q "%temp%" 2>nul mkdir "%userprofile%\AppData\Local\Temp" >nul 2>&1 exit /b
:USER_DEFINED wmic process where name="dwm.exe" call setpriority 32 >nul 2>&1 wmic process where name="lsass.exe" call setpriority 64 >nul 2>&1 wmic process where name="svchost.exe" call setpriority 64 >nul 2>&1 wmic process where name="WmiPrvSE.exe" call setpriority 64 >nul 2>&1 @echo off REM Set encoding and disable command displa chcp 65001 >nul cls title Windows Optimization by Doxile REM Color codes REM 0 = Black 1 = Blue 2 = Green REM 3 = Aqua 4 = Red 5 = Purple REM 6 = Yellow 7 = White 8 = Gray REM 9 = Light Blue 10 = Light Green, etc. set "COLOR_TITLE=0A" set "COLOR_MENU=0E" set "COLOR_ERROR=0C" set "COLOR_SUCCESS=0A" set "COLOR_PROMPT=0B" REM Number of optimizations applied set "optimization_count=60" REM Увеличено количество оптимизаций REM Function to display menu :menu cls echo °º¤ø,¸¸,ø¤º°
°º¤ø,¸,ø¤°º¤ø,¸¸,ø¤º°°º¤ø,¸,ø¤°º¤ø,¸¸,ø¤º°°º¤ø,¸,ø¤°º¤ø,¸¸,ø¤º°,ø¤°º¤ø,¸¸,ø¤º° echo. echo Windows Optimization by Doxile echo Total optimizations in the script: %optimization_count% echo. echo °º¤ø,¸¸,ø¤º°°º¤ø,¸,ø¤°º¤ø,¸¸,ø¤º°°º¤ø,¸,ø¤°º¤ø,¸¸,ø¤º°°º¤ø,¸,ø¤°º¤ø,¸¸,ø¤º°,ø¤°º¤ø,¸¸,ø¤º° echo. echo 1. Apply Windows Optimizations echo 2. Restore Default Settings echo 3. Enable Windows Boost echo 4. Disable Windows Boost echo 5. Clean Disk and Temporary Files echo 6. Update System Files and Drivers echo 7. Create Restore Point echo 8. Optimize Network Settings echo 0. Exit echo. echo °º¤ø,¸¸,ø¤º°°º¤ø,¸,ø¤°º¤ø,¸¸,ø¤º°°º¤ø,¸¸,ø¤º°°º¤ø,¸,ø¤°º¤ø,¸¸,ø¤º°°º¤ø,¸,ø¤°º¤ø,¸¸,ø¤º° echo. REM Prompt user for choice color %COLOR_PROMPT% set /p "choice=Enter your choice: " color 07 REM Handle user choice if "%choice%"=="1" goto optimizations if "%choice%"=="2" goto restore_defaults if "%choice%"=="3" goto boost_enable if "%choice%"=="4" goto boost_disable if "%choice%"=="5" goto clean_disk if "%choice%"=="6" goto update_system if "%choice%"=="7" goto create_restore if "%choice%"=="8" goto optimize_network if "%choice%"=="0" goto exit_script echo. color %COLOR_ERROR% echo Invalid selection. Please try again. color 07 timeout /t 2 /nobreak >nul goto menuREM Optimization Function :optimizations cls color %COLOR_MENU% echo. echo Applying Windows optimizations... echo. REM Stop unnecessary services echo Stopping unnecessary services... net stop "SysMain" >nul 2>&1 net stop "Superfetch" >nul 2>&1 net stop "Print Spooler" >nul 2>&1 net stop "Fax" >nul 2>&1 net stop "wuauserv" >nul 2>&1 net stop "BITS" >nul 2>&1 net stop "WMPNetworkSvc" >nul 2>&1 net stop "ConnectedUserSharedExperiences_32771" >nul 2>&1 net stop "Spooler" >nul 2>&1 REM Remove programs from startup echo. echo Cleaning startup... reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" /f >nul 2>&1 reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /f >nul 2>&1 REM Optimize visual effects echo. echo Optimizing visual effects... reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects" /v VisualFXSetting /t REG_DWORD /d 2 /f >nul reg add "HKCU\SOFTWARE\Microsoft\Windows\DWM" /v EnableTransparency /t REG_DWORD /d 0 /f >nul REM Disable hibernation and other features echo. echo Disabling hibernation and search features... powercfg /hibernate off >nul 2>&1 sc config "Windows Search" start=disabled >nul 2>&1 sc config "SysMain" start=disabled >nul 2>&1 REM Disable Game DVR and Delivery Optimization echo. echo Disabling Game DVR and Delivery Optimization... reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\GameDVR" /v AllowGameDVR /t REG_DWORD /d 0 /f >nul reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization" /v DODownloadMode /t REG_DWORD /d 0 /f >nul reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization" /v DOUploadMode /t REG_DWORD /d 0 /f >nul REM Disable background tasks echo. echo Disabling scheduled tasks... for %%a in ( "Microsoft\Windows\Defrag\ScheduledDefrag" "Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" "Microsoft\Windows\Application Experience\ProgramDataUpdater" "Microsoft\Windows\Application Experience\StartupAppTask" "Microsoft\Windows\Device Information\Device" "Microsoft\Windows\Diagnosis\Scheduled" "Microsoft\Windows\Diagnosis\RecommendedTroubleshootingScanner" "Microsoft\Windows\DiskFootprint\Diagnostics" "Microsoft\Windows\DiskFootprint\StorageSense" "Microsoft\Windows\Feedback\Siuf\DmClientOnScenarioDownload" "Microsoft\Windows\Feedback\Siuf\DmClient" "Microsoft\Windows\International\Synchronize Language Settings" "Microsoft\Windows\LanguageComponentsInstaller\Installation" "Microsoft\Windows\LanguageComponentsInstaller\ReconcileLanguageResources" "Microsoft\Windows\Maps\MapsUpdateTask" "Microsoft\Windows\Maps\MapsToastTask" "Microsoft\Windows\PushToInstall\Registration" "Microsoft\Windows\Setup\SetupCleanupTask" "Microsoft\Windows\Speech\SpeechModelDownloadTask" "Microsoft\Windows\Windows Error Reporting\QueueReporting" "Microsoft\Windows\WindowsColorSystem\Calibration Loader" "Microsoft\Windows\Work Folders\Work Folders Logon Synchronization" "Microsoft\Windows\MemoryDiagnostic\ProcessMemoryDiagnosticEvents" "Microsoft\Windows\MemoryDiagnostic\RunFullMemoryDiagnostic" ) do schtasks /change /tn "%%a" /disable >nul 2>&1 REM Optimize power and performance settings echo. echo Optimizing power and performance settings... powercfg /setactive 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c >nul 2>&1 reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\PriorityControl" /v "Win32PrioritySeparation" /t REG_DWORD /d 38 /f >nul REM Set process priorities echo. echo Setting process priorities... for %%P in ("BstkSVC.exe" "HD-Agent.exe" "HD-Player.exe" "BlueStacks.exe") do ( reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options%%~P\PerfOptions" /v "CpuPriorityClass" /t REG_DWORD /d 3 /f >nul ) REM Optimize multimedia profiles echo. echo Optimizing multimedia profiles... reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\Games" /v "GPU Priority" /t REG_DWORD /d 8 /f >nul reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\Games" /v "Priority" /t REG_DWORD /d 6 /f >nul reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\Games" /v "Scheduling Category" /t REG_SZ /d "High" /f >nul reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\Games" /v "SFIO Priority" /t REG_SZ /d "High" /f >nul reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerThrottling" /v "PowerThrottlingOff" /t REG_DWORD /d 1 /f >nul reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" /v "SystemResponsiveness" /t REG_DWORD /d 0 /f >nul reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" /v "NetworkThrottlingIndex" /t REG_DWORD /d 0xffffffff /f >nul REM Configure USB settings for performance echo. echo Configuring USB settings... for /f "tokens=2 delims==" %%a in ('WMIC PATH Win32_USBHub GET DeviceID /VALUE ^| find "="') do ( for %%b in ("EnhancedPowerManagementEnabled" "AllowIdleIrpInD3" "SelectiveSuspendOn" "DeviceSelectiveSuspended" "SelectiveSuspendEnabled") do ( reg add "HKLM\SYSTEM\CurrentControlSet\Enum%%a\Device Parameters" /v "%%~b" /t REG_DWORD /d 0 /f >nul 2>&1 ) ) REM Disable Game Bar and game settings echo. echo Disabling Game Bar and game settings... reg add "HKCU\SOFTWARE\Microsoft\GameBar" /v "ShowStartupPanel" /t REG_DWORD /d 0 /f >nul reg add "HKCU\SOFTWARE\Microsoft\GameBar" /v "GamePanelStartupTipIndex" /t REG_DWORD /d 3 /f >nul reg add "HKCU\SOFTWARE\Microsoft\GameBar" /v "AllowAutoGameMode" /t REG_DWORD /d 0 /f >nul reg add "HKCU\SOFTWARE\Microsoft\GameBar" /v "AutoGameModeEnabled" /t REG_DWORD /d 0 /f >nul reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\GameDVR" /v "AllowGameDVR" /t REG_DWORD /d 0 /f >nul reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "AppCaptureEnabled" /t REG_DWORD /d 0 /f >nul REM Additional optimizations echo. echo Applying additional optimizations... REM Disable search indexing reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "GatherSystemTags" /t REG_DWORD /d 0 /f >nul reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "GatherExtendedProperties" /t REG_DWORD /d 0 /f >nul reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "IndexingPaused" /t REG_DWORD /d 1 /f >nul REM Disable notifications reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\PushNotifications" /v "ToastEnabled" /t REG_DWORD /d 0 /f >nul reg add "HKCU\Software\Policies\Microsoft\Windows\Explorer" /v "DisableNotificationCenter" /t REG_DWORD /d 1 /f >nul REM Disable Windows advertising elements reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SystemPaneSuggestionsEnabled" /t REG_DWORD /d 0 /f >nul reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338388Enabled" /t REG_DWORD /d 0 /f >nul reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338389Enabled" /t REG_DWORD /d 0 /f >nul REM Disable telemetry reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v "AllowTelemetry" /t REG_DWORD /d 0 /f >nul REM Disable background applications reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" /v "GlobalUserDisabled" /t REG_DWORD /d 1 /f >nul REM Disable automatic driver updates reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DriverSearching" /v "SearchOrderConfig" /t REG_DWORD /d 0 /f >nul REM Disable automatic Windows updates reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "NoAutoUpdate" /t REG_DWORD /d 1 /f >nul REM Configure virtual memory settings echo. echo Configuring virtual memory settings... reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "PagingFiles" /t REG_MULTI_SZ /d "C:\pagefile.sys 4096 8192" /f >nul REM Optimize registry for faster startup reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Serialize" /v "StartupDelayInMSec" /t REG_DWORD /d 0 /f >nul REM Clean prefetch and temporary files echo. echo Cleaning temporary files and prefetch data... del /f /s /q C:\Windows\Prefetch* >nul 2>&1 del /f /s /q %TEMP%* >nul 2>&1 del /f /s /q C:\Windows\Temp* >nul 2>&1 REM Additional optimizations (additional steps) echo. echo Applying additional optimizations (additional steps)... REM Step 1: Disable UAC and SmartScreen reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "EnableLUA" /t REG_DWORD /d 0 /f >nul reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "PromptOnSecureDesktop" /t REG_DWORD /d 0 /f >nul reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "ConsentPromptBehaviorAdmin" /t REG_DWORD /d 0 /f >nul reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" /v SmartScreenEnabled /t REG_SZ /d "Off" /f >nul REM Step 2: Disable CPU reserve for background processes reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" /v "SystemResponsiveness" /t REG_DWORD /d 0a /f >nul REM Step 3: Configure NetworkThrottlingIndex reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" /v "NetworkThrottlingIndex" /t REG_DWORD /d 0a /f >nul REM Step 4: Disable Store app auto-updates reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsStore" /v "AutoDownload" /t REG_DWORD /d 2 /f >nul REM Step 5: Reduce timeout durations reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v "AutoEndTasks" /t REG_SZ /d "1" /f >nul reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v "HungAppTimeout" /t REG_SZ /d "1000" /f >nul reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v "WaitToKillAppTimeout" /t REG_SZ /d "2000" /f >nul reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v "LowLevelHooksTimeout" /t REG_SZ /d "1000" /f >nul reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v "MenuShowDelay" /t REG_SZ /d "0" /f >nul REM Step 6: Set desktop background quality reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v "JPEGImportQuality" /t REG_DWORD /d 80 /f >nul REM Step 7: Increase system cache reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Memory Management" /v "LargeSystemCache" /t REG_DWORD /d 1 /f >nul REM Step 8: Reduce shutdown timeout reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control" /v "WaitToKillServiceTimeout" /t REG_SZ /d "10000" /f >nul REM Step 9: Disable additional scheduled tasks call :disable_additional_tasks REM Step 10: Disable unnecessary devices using DevManView call :disable_devices REM Step 11: Disable more scheduled tasks call :disable_more_tasks REM Step 12: Configure OpenGL call :configure_opengl REM Step 13: Additional OpenGL settings call :additional_opengl_settings REM Step 14: Set GPU environment variables call :set_gpu_env REM Step 15: Protect OpenGL DLL call :protect_opengl REM Step 16: Disable Remote Registry Service echo. echo Disabling Remote Registry Service... sc config "RemoteRegistry" start=disabled >nul 2>&1 sc stop "RemoteRegistry" >nul 2>&1 REM Step 17: Disable Windows Tips echo. echo Disabling Windows Tips... reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338389Enabled" /t REG_DWORD /d 0 /f >nul reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338384Enabled" /t REG_DWORD /d 0 /f >nul reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338387Enabled" /t REG_DWORD /d 0 /f >nul REM Step 18: Disable Transparency Effects echo. echo Disabling Transparency Effects... reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" /v "EnableTransparency" /t REG_DWORD /d 0 /f >nul REM Step 19: Disable Animations echo. echo Disabling Window Animations... reg add "HKCU\Control Panel\Desktop" /v "WindowAnimation" /t REG_SZ /d "0" /f >nul reg add "HKCU\Control Panel\Desktop" /v "MinAnimate" /t REG_SZ /d "0" /f >nul REM Step 20: Disable Shake Window Effect echo. echo Disabling Shake Window Effect... reg add "HKCU\Control Panel\Desktop" /v "ClientVisualStylePrefe" /t REG_SZ /d "0" /f >nul reg add "HKCU\Control Panel\Desktop" /v "WindowArrangementActive" /t REG_SZ /d "0" /f >nul REM Finish optimizations echo. color %COLOR_SUCCESS% echo Optimizations successfully applied! color 07 timeout /t 3 /nobreak >nul goto menu
- Assistant