-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheck-script.bat
293 lines (240 loc) · 9.14 KB
/
check-script.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
@echo off
:: Check for administrative privileges
net session >nul 2>&1
if %errorlevel% neq 0 (
echo This script must be run as an administrator.
echo Please right-click the script and select "Run as administrator".
pause
exit /b
)
echo v1.0.2
echo Checking System Eligibility for Valorant (TPM 2.0, Secure Boot, Windows Version, CPU Performance, RAM, GPU)...
echo.
:: Download lookup_gpu.txt from GitHub
set "lookupUrl=https://raw.githubusercontent.com/Mightyiest/Valorant-system-check-script/main/lookup_gpu.txt"
set "lookupFile=%TEMP%\lookup_gpu.txt"
if exist "%lookupFile%" del "%lookupFile%"
echo Downloading GPU lookup table...
curl -s -o "%lookupFile%" "%lookupUrl%"
if not exist "%lookupFile%" (
echo Failed to download GPU lookup table.
goto :end
)
echo Motherboard:
wmic baseboard get product,Manufacturer,version,serialnumber
echo.
:: Check TPM 2.0
echo TPM 2.0:
powershell -Command "(Get-Tpm).TpmPresent" > "%TEMP%\temp_tpm_present.txt"
findstr /i "True" "%TEMP%\temp_tpm_present.txt" > nul
if %errorlevel% equ 0 (
powershell -Command "(Get-Tpm).TpmReady" > "%TEMP%\temp_tpm_ready.txt"
findstr /i "True" "%TEMP%\temp_tpm_ready.txt" > nul
if %errorlevel% equ 0 (
powershell -Command "(Get-Tpm).ManufacturerVersion -like '2.0*'" > "%TEMP%\temp_tpm_version.txt"
findstr /i "True" "%TEMP%\temp_tpm_version.txt" > nul
if %errorlevel% equ 0 (
set tpmStatus=Enabled
call :ColorEcho 92 Enabled
) else (
set tpmStatus=Disabled
call :ColorEcho 91 "Disabled or Not Found (not version 2.0)"
)
del "%TEMP%\temp_tpm_version.txt"
) else (
set tpmStatus=Disabled
call :ColorEcho 91 "Disabled or Not Ready"
)
del "%TEMP%\temp_tpm_ready.txt"
) else (
set tpmStatus=NotFound
call :ColorEcho 91 "Not Found"
)
del "%TEMP%\temp_tpm_present.txt"
goto :secureboot
:secureboot
echo.
echo Secure Boot:
powershell -Command "Confirm-SecureBootUEFI" > "%TEMP%\temp_sb.txt"
findstr /i "True" "%TEMP%\temp_sb.txt" > nul
if %errorlevel% equ 0 (
set secureBootStatus=Enabled
call :ColorEcho 92 Enabled
) else (
set secureBootStatus=Disabled
call :ColorEcho 91 Disabled
)
echo.
del "%TEMP%\temp_sb.txt"
echo Checking Windows version:
wmic os get Caption, BuildNumber, OSArchitecture /value > "%TEMP%\temp_winver.txt"
for /f "tokens=2 delims==" %%I in ('type "%TEMP%\temp_winver.txt" ^| findstr /i "Caption"') do (
set "winVersion=%%I"
)
for /f "tokens=2 delims==" %%I in ('type "%TEMP%\temp_winver.txt" ^| findstr /i "BuildNumber"') do (
set "buildNumber=%%I"
)
for /f "tokens=2 delims==" %%I in ('type "%TEMP%\temp_winver.txt" ^| findstr /i "OSArchitecture"') do (
set "osArch=%%I"
)
echo Detected OS: %winVersion% (Build %buildNumber%) %osArch%
if "%osArch%"=="64-bit" (
echo %winVersion% | findstr /i "10" > nul
if %errorlevel% equ 0 (
if %buildNumber% GEQ 19045 (
call :ColorEcho 92 "OK! (Windows 10 64-bit, Build 19045 or later)"
) else (
call :ColorEcho 91 "Not OK! (Windows 10 64-bit, Build is older than 19045)"
)
goto :ramcheck
)
echo %winVersion% | findstr /i "11" > nul
if %errorlevel% equ 0 (
call :ColorEcho 92 "OK! (Windows 11 64-bit)"
goto :ramcheck
)
call :ColorEcho 91 "Not OK! (Unsupported Windows version)"
goto :end
) else (
call :ColorEcho 91 "Not OK! (Requires 64-bit Windows)"
goto :end
)
:ramcheck
echo.
echo RAM Check:
:: Get total physical memory in GB directly with PowerShell
powershell -Command "$RAM = (Get-WmiObject -Class Win32_ComputerSystem).TotalPhysicalMemory; [math]::Round($RAM / 1GB)" > "%TEMP%\temp_ram.txt"
for /f "tokens=*" %%a in ('type "%TEMP%\temp_ram.txt"') do (
set "ramTotalGB=%%a"
)
echo Detected RAM: %ramTotalGB%GB
if %ramTotalGB% LSS 8 (
set ramCategory=Low
call :ColorEcho 91 "Too Low: %ramTotalGB% GB"
) else if %ramTotalGB% GEQ 8 if %ramTotalGB% LSS 16 (
set ramCategory=Medium
call :ColorEcho 93 "Medium: %ramTotalGB% GB"
) else (
set ramCategory=High
call :ColorEcho 92 "Good: %ramTotalGB% GB"
)
goto :cpucheck
:cpucheck
echo.
echo CPU Performance:
wmic cpu get name /value > "%TEMP%\temp_cpu.txt"
for /f "usebackq tokens=2 delims==" %%I in (`type "%TEMP%\temp_cpu.txt" ^| findstr /i "name"`) do (
set "cpuName=%%I"
)
echo Detected CPU: %cpuName%
:: Determine CPU Performance Category
set cpuCategory=Unknown
:: Check for Ryzen 5, 7 1000 series or Intel 7th Gen (Poor-Medium)
echo %cpuName% | findstr /i "Ryzen [57] 1[0-9][0-9][0-9]" > nul
if %errorlevel% equ 0 set cpuCategory=Poor-Medium
echo %cpuName% | findstr /i "i[357]-7" > nul
if %errorlevel% equ 0 set cpuCategory=Poor-Medium
:: Check for Ryzen 3, 5, 7 2000 series or Intel 8th Gen (Medium)
echo %cpuName% | findstr /i "Ryzen [357] 2[0-9][0-9][0-9]" > nul
if %errorlevel% equ 0 set cpuCategory=Medium
echo %cpuName% | findstr /i "i[357]-8" > nul
if %errorlevel% equ 0 set cpuCategory=Medium
:: Check for Ryzen 3, 5, 7, 9 3000 series or later or Intel 9th Gen or later (High)
echo %cpuName% | findstr /i "Ryzen [3579] [3-9][0-9][0-9][0-9]" > nul
if %errorlevel% equ 0 set cpuCategory=High
echo %cpuName% | findstr /i "i[3579]-[9]" > nul
if %errorlevel% equ 0 set cpuCategory=High
echo %cpuName% | findstr /i "i[3579]-1[0-9]" > nul
if %errorlevel% equ 0 set cpuCategory=High
:: Display CPU Performance Category
if defined cpuCategory (
if %cpuCategory%==Poor-Medium (
call :ColorEcho 93 "Poor-Medium Performance (Ryzen 5/7 1000 series or Intel 7th Gen)"
) else if %cpuCategory%==Medium (
call :ColorEcho 93 "Medium Performance (Ryzen 3/5/7 2000 series or Intel 8th Gen)"
) else if %cpuCategory%==High (
call :ColorEcho 92 "High Performance (Ryzen 3/5/7/9 3000 series or later, or Intel 9th Gen or later)"
)
) else (
call :ColorEcho 91 "CPU performance categorization not available."
)
goto :gpucheck
:gpucheck
echo.
echo GPU Check:
wmic path win32_VideoController get name /value > "%TEMP%\temp_gpu.txt"
for /f "usebackq tokens=2 delims==" %%I in (`type "%TEMP%\temp_gpu.txt" ^| findstr /i "name"`) do (
set "gpuName=%%I"
)
:: Trim whitespace from gpuName
for /f "tokens=* delims= " %%a in ("%gpuName%") do set "gpuName=%%a"
echo Detected GPU: %gpuName%
:: Lookup GPU Performance Category
set gpuCategory=Unknown
for /f "tokens=1,2 delims=," %%a in (%lookupFile%) do (
if /i "%%a"=="%gpuName%" set gpuCategory=%%b
)
:: Display GPU Performance Category
if defined gpuCategory (
if %gpuCategory%==Poor-Medium (
call :ColorEcho 93 "Poor-Medium Performance (%gpuName%)"
) else if %gpuCategory%==Medium (
call :ColorEcho 93 "Medium Performance (%gpuName%)"
) else if %gpuCategory%==High (
call :ColorEcho 92 "High Performance (%gpuName%)"
)
) else (
call :ColorEcho 91 "GPU performance categorization not available."
)
goto :evaluate
:: Evaluate System Performance and Display Message
:evaluate
echo.
if defined ramCategory if defined cpuCategory if defined gpuCategory (
if %ramCategory%==Low (
call :ColorEcho 91 "Your PC is eligible to play but expect Low FPS (30-40)."
) else if %ramCategory%==Medium (
if %cpuCategory%==Poor-Medium (
call :ColorEcho 91 "Your PC is eligible to play but expect Low FPS (30-40)."
) else if %cpuCategory%==Medium (
call :ColorEcho 93 "Your PC is eligible to play at Medium FPS (60-100)."
) else if %cpuCategory%==High (
call :ColorEcho 93 "Your PC is eligible to play at Medium FPS (60-100)."
) else (
call :ColorEcho 91 "Performance evaluation not available due to uncategorized CPU."
)
) else if %ramCategory%==High (
if %cpuCategory%==Poor-Medium (
call :ColorEcho 92 "Your PC is eligible to play at High FPS (144-300+)."
) else if %cpuCategory%==Medium (
call :ColorEcho 92 "Your PC is eligible to play at High FPS (144-300+)."
) else if %cpuCategory%==High (
call :ColorEcho 92 "Your PC is eligible to play at High FPS (144-300+)."
) else (
call :ColorEcho 91 "Performance evaluation not available due to uncategorized CPU."
)
) else (
call :ColorEcho 91 "Performance evaluation not available due to insufficient RAM."
)
) else (
call :ColorEcho 91 "Performance evaluation not available due to missing RAM, CPU, or GPU information."
)
:: Display warning for TPM 2.0 and Secure Boot if necessary
if "%tpmStatus%" neq "Enabled" (
call :ColorEcho 91 "Warning: In order to play Valorant, you must enable TPM 2.0."
)
if "%secureBootStatus%" neq "Enabled" (
call :ColorEcho 91 "Warning: In order to play Valorant, you must enable Secure Boot."
)
:end
del "%TEMP%\temp_cpu.txt"
del "%TEMP%\temp_ram.txt"
del "%TEMP%\temp_winver.txt"
del "%TEMP%\temp_gpu.txt"
del "%lookupFile%"
echo.
(pause)
goto :eof
:ColorEcho
echo [%1m%~2[0m
exit /b