mirror of
https://github.com/abbodi1406/KMS_VL_ALL_AIO.git
synced 2024-11-18 11:19:46 +01:00
v0.0.17-alpha
Add: support for multiple debug logs
This commit is contained in:
parent
147289e86f
commit
3a252a756c
1 changed files with 18 additions and 7 deletions
|
@ -140,6 +140,9 @@ set "_temp=%SystemRoot%\Temp"
|
||||||
set "_log=%~dpn0"
|
set "_log=%~dpn0"
|
||||||
set "_work=%~dp0"
|
set "_work=%~dp0"
|
||||||
if "%_work:~-1%"=="\" set "_work=%_work:~0,-1%"
|
if "%_work:~-1%"=="\" set "_work=%_work:~0,-1%"
|
||||||
|
for /f "tokens=2*" %%a in ('reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v Desktop') do call set "_dsk=%%b"
|
||||||
|
if exist "%SystemDrive%\Users\Public\Desktop\desktop.ini" set "_dsk=%SystemDrive%\Users\Public\Desktop"
|
||||||
|
set "_suf="
|
||||||
setlocal EnableDelayedExpansion
|
setlocal EnableDelayedExpansion
|
||||||
|
|
||||||
if %_Debug% EQU 0 (
|
if %_Debug% EQU 0 (
|
||||||
|
@ -149,7 +152,7 @@ if %_Debug% EQU 0 (
|
||||||
set "_Nul3=1>nul 2>nul"
|
set "_Nul3=1>nul 2>nul"
|
||||||
set "_Pause=pause >nul"
|
set "_Pause=pause >nul"
|
||||||
if %Unattend% EQU 1 set "_Pause="
|
if %Unattend% EQU 1 set "_Pause="
|
||||||
if %Silent% EQU 0 (goto :Begin) else (call :Begin >!_run! 2>&1)
|
if %Silent% EQU 0 (call :Begin) else (call :Begin >!_run! 2>&1)
|
||||||
) else (
|
) else (
|
||||||
set "_Nul1="
|
set "_Nul1="
|
||||||
set "_Nul2="
|
set "_Nul2="
|
||||||
|
@ -159,12 +162,16 @@ if %_Debug% EQU 0 (
|
||||||
if %Silent% EQU 0 (
|
if %Silent% EQU 0 (
|
||||||
echo.
|
echo.
|
||||||
echo Running in Debug Mode...
|
echo Running in Debug Mode...
|
||||||
echo The window will be closed when finished
|
if not defined _args (echo The window will be closed when finished) else (echo please wait...)
|
||||||
|
)
|
||||||
|
copy /y nul "!_work!\#.rw" 1>nul 2>nul && (if exist "!_work!\#.rw" del /f /q "!_work!\#.rw") || (set "_log=!_dsk!\%~n0")
|
||||||
|
if exist "!_log!_Debug.log" (
|
||||||
|
for /f "tokens=2 delims==." %%# in ('wmic os get localdatetime /value') do set "_date=%%#"
|
||||||
|
set "_suf=_!_date:~8,6!"
|
||||||
)
|
)
|
||||||
copy /y nul "!_work!\#.rw" 1>nul 2>nul && (if exist "!_work!\#.rw" del /f /q "!_work!\#.rw") || (set "_log=!_temp!\%~n0")
|
|
||||||
@echo on
|
@echo on
|
||||||
@prompt $G
|
@prompt $G
|
||||||
@call :Begin >"!_log!.tmp" 2>&1 &cmd /u /c type "!_log!.tmp">"!_log!_Debug.log"&del "!_log!.tmp"
|
@call :Begin >"!_log!_tmp.log" 2>&1 &cmd /u /c type "!_log!_tmp.log">"!_log!_Debug!_suf!.log"&del "!_log!_tmp.log"
|
||||||
)
|
)
|
||||||
@color 07
|
@color 07
|
||||||
@title %ComSpec%
|
@title %ComSpec%
|
||||||
|
@ -257,7 +264,7 @@ set _el=
|
||||||
echo.
|
echo.
|
||||||
echo %line3%
|
echo %line3%
|
||||||
echo.
|
echo.
|
||||||
echo [1] Activate: [%_dMode%] Mode
|
echo [1] Activate: [%_dMode% Mode]
|
||||||
echo.
|
echo.
|
||||||
echo [2] Install Auto Renewal [%_dHook%]
|
echo [2] Install Auto Renewal [%_dHook%]
|
||||||
echo [3] Uninstall Completely
|
echo [3] Uninstall Completely
|
||||||
|
@ -280,7 +287,7 @@ echo [R] Read Me
|
||||||
echo [S] Create $OEM$ Folder
|
echo [S] Create $OEM$ Folder
|
||||||
echo %line4%
|
echo %line4%
|
||||||
echo.
|
echo.
|
||||||
echo [9] Activate: [External] Mode
|
echo [9] Activate: [External Mode]
|
||||||
echo %line3%
|
echo %line3%
|
||||||
echo.
|
echo.
|
||||||
choice /c 123456789DXRS0 /n /m "> Choose a menu option, or press 0 to Exit: "
|
choice /c 123456789DXRS0 /n /m "> Choose a menu option, or press 0 to Exit: "
|
||||||
|
@ -1088,7 +1095,7 @@ echo.
|
||||||
echo $OEM$ Folder Created...
|
echo $OEM$ Folder Created...
|
||||||
echo.
|
echo.
|
||||||
set "_oem=!_work!"
|
set "_oem=!_work!"
|
||||||
copy /y nul "!_work!\#.rw" 1>nul 2>nul && (if exist "!_work!\#.rw" del /f /q "!_work!\#.rw") || (set "_oem=%SystemDrive%\Users\Public\Desktop")
|
copy /y nul "!_work!\#.rw" 1>nul 2>nul && (if exist "!_work!\#.rw" del /f /q "!_work!\#.rw") || (set "_oem=!_dsk!")
|
||||||
echo "!_oem!\$OEM$"
|
echo "!_oem!\$OEM$"
|
||||||
if not exist "!_oem!\$OEM$\$$\Setup\Scripts\KMS_VL_ALL_AIO.cmd" mkdir ""!_oem!\$OEM$\$$\Setup\Scripts"
|
if not exist "!_oem!\$OEM$\$$\Setup\Scripts\KMS_VL_ALL_AIO.cmd" mkdir ""!_oem!\$OEM$\$$\Setup\Scripts"
|
||||||
copy /y "%~f0" "!_oem!\$OEM$\$$\Setup\Scripts\KMS_VL_ALL_AIO.cmd" %_Nul3%
|
copy /y "%~f0" "!_oem!\$OEM$\$$\Setup\Scripts\KMS_VL_ALL_AIO.cmd" %_Nul3%
|
||||||
|
@ -2950,6 +2957,10 @@ setlocal
|
||||||
call "%~f0" !_para!
|
call "%~f0" !_para!
|
||||||
endlocal
|
endlocal
|
||||||
set _dDbg=Yes
|
set _dDbg=Yes
|
||||||
|
echo.
|
||||||
|
echo Done.
|
||||||
|
echo Press any key to continue...
|
||||||
|
pause >nul
|
||||||
goto :MainMenu
|
goto :MainMenu
|
||||||
|
|
||||||
:E_Admin
|
:E_Admin
|
||||||
|
|
Loading…
Reference in a new issue