diff options
Diffstat (limited to 'MAS/Separate-Files-Version/Activators')
| -rw-r--r-- | MAS/Separate-Files-Version/Activators/HWID_Activation.cmd | 39 | ||||
| -rw-r--r-- | MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd | 44 | ||||
| -rw-r--r-- | MAS/Separate-Files-Version/Activators/Ohook_Activation/BIN/sppc32.dll | bin | 9216 -> 9216 bytes | |||
| -rw-r--r-- | MAS/Separate-Files-Version/Activators/Ohook_Activation/BIN/sppc64.dll | bin | 9216 -> 9728 bytes | |||
| -rw-r--r-- | MAS/Separate-Files-Version/Activators/Ohook_Activation/Ohook_Activation.cmd | 105 | ||||
| -rw-r--r-- | MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd | 44 |
6 files changed, 175 insertions, 57 deletions
diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index 117bc18..4335271 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -1,3 +1,4 @@ +@set masver=2.3
@setlocal DisableDelayedExpansion
@echo off
@@ -97,7 +98,7 @@ popd cls
color 07
-title HWID Activation
+title HWID Activation %masver%
set _args=
set _elev=
@@ -194,7 +195,7 @@ set "_batp=%_batf:'=''%" set _PSarg="""%~f0""" -el %_args%
-set "_ttemp=%temp%"
+set "_ttemp=%userprofile%\AppData\Local\Temp"
setlocal EnableDelayedExpansion
@@ -240,9 +241,37 @@ exit /b ::========================================================================================================================================
+:: Check for updates
+
+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
+)
+
+if defined old (
+echo ________________________________________________
+%eline%
+echo You are running outdated version MAS %masver%
+echo ________________________________________________
+echo:
+if not %_unattended%==1 (
+echo [1] Download Latest MAS
+echo [0] Continue Anyway
+echo:
+call :dk_color %_Green% "Enter a menu option in the Keyboard [1,0] :"
+choice /C:10 /N
+if !errorlevel!==2 rem
+if !errorlevel!==1 (start ht%-%tps://github.com/mass%-%gravel/Microsoft-Acti%-%vation-Scripts & start %mas% & exit /b)
+)
+)
+
+::========================================================================================================================================
+
cls
mode 108, 34
-title HWID Activation
+title HWID Activation %masver%
:: Start Windows update service at the beginning and in later checks as well, because in some normal conditions one kick is not enough
@@ -891,7 +920,7 @@ set showfix=1 if defined safeboot_option (
set error=1
set showfix=1
-call :dk_color2 %Red% "Checking Boot Mode " %Blue% "[System is running in safe mode. Run in normal mode.]"
+call :dk_color2 %Red% "Checking Boot Mode " %Blue% "[Safe mode found. Run in normal mode.]"
)
@@ -905,7 +934,7 @@ call :dk_color2 %Red% "Checking Audit Mode " %Blue% "[IMAGE_ reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinPE" /v InstRoot %nul% && (
set error=1
set showfix=1
-call :dk_color2 %Red% "Checking WinPE " %Blue% "[System is running in WinPE mode. Run in normal mode.]"
+call :dk_color2 %Red% "Checking WinPE " %Blue% "[WinPE mode found. Run in normal mode.]"
)
diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index db57129..721d707 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -1,3 +1,4 @@ +@set masver=2.3
@setlocal DisableDelayedExpansion
@echo off
@@ -100,7 +101,7 @@ popd cls
color 07
-title KMS38 Activation
+title KMS38 Activation %masver%
set _args=
set _elev=
@@ -193,7 +194,7 @@ set "_batp=%_batf:'=''%" set _PSarg="""%~f0""" -el %_args%
-set "_ttemp=%temp%"
+set "_ttemp=%userprofile%\AppData\Local\Temp"
setlocal EnableDelayedExpansion
@@ -239,6 +240,35 @@ exit /b ::========================================================================================================================================
+:: Check for updates
+
+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
+)
+
+if defined old (
+echo ________________________________________________
+%eline%
+echo You are running outdated version MAS %masver%
+echo ________________________________________________
+echo:
+if not %_unattended%==1 (
+echo [1] Download Latest MAS
+echo [0] Continue Anyway
+echo:
+call :dk_color %_Green% "Enter a menu option in the Keyboard [1,0] :"
+choice /C:10 /N
+if !errorlevel!==2 rem
+if !errorlevel!==1 (start ht%-%tps://github.com/mass%-%gravel/Microsoft-Acti%-%vation-Scripts & start %mas% & exit /b)
+)
+)
+cls
+
+::========================================================================================================================================
+
if %_rem%==1 goto :k_uninstall
:k_menu
@@ -246,7 +276,7 @@ if %_rem%==1 goto :k_uninstall if %_unattended%==0 (
cls
mode 76, 25
-title KMS38 Activation
+title KMS38 Activation %masver%
echo:
echo:
@@ -277,7 +307,7 @@ goto :k_menu cls
mode 108, 34
-title KMS38 Activation
+title KMS38 Activation %masver%
echo:
echo Initializing...
@@ -754,7 +784,7 @@ goto :dk_done cls
mode 99, 28
-title Remove KMS38 Protection
+title Remove KMS38 Protection %masver%
%nul% reg delete "HKLM\%specific_kms%" /f
%nul% reg delete "HKU\S-1-5-20\%specific_kms%" /f
@@ -1037,7 +1067,7 @@ set showfix=1 if defined safeboot_option (
set error=1
set showfix=1
-call :dk_color2 %Red% "Checking Boot Mode " %Blue% "[System is running in safe mode. Run in normal mode.]"
+call :dk_color2 %Red% "Checking Boot Mode " %Blue% "[Safe mode found. Run in normal mode.]"
)
@@ -1051,7 +1081,7 @@ call :dk_color2 %Red% "Checking Audit Mode " %Blue% "[IMAGE_ reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinPE" /v InstRoot %nul% && (
set error=1
set showfix=1
-call :dk_color2 %Red% "Checking WinPE " %Blue% "[System is running in WinPE mode. Run in normal mode.]"
+call :dk_color2 %Red% "Checking WinPE " %Blue% "[WinPE mode found. Run in normal mode.]"
)
diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation/BIN/sppc32.dll b/MAS/Separate-Files-Version/Activators/Ohook_Activation/BIN/sppc32.dll Binary files differindex 42dc642..14fb3dc 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation/BIN/sppc32.dll +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation/BIN/sppc32.dll diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation/BIN/sppc64.dll b/MAS/Separate-Files-Version/Activators/Ohook_Activation/BIN/sppc64.dll Binary files differindex 03dfff6..b6d5dac 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation/BIN/sppc64.dll +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation/BIN/sppc64.dll diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation/Ohook_Activation.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation/Ohook_Activation.cmd index 70e54aa..7549b80 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation/Ohook_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation/Ohook_Activation.cmd @@ -1,3 +1,4 @@ +@set masver=2.3
@setlocal DisableDelayedExpansion
@echo off
@@ -97,7 +98,7 @@ popd cls
color 07
-title Ohook Activation
+title Ohook Activation %masver%
set _args=
set _elev=
@@ -186,7 +187,7 @@ set "_batp=%_batf:'=''%" set _PSarg="""%~f0""" -el %_args%
-set "_ttemp=%temp%"
+set "_ttemp=%userprofile%\AppData\Local\Temp"
setlocal EnableDelayedExpansion
@@ -232,6 +233,35 @@ exit /b ::========================================================================================================================================
+:: Check for updates
+
+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
+)
+
+if defined old (
+echo ________________________________________________
+%eline%
+echo You are running outdated version MAS %masver%
+echo ________________________________________________
+echo:
+if not %_unattended%==1 (
+echo [1] Download Latest MAS
+echo [0] Continue Anyway
+echo:
+call :dk_color %_Green% "Enter a menu option in the Keyboard [1,0] :"
+choice /C:10 /N
+if !errorlevel!==2 rem
+if !errorlevel!==1 (start ht%-%tps://github.com/mass%-%gravel/Microsoft-Acti%-%vation-Scripts & start %mas% & exit /b)
+)
+)
+cls
+
+::========================================================================================================================================
+
if %_rem%==1 goto :oh_uninstall
:oh_menu
@@ -239,7 +269,7 @@ if %_rem%==1 goto :oh_uninstall if %_unattended%==0 (
cls
mode 76, 25
-title Ohook Activation
+title Ohook Activation %masver%
echo:
echo:
@@ -275,7 +305,7 @@ cls mode 128, 32
%psc% "&{$W=$Host.UI.RawUI.WindowSize;$B=$Host.UI.RawUI.BufferSize;$W.Height=32;$B.Height=300;$Host.UI.RawUI.WindowSize=$W;$Host.UI.RawUI.BufferSize=$B;}"
-title Ohook Activation
+title Ohook Activation %masver%
:: Check files
@@ -496,35 +526,28 @@ call :oh_hookinstall ::========================================================================================================================================
:: Find remnants of Office vNext license block and remove it because it stops non vNext licenses from appearing
+:: https://learn.microsoft.com/en-us/office/troubleshoot/activation/reset-office-365-proplus-activation-state
set sub_next=
-set kNext=HKCU\SOFTWARE\Microsoft\Office\16.0\Common\Licensing
-reg query %kNext%\LicensingNext /v MigrationToV5Done %nul2% | find /i "0x1" %nul% && (
-reg query %kNext%\LicensingNext %nul2% | findstr /i "volume retail" %nul2% | findstr /i "0x2 0x3" %nul% && (
+for /f "tokens=* delims=" %%a in ('%psc% "$userSIDs = Get-WmiObject -Class Win32_UserAccount | ForEach-Object {write-host $_.SID}" %nul6%') do (if defined _sid (set "_sid=!_sid! HKU\%%a") else (set "_sid=HKU\%%a"))
+
+for %%# in (!_sid! HKCU) do if not defined sub_next (
+reg query %%#\Software\Microsoft\Office\16.0\Common\Licensing\LicensingNext /v MigrationToV5Done %nul2% | find /i "0x1" %nul% && (
+reg query %%#\Software\Microsoft\Office\16.0\Common\Licensing\LicensingNext %nul2% | findstr /i "volume retail" %nul2% | findstr /i "0x2 0x3" %nul% && (
set sub_next=1
-reg delete %kNext% /f %nul%
)
)
-
-if defined sub_next (
-reg query %kNext%\LicensingNext %nul% && (
-call :dk_color %Red% "Removing Office vNext Block [Failed]"
-) || (
-echo Removing Office vNext Block [Successful]
-)
)
-::========================================================================================================================================
-
-:: Subscription licenses attempt to validate the license and may show a banner "There was a problem checking this device's license status.", other products don't do that.
-:: A simple registry entry can skip this check
-
-if defined _sublic (
-echo Adding a Reg To Skip License Check [Successful]
-reg add HKCU\Software\Microsoft\Office\16.0\Common\Licensing\Resiliency /v "TimeOfLastHeartbeatFailure" /t REG_SZ /d "2033-08-18T22:18:45Z" /f %nul%
+if defined sub_next for %%# in (!_sid! HKCU) do (
+reg delete %%#\Software\Microsoft\Office\16.0\Common\Licensing /f %nul%
+reg delete %%#\Software\Microsoft\Office\16.0\Common\Identity /f %nul%
+reg delete %%#\Software\Microsoft\Office\16.0\Registration /f %nul%
)
+if defined sub_next echo Removing Office vNext Block [Successful]
+
::========================================================================================================================================
:: mass grave[.]dev/office-license-is-not-genuine.html
@@ -607,7 +630,7 @@ goto :dk_done cls
mode 99, 28
-title Uninstall Ohook Activation
+title Uninstall Ohook Activation %masver%
set _present=
set _unerror=
@@ -644,15 +667,21 @@ if exist "%%~A\Microsoft %%~G\root\vfs\%%#\sppc*dll" (set _present=1& del /s /f )
)
-reg query HKCU\Software\Microsoft\Office\16.0\Common\Licensing\Resiliency /s %nul2% | find /i "2033" %nul% && (
+reg query HKCU\Software\Microsoft\Office\16.0\Common\Licensing\Resiliency %nul% && (
echo:
-echo Deleting - HKCU\Software\Microsoft\Office\16.0\Common\Licensing\Resiliency
+echo Deleting - Registry keys to skip license check
reg delete HKCU\Software\Microsoft\Office\16.0\Common\Licensing\Resiliency /f
+
+for /f "tokens=* delims=" %%a in ('%psc% "$userSIDs = Get-WmiObject -Class Win32_UserAccount | ForEach-Object {write-host $_.SID}" %nul6%') do (if defined _sid (set "_sid=!_sid! %%a") else (set "_sid=%%a"))
+for %%# in (!_sid!) do (reg query HKU\%%#\Software\Microsoft\Office\16.0\Common\Licensing\Resiliency %nul% && (
+reg delete HKU\%%#\Software\Microsoft\Office\16.0\Common\Licensing\Resiliency /f
+)
+)
)
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\0ff1ce15-a989-479d-af46-f275c6370663" %nul% && (
echo:
-echo Deleting - Registry key to prevent non-genuine banner
+echo Deleting - Registry keys to prevent non-genuine banner
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\0ff1ce15-a989-479d-af46-f275c6370663" /f
)
@@ -789,6 +818,9 @@ exit /b set ierror=
set hasherror=
+if %_hook%==sppc32.dll set offset=2564
+if %_hook%==sppc64.dll set offset=3588
+
del /s /q "%_hookPath%\sppcs.dll" %nul%
del /s /q "%_hookPath%\sppc.dll" %nul%
@@ -812,10 +844,12 @@ set error=1 call :dk_color %Red% "Symlinking Systems sppc.dll [Failed]"
call :dk_color %Red% "Copying Custom %_hook% [Failed]"
echo ["%_hookPath%\sppc.dll"]
-call :dk_color %Blue% "Close Office apps if they are running and try again."
+echo:
+call :dk_color %Blue% "Close ALL Office apps including Outlook and try again."
+call :dk_color %Blue% "If its still not resolved then restart system and try again."
)
-if not defined ierror call :oh_modify "%_hookPath%\sppc.dll"
+if not defined ierror call :oh_modify "%_hookPath%\sppc.dll" "%offset%"
if not defined ierror (
if defined hasherror (
@@ -1076,7 +1110,7 @@ set showfix=1 if defined safeboot_option (
set error=1
set showfix=1
-call :dk_color2 %Red% "Checking Boot Mode " %Blue% "[System is running in safe mode. Run in normal mode.]"
+call :dk_color2 %Red% "Checking Boot Mode " %Blue% "[Safe mode found. Run in normal mode.]"
)
@@ -1090,7 +1124,7 @@ call :dk_color2 %Red% "Checking Audit Mode " %Blue% "[IMAGE_ reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinPE" /v InstRoot %nul% && (
set error=1
set showfix=1
-call :dk_color2 %Red% "Checking WinPE " %Blue% "[System is running in WinPE mode. Run in normal mode.]"
+call :dk_color2 %Red% "Checking WinPE " %Blue% "[WinPE mode found. Run in normal mode.]"
)
@@ -1487,15 +1521,10 @@ exit /b :oh_modify
-%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':hexedit\:.*';& ([ScriptBlock]::Create($f[1])) '%1';" %nul2% | find /i "Error found" %nul1% && set hasherror=1
+%psc% "$PePath='%1'; $offset='%2'; $f=[io.file]::ReadAllText('!_batp!') -split ':hexedit\:.*';iex ($f[1]);" %nul2% | find /i "Error found" %nul1% && set hasherror=1
exit /b
:hexedit:
-param (
- [Parameter()]
- [String]$PePath
-)
-
# Define dynamic assembly, module, and type
$AssemblyBuilder = [AppDomain]::CurrentDomain.DefineDynamicAssembly(4, 1)
$ModuleBuilder = $AssemblyBuilder.DefineDynamicModule(2, $False)
@@ -1510,7 +1539,7 @@ $Imagehlp = $TypeBuilder.CreateType() # File and offset information
$PeFile = Get-ChildItem -Path $PePath
$timestampOffset = 136
-$exportTimestampOffset = 3076
+$exportTimestampOffset = $offset
$checkSumOffset = 216
# Calculate timestamp
diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 78a74de..e4cee13 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -1,3 +1,4 @@ +@set masver=2.3
@setlocal DisableDelayedExpansion
@echo off
@@ -93,7 +94,7 @@ popd cls
color 07
-title Online KMS Activation
+title Online KMS Activation %masver%
:: You are not supposed to edit anything below this.
@@ -180,7 +181,7 @@ set "_batp=%_batf:'=''%" set _PSarg="""%~f0""" -el %_args%
-set "_ttemp=%temp%"
+set "_ttemp=%userprofile%\AppData\Local\Temp"
set "_Local=%LocalAppData%"
setlocal EnableDelayedExpansion
@@ -227,6 +228,35 @@ exit /b ::========================================================================================================================================
+:: Check for updates
+
+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
+)
+
+if defined old (
+echo ________________________________________________
+%eline%
+echo You are running outdated version MAS %masver%
+echo ________________________________________________
+echo:
+if not defined _unattended (
+echo [1] Download Latest MAS
+echo [0] Continue Anyway
+echo:
+call :_color %_Green% "Enter a menu option in the Keyboard [1,0] :"
+choice /C:10 /N
+if !errorlevel!==2 rem
+if !errorlevel!==1 (start ht%-%tps://github.com/mass%-%gravel/Microsoft-Acti%-%vation-Scripts & start %mas% & exit /b)
+)
+)
+cls
+
+::========================================================================================================================================
+
if %~z0 GEQ 300000 (set "_exitmsg=Go back") else (set "_exitmsg=Exit")
:: Check not x86 Windows
@@ -274,7 +304,7 @@ if defined _unattended if not defined _unattendedact goto Done ::========================================================================================================================================
-set "_title=Online KMS Activation"
+set "_title=Online KMS Activation %masver%"
set _gui=
:_KMS_Menu
@@ -483,7 +513,7 @@ mode con cols=98 lines=31 %psc% "&%_buf%"
title %_title%
) else (
-title Online KMS Activation
+title Online KMS Activation %masver%
)
if defined _gui if %_Debug%==1 mode con cols=98 lines=30
@@ -3277,7 +3307,7 @@ goto :eof cls
mode con: cols=91 lines=30
-title Online KMS Complete Uninstall
+title Online KMS Complete Uninstall %masver%
set "key=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\taskcache\tasks"
@@ -3388,7 +3418,7 @@ exit /b cls
mode con cols=91 lines=30
-title Install Activation Auto-Renewal
+title Install Activation Auto-Renewal %masver%
set error_=
set "_dest=%ProgramFiles%\Activation-Renewal"
@@ -3417,7 +3447,7 @@ if exist "%_temp%\.*" rmdir /s /q "%_temp%\" %nul% call :createInfo.txt
%psc% "$f=[io.file]::ReadAllText('!_batp!') -split \":_extracttask\:.*`r`n\"; [io.file]::WriteAllText('%_dest%\Activation_task.cmd', '@REM Dummy ' + '%random%' + [Environment]::NewLine + $f[1].Trim(), [System.Text.Encoding]::ASCII);"
-title Install Activation Auto-Renewal
+title Install Activation Auto-Renewal %masver%
::========================================================================================================================================
|
