-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWindow optimizer.bat
50 lines (36 loc) · 1.48 KB
/
Window optimizer.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
@echo off
rem Deleting files in %temp%
del /q "%USERPROFILE%\AppData\Local\Temp\*.*"
rem Deleting files in C:\Windows\Temp
del /q "C:\Windows\Temp\*.*"
echo Temporary files and folders deleted successfully.
REM Change power plan settings
powercfg /change standby-timeout-ac 0
powercfg /change monitor-timeout-ac 0
powercfg /s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
echo Power plan changed successfully.
REM Enable all cores
for /f "tokens=2 delims==" %%a in ('wmic cpu get NumberOfCores /value') do set cores=%%a
for /f "tokens=2 delims==" %%b in ('wmic cpu get NumberOfLogicalProcessors /value') do set threads=%%b
if %threads% gtr %cores% (
set cores=%threads%
)
echo Number of cores: %cores%
echo Number of threads: %threads%
bcdedit /set numproc %cores%
echo All cores enabled successfully.
echo Cleanup finished!
echo Checking System Integrity and Repairs. This may take long
cleanmgr /autoclean
ChkDsk /f
Sfc /ScanNow
REM Download Memreduct
set downloadUrl=https://github.com/henrypp/memreduct/releases/download/v.3.4/memreduct-3.4-setup.exe
set downloadFolder=%CD%\Downloads
echo Downloading Memreduct...
mkdir "%downloadFolder%" 2>nul
bitsadmin /transfer "MemreductDownload" %downloadUrl% "%downloadFolder%\memreduct-3.4-setup.exe"
echo Memreduct downloaded successfully.
echo Installing Memreduct...
powershell Start-Process -FilePath "%downloadFolder%\memreduct-3.4-setup.exe" -ArgumentList "/S" -Wait
echo Memreduct installed successfully.