Skip to content

Commit

Permalink
2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
WindowsAddict committed Oct 21, 2023
1 parent 569681d commit ed455ca
Show file tree
Hide file tree
Showing 12 changed files with 404 additions and 207 deletions.
217 changes: 120 additions & 97 deletions MAS/All-In-One-Version/MAS_AIO.cmd

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions MAS/Separate-Files-Version/Activators/HWID_Activation.cmd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@set masver=2.3
@set masver=2.4
@setlocal DisableDelayedExpansion
@echo off

Expand Down Expand Up @@ -219,7 +219,7 @@ goto dk_done
%nul1% fltmc || (
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg:'=''!\"' -verb runas" && exit /b
%eline%
echo This script require admin privileges.
echo This script requires admin privileges.
echo To do so, right click on this script and select 'Run as administrator'.
goto dk_done
)
Expand All @@ -246,8 +246,8 @@ exit /b
set -=
set old=

for /f "delims=[] tokens=2" %%# in ('ping -n 1 updatecheck.mass%-%grave.dev') do (
if not [%%#]==[] echo "%%#" | find "127.69.%masver%" %nul1% || set old=1
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 updatecheck.mass%-%grave.dev') do (
if not [%%#]==[] (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.69.%masver%" %nul1% || set old=1))
)

if defined old (
Expand Down
8 changes: 4 additions & 4 deletions MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@set masver=2.3
@set masver=2.4
@setlocal DisableDelayedExpansion
@echo off

Expand Down Expand Up @@ -218,7 +218,7 @@ goto dk_done
%nul1% fltmc || (
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg:'=''!\"' -verb runas" && exit /b
%eline%
echo This script require admin privileges.
echo This script requires admin privileges.
echo To do so, right click on this script and select 'Run as administrator'.
goto dk_done
)
Expand All @@ -245,8 +245,8 @@ exit /b
set -=
set old=

for /f "delims=[] tokens=2" %%# in ('ping -n 1 updatecheck.mass%-%grave.dev') do (
if not [%%#]==[] echo "%%#" | find "127.69.%masver%" %nul1% || set old=1
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 updatecheck.mass%-%grave.dev') do (
if not [%%#]==[] (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.69.%masver%" %nul1% || set old=1))
)

if defined old (
Expand Down

This file was deleted.

Binary file not shown.
Binary file not shown.

Large diffs are not rendered by default.

22 changes: 13 additions & 9 deletions MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@set masver=2.3
@set masver=2.4
@setlocal DisableDelayedExpansion
@echo off

Expand Down Expand Up @@ -138,14 +138,18 @@ if /i "%%A"=="-el" (set _elev=1

::========================================================================================================================================

set "nul1=1>nul"
set "nul2=2>nul"
set "nul6=2^>nul"
set "nul=>nul 2>&1"

set psc=powershell.exe
set winbuild=1
for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G

set _NCS=1
if %winbuild% LSS 10586 set _NCS=0
if %winbuild% GEQ 10586 reg query "HKCU\Console" /v ForceV2 2>nul | find /i "0x0" 1>nul && (set _NCS=0)
if %winbuild% GEQ 10586 reg query "HKCU\Console" /v ForceV2 %nul2% | find /i "0x0" %nul1% && (set _NCS=0)

call :_colorprep
set "_buf={$W=$Host.UI.RawUI.WindowSize;$B=$Host.UI.RawUI.BufferSize;$W.Height=31;$B.Height=300;$Host.UI.RawUI.WindowSize=$W;$Host.UI.RawUI.BufferSize=$B;}"
Expand Down Expand Up @@ -188,7 +192,7 @@ setlocal EnableDelayedExpansion

::========================================================================================================================================

echo "!_batf!" | find /i "!_ttemp!" 1>nul && (
echo "!_batf!" | find /i "!_ttemp!" %nul1% && (
if /i not "!_work!"=="!_ttemp!" (
%nceline%
echo Script is launched from the temp folder,
Expand All @@ -203,10 +207,10 @@ goto Done

:: Elevate script as admin and pass arguments and preventing loop

>nul fltmc || (
%nul1% fltmc || (
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg:'=''!\"' -verb runas" && exit /b
%nceline%
echo This script require admin privileges.
echo This script requires admin privileges.
echo To do so, right click on this script and select 'Run as administrator'.
goto Done
)
Expand All @@ -219,8 +223,8 @@ goto Done
if defined _unattended set quedit=1
for %%# in (%_args%) do (if /i "%%#"=="-qedit" set quedit=1)

reg query HKCU\Console /v QuickEdit 2>nul | find /i "0x0" %nul% || if not defined quedit (
reg add HKCU\Console /v QuickEdit /t REG_DWORD /d "0" /f %nul%
reg query HKCU\Console /v QuickEdit %nul2% | find /i "0x0" %nul1% || if not defined quedit (
reg add HKCU\Console /v QuickEdit /t REG_DWORD /d "0" /f %nul1%
start cmd.exe /c ""!_batf!" %_args% -qedit"
rem quickedit reset code is added at the starting of the script instead of here because it takes time to reflect in some cases
exit /b
Expand All @@ -233,8 +237,8 @@ exit /b
set -=
set old=

for /f "delims=[] tokens=2" %%# in ('ping -n 1 updatecheck.mass%-%grave.dev') do (
if not [%%#]==[] echo "%%#" | find "127.69.%masver%" %nul1% || set old=1
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 updatecheck.mass%-%grave.dev') do (
if not [%%#]==[] (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.69.%masver%" %nul1% || set old=1))
)

if defined old (
Expand Down
15 changes: 9 additions & 6 deletions MAS/Separate-Files-Version/Change_Edition.cmd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@set masver=2.3
@set masver=2.4
@setlocal DisableDelayedExpansion
@echo off

Expand Down Expand Up @@ -194,7 +194,7 @@ goto ced_done
%nul1% fltmc || (
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg:'=''!\"' -verb runas" && exit /b
%eline%
echo This script require admin privileges.
echo This script requires admin privileges.
echo To do so, right click on this script and select 'Run as administrator'.
goto ced_done
)
Expand All @@ -220,8 +220,8 @@ exit /b
set -=
set old=

for /f "delims=[] tokens=2" %%# in ('ping -n 1 updatecheck.mass%-%grave.dev') do (
if not [%%#]==[] echo "%%#" | find "127.69.%masver%" %nul1% || set old=1
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 updatecheck.mass%-%grave.dev') do (
if not [%%#]==[] (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.69.%masver%" %nul1% || set old=1))
)

if defined old (
Expand Down Expand Up @@ -678,7 +678,11 @@ exit /b

if %_wmic% EQU 1 set "chkedi=for /f "tokens=2 delims==" %%a in ('"wmic path SoftwareLicensingProduct where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f') get LicenseFamily /VALUE" %nul6%')"
if %_wmic% EQU 0 set "chkedi=for /f "tokens=2 delims==" %%a in ('%psc% "(([WMISEARCHER]'SELECT LicenseFamily FROM SoftwareLicensingProduct WHERE ApplicationID=''55c92734-d682-4d71-983e-d6ec3f16059f''').Get()).LicenseFamily ^| %% {echo ('LicenseFamily='+$_)}" %nul6%')"
%chkedi% do (call set "_wtarget= !_wtarget! %%a ")
%chkedi% do (
call if exist %Systemdrive%\Windows\System32\spp\tokens\skus\%%a (
call set "_wtarget= !_wtarget! %%a "
)
)
exit /b

:: Check wmic.exe
Expand Down Expand Up @@ -729,7 +733,6 @@ function Test-PendingReboot
if (Test-Path -Path "$env:windir\WinSxS\pending.xml") { return $true }
if (Get-ChildItem "HKLM:\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending" -EA Ignore) { return $true }
if (Get-Item "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired" -EA Ignore) { return $true }
if (Get-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager" -Name PendingFileRenameOperations -EA Ignore) { return $true }
try {
$util = [wmiclass]"\\.\root\ccm\clientsdk:CCM_ClientUtilities"
$status = $util.DetermineIfRebootPending()
Expand Down
84 changes: 42 additions & 42 deletions MAS/Separate-Files-Version/Extract_OEM_Folder.cmd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@set masver=2.3
@set masver=2.4
@setlocal DisableDelayedExpansion
@echo off

Expand Down Expand Up @@ -186,7 +186,7 @@ goto done2
%nul1% fltmc || (
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg:'=''!\"' -verb runas" && exit /b
%eline%
echo This script require admin privileges.
echo This script requires admin privileges.
echo To do so, right click on this script and select 'Run as administrator'.
goto done2
)
Expand All @@ -212,8 +212,8 @@ exit /b
set -=
set old=

for /f "delims=[] tokens=2" %%# in ('ping -n 1 updatecheck.mass%-%grave.dev') do (
if not [%%#]==[] echo "%%#" | find "127.69.%masver%" %nul1% || set old=1
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 updatecheck.mass%-%grave.dev') do (
if not [%%#]==[] (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.69.%masver%" %nul1% || set old=1))
)

if defined old (
Expand Down Expand Up @@ -268,19 +268,15 @@ goto done2
set HWID_Activation.cmd=Activators\HWID_Activation.cmd
set KMS38_Activation.cmd=Activators\KMS38_Activation.cmd
set Online_KMS_Activation.cmd=Activators\Online_KMS_Activation.cmd
set Ohook_Activation.cmd=Activators\Ohook_Activation\Ohook_Activation.cmd
set sppc32.dll=Activators\Ohook_Activation\BIN\sppc32.dll
set sppc64.dll=Activators\Ohook_Activation\BIN\sppc64.dll
set Ohook_Activation_AIO.cmd=Activators\Ohook_Activation_AIO.cmd
pushd "!_work!"

set _nofile=
for %%# in (
%HWID_Activation.cmd%
%KMS38_Activation.cmd%
%Online_KMS_Activation.cmd%
%Ohook_Activation.cmd%
%sppc32.dll%
%sppc64.dll%
%Ohook_Activation_AIO.cmd%
) do (
if not exist "%%#" set _nofile=1
)
Expand Down Expand Up @@ -375,18 +371,14 @@ cd \
:ohook

cls
md "!desktop!\$OEM$\$$\Setup\Scripts\BIN"
md "!desktop!\$OEM$\$$\Setup\Scripts"
pushd "!_work!"
copy /y /b "%Ohook_Activation.cmd%" "!_dir!\Ohook_Activation.cmd" %nul%
copy /y /b "%sppc32.dll%" "!_dir!\BIN\sppc32.dll" %nul%
copy /y /b "%sppc64.dll%" "!_dir!\BIN\sppc64.dll" %nul%
copy /y /b %Ohook_Activation_AIO.cmd% "!_dir!\Ohook_Activation_AIO.cmd" %nul%
popd
call :export ohook_setup

set _error=
if not exist "!_dir!\Ohook_Activation.cmd" set _error=1
if not exist "!_dir!\BIN\sppc32.dll" set _error=1
if not exist "!_dir!\BIN\sppc64.dll" set _error=1
if not exist "!_dir!\Ohook_Activation_AIO.cmd" set _error=1
if not exist "!_dir!\SetupComplete.cmd" set _error=1
if defined _error goto errorfound

Expand All @@ -398,7 +390,7 @@ goto done

fltmc >nul || exit /b

call "%~dp0Ohook_Activation.cmd" /Ohook
call "%~dp0Ohook_Activation_AIO.cmd" /Ohook

cd \
(goto) 2>nul & (if "%~dp0"=="%SystemRoot%\Setup\Scripts\" rd /s /q "%~dp0")
Expand Down Expand Up @@ -469,20 +461,16 @@ cd \
:hwid_ohook

cls
md "!desktop!\$OEM$\$$\Setup\Scripts\BIN"
md "!desktop!\$OEM$\$$\Setup\Scripts"
pushd "!_work!"
copy /y /b "%HWID_Activation.cmd%" "!_dir!\HWID_Activation.cmd" %nul%
copy /y /b "%Ohook_Activation.cmd%" "!_dir!\Ohook_Activation.cmd" %nul%
copy /y /b "%sppc32.dll%" "!_dir!\BIN\sppc32.dll" %nul%
copy /y /b "%sppc64.dll%" "!_dir!\BIN\sppc64.dll" %nul%
copy /y /b "%Ohook_Activation_AIO.cmd%" "!_dir!\Ohook_Activation_AIO.cmd" %nul%
popd
call :export hwid_ohook_setup

set _error=
if not exist "!_dir!\HWID_Activation.cmd" set _error=1
if not exist "!_dir!\Ohook_Activation.cmd" set _error=1
if not exist "!_dir!\BIN\sppc32.dll" set _error=1
if not exist "!_dir!\BIN\sppc64.dll" set _error=1
if not exist "!_dir!\Ohook_Activation_AIO.cmd" set _error=1
if not exist "!_dir!\SetupComplete.cmd" set _error=1
if defined _error goto errorfound

Expand All @@ -494,9 +482,13 @@ goto done

fltmc >nul || exit /b

setlocal
call "%~dp0HWID_Activation.cmd" /HWID
endlocal

call "%~dp0Ohook_Activation.cmd" /Ohook
setlocal
call "%~dp0Ohook_Activation_AIO.cmd" /Ohook
endlocal

cd \
(goto) 2>nul & (if "%~dp0"=="%SystemRoot%\Setup\Scripts\" rd /s /q "%~dp0")
Expand Down Expand Up @@ -528,9 +520,13 @@ goto done

fltmc >nul || exit /b

setlocal
call "%~dp0HWID_Activation.cmd" /HWID
endlocal

setlocal
call "%~dp0Online_KMS_Activation.cmd" /KMS-ActAndRenewalTask /KMS-Office
endlocal

cd \
(goto) 2>nul & (if "%~dp0"=="%SystemRoot%\Setup\Scripts\" rd /s /q "%~dp0")
Expand All @@ -541,20 +537,16 @@ cd \
:kms38_ohook

cls
md "!desktop!\$OEM$\$$\Setup\Scripts\BIN"
md "!desktop!\$OEM$\$$\Setup\Scripts"
pushd "!_work!"
copy /y /b "%KMS38_Activation.cmd%" "!_dir!\KMS38_Activation.cmd" %nul%
copy /y /b "%Ohook_Activation.cmd%" "!_dir!\Ohook_Activation.cmd" %nul%
copy /y /b "%sppc32.dll%" "!_dir!\BIN\sppc32.dll" %nul%
copy /y /b "%sppc64.dll%" "!_dir!\BIN\sppc64.dll" %nul%
copy /y /b "%Ohook_Activation_AIO.cmd%" "!_dir!\Ohook_Activation_AIO.cmd" %nul%
popd
call :export kms38_ohook_setup

set _error=
if not exist "!_dir!\KMS38_Activation.cmd" set _error=1
if not exist "!_dir!\Ohook_Activation.cmd" set _error=1
if not exist "!_dir!\BIN\sppc32.dll" set _error=1
if not exist "!_dir!\BIN\sppc64.dll" set _error=1
if not exist "!_dir!\Ohook_Activation_AIO.cmd" set _error=1
if not exist "!_dir!\SetupComplete.cmd" set _error=1
if defined _error goto errorfound

Expand All @@ -566,9 +558,13 @@ goto done

fltmc >nul || exit /b

setlocal
call "%~dp0KMS38_Activation.cmd" /KMS38
endlocal

call "%~dp0Ohook_Activation.cmd" /Ohook
setlocal
call "%~dp0Ohook_Activation_AIO.cmd" /Ohook
endlocal

cd \
(goto) 2>nul & (if "%~dp0"=="%SystemRoot%\Setup\Scripts\" rd /s /q "%~dp0")
Expand Down Expand Up @@ -600,9 +596,13 @@ goto done

fltmc >nul || exit /b

setlocal
call "%~dp0KMS38_Activation.cmd" /KMS38
endlocal

setlocal
call "%~dp0Online_KMS_Activation.cmd" /KMS-ActAndRenewalTask /KMS-Office
endlocal

cd \
(goto) 2>nul & (if "%~dp0"=="%SystemRoot%\Setup\Scripts\" rd /s /q "%~dp0")
Expand All @@ -613,20 +613,16 @@ cd \
:kms_ohook

cls
md "!desktop!\$OEM$\$$\Setup\Scripts\BIN"
md "!desktop!\$OEM$\$$\Setup\Scripts"
pushd "!_work!"
copy /y /b "%Online_KMS_Activation.cmd%" "!_dir!\Online_KMS_Activation.cmd" %nul%
copy /y /b "%Ohook_Activation.cmd%" "!_dir!\Ohook_Activation.cmd" %nul%
copy /y /b "%sppc32.dll%" "!_dir!\BIN\sppc32.dll" %nul%
copy /y /b "%sppc64.dll%" "!_dir!\BIN\sppc64.dll" %nul%
copy /y /b "%Ohook_Activation_AIO.cmd%" "!_dir!\Ohook_Activation_AIO.cmd" %nul%
popd
call :export kms_ohook_setup

set _error=
if not exist "!_dir!\Online_KMS_Activation.cmd" set _error=1
if not exist "!_dir!\Ohook_Activation.cmd" set _error=1
if not exist "!_dir!\BIN\sppc32.dll" set _error=1
if not exist "!_dir!\BIN\sppc64.dll" set _error=1
if not exist "!_dir!\Ohook_Activation_AIO.cmd" set _error=1
if not exist "!_dir!\SetupComplete.cmd" set _error=1
if defined _error goto errorfound

Expand All @@ -638,9 +634,13 @@ goto done

fltmc >nul || exit /b

setlocal
call "%~dp0Online_KMS_Activation.cmd" /KMS-ActAndRenewalTask /KMS-Windows
endlocal

call "%~dp0Ohook_Activation.cmd" /Ohook
setlocal
call "%~dp0Ohook_Activation_AIO.cmd" /Ohook
endlocal

cd \
(goto) 2>nul & (if "%~dp0"=="%SystemRoot%\Setup\Scripts\" rd /s /q "%~dp0")
Expand Down

0 comments on commit ed455ca

Please sign in to comment.