-
Notifications
You must be signed in to change notification settings - Fork 471
/
CFG_lock.cmd
executable file
·37 lines (35 loc) · 1008 Bytes
/
CFG_lock.cmd
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
@echo off
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
goto request
) else (goto start)
:request
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
set params = %*:"=""
echo UAC.ShellExecute "cmd.exe", "/c %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
del "%temp%\getadmin.vbs"
exit /b
:start
pushd %~dp0bin
echo Xiaomi Mi Notebook Pro CFG Lock patch by _Cyb_
h2ouve -gv cpusetup_my.txt -n CpuSetup
if exist "cpusetup_my.txt" (
echo Successfully read variables
) else (
echo Failed to read variables!
pause
exit /b
)
powershell set-executionpolicy remotesigned
powershell ./patchscript_cfgl
if exist "cpusetup_patched.txt" (
echo Writing patched variables
h2ouve -sv cpusetup_patched.txt -n CpuSetup
echo Done! Do not forget to reboot!
) else (
echo FAILED!
)
echo.
pause