text stringlengths 0 834k |
|---|
echo ^| ^| |
echo ^| Auto Renewal via Task Scheduler ^| |
echo ^| ^| |
echo ^| [1] Create Renewal Task ^| |
echo ^| ^| |
echo ^| [2] Create Renewal and Activation Task ^| |
echo ^|______________________________________________________^| |
echo ^| ^| |
echo ^| Manual Renewal via Desktop Context Menu ^| |
echo ^| ^| |
echo ^| [3] Add Desktop Context Menu ^| |
echo ^|______________________________________________________^| |
echo ^| ^| |
echo ^| [4] Exit ^| |
echo ^| ^| |
echo ^|______________________________________________________^| |
echo: |
choice /C:1234 /N /M "". Enter Your Choice [1,2,3,4] : "" |
if errorlevel 4 exit /b |
if errorlevel 3 goto:ContextMenu |
if errorlevel 2 set ActTask=1&goto:Task |
if errorlevel 1 goto:Task |
:====================================================================================================================================================== |
:Task |
cls |
if defined ActTask ( |
title Create Renewal And Activation Tasks |
) else ( |
title Create Renewal Task |
) |
reg query ""%key%"" /f Path /s | find /i ""\Online_KMS_Activation_Script-Renewal"" >nul && ( |
schtasks /delete /tn Online_KMS_Activation_Script-Renewal /f %nul% |
) |
reg query ""%key%"" /f Path /s | find /i ""\Online_KMS_Activation_Script-Run_Once"" >nul && ( |
schtasks /delete /tn Online_KMS_Activation_Script-Run_Once /f %nul% |
) |
If exist ""%_dest%\"" ( |
@RD /s /q ""%_dest%\"" %nul% |
) |
If exist ""%windir%\Online_KMS_Activation_Script\"" ( |
@RD /s /q ""%windir%\Online_KMS_Activation_Script\"" %nul% |
) |
If exist ""%ProgramData%\Online_KMS_Activation.cmd"" ( |
Reg delete ""HKCR\DesktopBackground\shell\Activate Windows - Office"" /f %nul% |
del /f /q ""%ProgramData%\Online_KMS_Activation.cmd"" %nul% |
set DelDeskCont=1 |
) |
md ""%_dest%\BIN\"" %nul% |
set ""_temp=%SystemRoot%\Temp\_KMS_Task_Work"" |
if exist ""%_temp%\"" @RD /S /Q ""%_temp%\"" %nul% |
md ""%_temp%\"" %nul% |
call :Export renewal ""%_temp%\Renewal.xml"" Unicode |
if defined ActTask (call :Export run_once ""%_temp%\Run_Once.xml"" Unicode) |
call :Export info ""%_dest%\Info.txt"" ASCII |
copy /y /b ""!_work!\BIN\cleanosppx64.exe"" ""%_dest%\BIN\cleanosppx64.exe"" %nul% |
copy /y /b ""!_work!\BIN\cleanosppx86.exe"" ""%_dest%\BIN\cleanosppx86.exe"" %nul% |
cd /d ""!_work!"" |
if defined _SkipWinAct ( |
%nul% %_psc% ""(gc Activate.cmd) -replace 'set ActWindows=1', 'set ActWindows=0' | Out-File -encoding ASCII ""%_dest%\Activate.cmd"""" || (set error_=1) |
) else ( |
copy /y /b ""!_work!\Activate.cmd"" ""%_dest%\Activate.cmd"" %nul% |
) |
schtasks /create /tn ""Online_KMS_Activation_Script-Renewal"" /ru ""SYSTEM"" /xml ""%_temp%\Renewal.xml"" %nul% |
if defined ActTask (schtasks /create /tn ""Online_KMS_Activation_Script-Run_Once"" /ru ""SYSTEM"" /xml ""%_temp%\Run_Once.xml"" %nul%) |
if exist ""%_temp%\"" @RD /S /Q ""%_temp%\"" %nul% |
::======================================================================================================================================== |
reg query ""%key%"" /f Path /s | find /i ""\Online_KMS_Activation_Script-Renewal"" >nul || (set error_=1) |
if defined ActTask reg query ""%key%"" /f Path /s | find /i ""\Online_KMS_Activation_Script-Run_Once"" >nul || (set error_=1) |
If not exist ""%_dest%\Activate.cmd"" (set error_=1) |
If not exist ""%_dest%\Info.txt"" (set error_=1) |
If not exist ""%_dest%\BIN\cleanosppx64.exe"" (set error_=1) |
If not exist ""%_dest%\BIN\cleanosppx86.exe"" (set error_=1) |
if defined error_ ( |
reg query ""%key%"" /f Path /s | find /i ""\Online_KMS_Activation_Script-Renewal"" >nul && ( |
schtasks /delete /tn Online_KMS_Activation_Script-Renewal /f %nul% |
) |
reg query ""%key%"" /f Path /s | find /i ""\Online_KMS_Activation_Script-Run_Once"" >nul && ( |
schtasks /delete /tn Online_KMS_Activation_Script-Run_Once /f %nul% |
) |
reg delete ""HKCR\DesktopBackground\shell\Activate Windows - Office"" /f %nul% |
If exist ""%_dest%\"" ( |
@RD /s /q ""%_dest%\"" %nul% |
) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.