-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOptimizeKit.bat
More file actions
66 lines (61 loc) · 2.67 KB
/
Copy pathOptimizeKit.bat
File metadata and controls
66 lines (61 loc) · 2.67 KB
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
@echo off
rem ============================================================
rem OptimizeKit v2.9 - CLI launcher, NON-ADMIN VERSION
rem Numbered menus through the PowerShell engine - no exe needed,
rem no UAC prompt, no elevation: HKCU-only tweaks + read-only
rem reports. For the full set, use OptimizeKit-Admin.bat.
rem
rem Optional: OptimizeKit.bat /exe uses the C++ CLI when
rem dist\OptimizeKit.exe exists.
rem ============================================================
setlocal EnableExtensions
title OptimizeKit - CLI (no admin)
cd /d "%~dp0"
set "ENGINE=PowerShell\OptimizeKit.ps1"
set "PSARGS=-NoProfile -ExecutionPolicy Bypass -File"
rem ---- /exe: prefer the compiled C++ CLI when it exists ----
if /i "%~1"=="/exe" (
if exist "dist\OptimizeKit.exe" (
"dist\OptimizeKit.exe" --cli
echo.
pause
exit /b 0
)
echo [!] dist\OptimizeKit.exe not found - falling back to the PowerShell CLI.
)
rem ---- direct engine flags: OptimizeKit.bat -Status / -Apply id1,id2 / -Profile gaming ----
if not "%~1"=="" (
powershell %PSARGS% "%ENGINE%" %*
echo.
pause
exit /b 0
)
echo.
echo ==============================================
echo OptimizeKit v2.9 - CLI menu [no admin]
echo ==============================================
echo.
echo [1] User kit - every user-safe (HKCU) tweak
echo [2] Status - read the live state of every tweak
echo [3] Individual - apply / restore tweaks one by one
echo [4] Profiles - user-safe variants of the profiles
echo [5] Network center - latency, DNS benchmark, fastest DNS
echo [6] Junk cleanup - user temp, caches (no system clean)
echo [7] Firmware - BIOS / SecureBoot / TPM (read-only)
echo [8] Drivers - GPU age, vendor page (report only)
echo [9] Restore ALL - undo every user-safe tweak
echo [0] Exit
echo.
choice /C 1234567890 /N /M " Choose [1-9/0]: "
set "C=%errorlevel%"
if "%C%"=="1" ( powershell %PSARGS% "%ENGINE%" -User & pause & exit /b 0 )
if "%C%"=="2" ( powershell %PSARGS% "%ENGINE%" -Status & pause & exit /b 0 )
if "%C%"=="3" ( powershell %PSARGS% "%ENGINE%" -Tweaks & pause & exit /b 0 )
if "%C%"=="4" ( powershell %PSARGS% "%ENGINE%" -Profile & pause & exit /b 0 )
if "%C%"=="5" ( powershell %PSARGS% "%ENGINE%" -Network & pause & exit /b 0 )
if "%C%"=="6" ( powershell %PSARGS% "%ENGINE%" -Cleanup & pause & exit /b 0 )
if "%C%"=="7" ( powershell %PSARGS% "%ENGINE%" -Firmware & pause & exit /b 0 )
if "%C%"=="8" ( powershell %PSARGS% "%ENGINE%" -Drivers & pause & exit /b 0 )
if "%C%"=="9" ( powershell %PSARGS% "%ENGINE%" -RestoreAll & pause & exit /b 0 )
if "%C%"=="10" ( exit /b 0 )
goto :eof