mirror of
https://github.com/massgravel/Microsoft-Activation-Scripts.git
synced 2026-04-30 14:31:22 +00:00
Compare commits
20 Commits
e2c52b4ac8
...
3.7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d940db1e60 | ||
|
|
ab6b572af9 | ||
|
|
75a4d2e3a7 | ||
|
|
fd2cecb4ec | ||
|
|
a9c2f58741 | ||
|
|
79012c7db0 | ||
|
|
caffa62abe | ||
|
|
a8f6d051a6 | ||
|
|
6022b6de10 | ||
|
|
4ea26906cd | ||
|
|
564aad78b4 | ||
|
|
d5e382e763 | ||
|
|
793550725a | ||
|
|
3917497c82 | ||
|
|
28c2264d89 | ||
|
|
a51ae62332 | ||
|
|
ffcb641f17 | ||
|
|
53a2747338 | ||
|
|
3a99ea4eeb | ||
|
|
e6eaeaa682 |
6
.gitattributes
vendored
6
.gitattributes
vendored
@@ -1,4 +1,4 @@
|
|||||||
# MAS export-ignore
|
MAS export-ignore
|
||||||
# LICENSE export-ignore
|
LICENSE export-ignore
|
||||||
# README.md export-ignore
|
README.md export-ignore
|
||||||
.gitattributes export-ignore
|
.gitattributes export-ignore
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
@::yfh37fow-random
|
@::r45f3r3-random
|
||||||
@set masver=3.4
|
@set masver=3.7
|
||||||
@setlocal DisableDelayedExpansion
|
@setlocal DisableDelayedExpansion
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:: For command line switches, check mass<>grave<.>dev/command_line_switches
|
:: For command line switches, check mass()grave(dot)dev/command_line_switches
|
||||||
:: If you want to better understand script, read from separate files version.
|
:: If you want to better understand script, read from separate files version.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
::============================================================================
|
::============================================================================
|
||||||
::
|
::
|
||||||
:: Homepage: mass<>grave<.>dev
|
:: Homepage: mass()grave(dot)dev
|
||||||
:: Email: mas.help@outlook.com
|
:: Email: mas.help@outlook.com
|
||||||
::
|
::
|
||||||
::============================================================================
|
::============================================================================
|
||||||
@@ -44,6 +44,7 @@ set "_cmdf=%~f0"
|
|||||||
for %%# in (%*) do (
|
for %%# in (%*) do (
|
||||||
if /i "%%#"=="re1" set re1=1
|
if /i "%%#"=="re1" set re1=1
|
||||||
if /i "%%#"=="re2" set re2=1
|
if /i "%%#"=="re2" set re2=1
|
||||||
|
if /i "%%#"=="-qedit" (set re1=1&set re2=1)
|
||||||
)
|
)
|
||||||
|
|
||||||
:: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows
|
:: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows
|
||||||
@@ -1178,7 +1179,7 @@ goto :dk_done
|
|||||||
set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe
|
set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe
|
||||||
set psc=%ps% -nop -c
|
set psc=%ps% -nop -c
|
||||||
set winbuild=1
|
set winbuild=1
|
||||||
for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G
|
for /f "tokens=2 delims=[]" %%G in ('ver') do for /f "tokens=2,3,4 delims=. " %%H in ("%%~G") do set "winbuild=%%J"
|
||||||
|
|
||||||
set _slexe=sppsvc.exe& set _slser=sppsvc
|
set _slexe=sppsvc.exe& set _slser=sppsvc
|
||||||
if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc)
|
if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc)
|
||||||
@@ -1658,7 +1659,7 @@ sc start %%# %nul%
|
|||||||
if !errorlevel! EQU 1060 set _corrupt=1
|
if !errorlevel! EQU 1060 set _corrupt=1
|
||||||
sc query %%# %nul% || set _corrupt=1
|
sc query %%# %nul% || set _corrupt=1
|
||||||
for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _regcorr (
|
for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _regcorr (
|
||||||
reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr="-RegistryError" )
|
reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr=-RegistryError)
|
||||||
)
|
)
|
||||||
|
|
||||||
if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#!_regcorr!") else (set "serv_cor=%%#!_regcorr!"))
|
if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#!_regcorr!") else (set "serv_cor=%%#!_regcorr!"))
|
||||||
@@ -1984,7 +1985,7 @@ cmd /c exit /b %error_code%
|
|||||||
if %error_code% NEQ 0 set "error_code=0x%=ExitCode%"
|
if %error_code% NEQ 0 set "error_code=0x%=ExitCode%"
|
||||||
|
|
||||||
if %error_code% NEQ 0 (
|
if %error_code% NEQ 0 (
|
||||||
call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] %error_code%"
|
call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] [%error_code%]"
|
||||||
if not defined showfix (
|
if not defined showfix (
|
||||||
echo:
|
echo:
|
||||||
call :dk_color %Blue% "%_fixmsg%"
|
call :dk_color %Blue% "%_fixmsg%"
|
||||||
@@ -2003,6 +2004,7 @@ call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
|||||||
|
|
||||||
if not defined apps (
|
if not defined apps (
|
||||||
%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul%
|
%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul%
|
||||||
|
if not defined _vis if !errorlevel! NEQ 0 set rlicfailed=1
|
||||||
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -2024,6 +2026,13 @@ set error=1
|
|||||||
set showfix=1
|
set showfix=1
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if not defined showfix if defined rlicfailed (
|
||||||
|
echo:
|
||||||
|
call :dk_color %Blue% "%_fixmsg%"
|
||||||
|
call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option."
|
||||||
|
echo:
|
||||||
|
)
|
||||||
|
|
||||||
if %winbuild% GEQ 7600 if exist "%tokenstore%\" if not exist "%tokenstore%\tokens.dat" (
|
if %winbuild% GEQ 7600 if exist "%tokenstore%\" if not exist "%tokenstore%\tokens.dat" (
|
||||||
call :dk_color %Red% "Checking SPP tokens.dat [Not Found] [%tokenstore%\]"
|
call :dk_color %Red% "Checking SPP tokens.dat [Not Found] [%tokenstore%\]"
|
||||||
)
|
)
|
||||||
@@ -2162,19 +2171,22 @@ call :dk_color %Gray% "Checking SkipRearm [Default 0 Value
|
|||||||
|
|
||||||
if %winbuild% GEQ 9200 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" (
|
if %winbuild% GEQ 9200 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" (
|
||||||
%psc% "Get-WmiObject -Query 'SELECT Description FROM SoftwareLicensingProduct WHERE PartialProductKey IS NOT NULL AND LicenseDependsOn IS NULL' | Select-Object -Property Description" %nul2% | findstr /i "KMS_" %nul1% || (
|
%psc% "Get-WmiObject -Query 'SELECT Description FROM SoftwareLicensingProduct WHERE PartialProductKey IS NOT NULL AND LicenseDependsOn IS NULL' | Select-Object -Property Description" %nul2% | findstr /i "KMS_" %nul1% || (
|
||||||
for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' -TaskPath '\Microsoft\Windows\SoftwareProtectionPlatform\').State" %nul6%') do (set taskinfo=%%a)
|
for /f "delims=" %%a in ('%psc% "$s=New-Object -ComObject 'Schedule.Service'; $s.Connect(); $state=$s.GetFolder('\Microsoft\Windows\SoftwareProtectionPlatform').GetTask('SvcRestartTask').State; @{0='Unknown';1='Disabled';2='Queued';3='Ready';4='Running'}[$state]" %nul6%') do (set taskinfo=%%a)
|
||||||
|
|
||||||
echo !taskinfo! | find /i "Ready" %nul% || (
|
echo !taskinfo! | find /i "Ready" %nul% || (
|
||||||
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul%
|
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul%
|
||||||
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed
|
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed
|
||||||
if "!taskinfo!"=="" set "taskinfo=Not Found"
|
if "!taskinfo!"=="" set "taskinfo=Not Found"
|
||||||
|
|
||||||
call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, system might deactivate later]"
|
call :dk_color %Gray% "Checking SvcRestartTask Status [!taskinfo!. System might deactivate later.]"
|
||||||
if not defined showfix (
|
if not defined showfix (
|
||||||
echo:
|
echo:
|
||||||
|
echo "!taskinfo!" | findstr /i "Removed Not Found" %nul1% && (
|
||||||
|
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||||
|
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||||
|
) || (
|
||||||
call :dk_color %Blue% "Reboot your machine using the restart option and run the script again."
|
call :dk_color %Blue% "Reboot your machine using the restart option and run the script again."
|
||||||
set fixes=%fixes% %mas%troubleshoot
|
)
|
||||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
|
||||||
echo:
|
echo:
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@@ -2292,11 +2304,10 @@ exit /b
|
|||||||
:: 2nd column = Generic Retail/OEM/MAK Key
|
:: 2nd column = Generic Retail/OEM/MAK Key
|
||||||
:: 3rd column = SKU ID
|
:: 3rd column = SKU ID
|
||||||
:: 4th column = Key part number
|
:: 4th column = Key part number
|
||||||
:: 5th column = Ticket signature value. It's as it is, it's not encoded. (Check mass<>grave<.>dev/hwid#manual-activation to see how it's generated)
|
:: 5th column = 1 = activation is not working (at the time of writing this), 0 = activation is working
|
||||||
:: 6th column = 1 = activation is not working (at the time of writing this), 0 = activation is working
|
:: 6th column = Key Type
|
||||||
:: 7th column = Key Type
|
:: 7th column = WMI Edition ID (For reference only)
|
||||||
:: 8th column = WMI Edition ID (For reference only)
|
:: 8th column = Version name incase same Edition ID is used in different OS versions with different key
|
||||||
:: 9th column = Version name incase same Edition ID is used in different OS versions with different key
|
|
||||||
:: Separator = _
|
:: Separator = _
|
||||||
|
|
||||||
|
|
||||||
@@ -2304,39 +2315,39 @@ exit /b
|
|||||||
|
|
||||||
set f=
|
set f=
|
||||||
for %%# in (
|
for %%# in (
|
||||||
8b351c9c-f398-4515-9900-09df49427262_XGVPP-NMH47-7TTHJ-W3FW7-8H%f%V2C___4_X19-99683_HGNKjkKcKQHO6n8srMUrDh/MElffBZarLqCMD9rWtgFKf3YzYOLDPEMGhuO/auNMKCeiU7ebFbQALS/MyZ7TvidMQ2dvzXeXXKzPBjfwQx549WJUU7qAQ9Txg9cR9SAT8b12Pry2iBk+nZWD9VtHK3kOnEYkvp5WTCTsrSi6Re4_0_OEM:NONSLP_Enterprise
|
8b351c9c-f398-4515-9900-09df49427262_XGVPP-NMH47-7TTHJ-W3FW7-8H%f%V2C___4_X19-99683_0_OEM:NONSLP_Enterprise
|
||||||
c83cef07-6b72-4bbc-a28f-a00386872839_3V6Q6-NQXCX-V8YXR-9QCYV-QP%f%FCT__27_X19-98746_NHn2n0N1UfVf00CfaI5LCDMDsKdVAWpD/HAfUrcTAKsw9d2Sks4h5MhyH/WUx+B6dFi8ol7D3AHorR8y9dqVS1Bd2FdZNJl/tTR1PGwYn6KL88NS19aHmFNdX8s4438vaa+Ty8Qk8EDcwm/wscC8lQmi3/RgUKYdyGFvpbGSVlk_0_Volume:MAK_EnterpriseN
|
c83cef07-6b72-4bbc-a28f-a00386872839_3V6Q6-NQXCX-V8YXR-9QCYV-QP%f%FCT__27_X19-98746_0_Volume:MAK_EnterpriseN
|
||||||
4de7cb65-cdf1-4de9-8ae8-e3cce27b9f2c_VK7JG-NPHTM-C97JM-9MPGT-3V%f%66T__48_X19-98841_Yl/jNfxJ1SnaIZCIZ4m6Pf3ySNoQXifNeqfltNaNctx+onwiivOx7qcSn8dFtURzgMzSOFnsRQzb5IrvuqHoxWWl1S3JIQn56FvKsvSx7aFXIX3+2Q98G1amPV/WEQ0uHA5d7Ya6An+g0Z0zRP7evGoomTs4YuweaWiZQjQzSpA_0_____Retail_Professional
|
4de7cb65-cdf1-4de9-8ae8-e3cce27b9f2c_VK7JG-NPHTM-C97JM-9MPGT-3V%f%66T__48_X19-98841_0_____Retail_Professional
|
||||||
9fbaf5d6-4d83-4422-870d-fdda6e5858aa_2B87N-8KFHP-DKV6R-Y2C8J-PK%f%CKT__49_X19-98859_Ge0mRQbW8ALk7T09V+1k1yg66qoS0lhkgPIROOIOgxKmWPAvsiLAYPKDqM4+neFCA/qf1dHFmdh0VUrwFBPYsK251UeWuElj4bZFVISL6gUt1eZwbGfv5eurQ0i+qZiFv+CcQOEFsd5DD4Up6xPLLQS3nAXODL5rSrn2sHRoCVY_0_____Retail_ProfessionalN
|
9fbaf5d6-4d83-4422-870d-fdda6e5858aa_2B87N-8KFHP-DKV6R-Y2C8J-PK%f%CKT__49_X19-98859_0_____Retail_ProfessionalN
|
||||||
f742e4ff-909d-4fe9-aacb-3231d24a0c58_4CPRK-NM3K3-X6XXQ-RXX86-WX%f%CHW__98_X19-98877_vel4ytVtnE8FhvN87Cflz9sbh5QwHD1YGOeej9QP7hF3vlBR4EX2/S/09gRneeXVbQnjDOCd2KFMKRUWHLM7ZhFBk8AtlG+kvUawPZ+CIrwrD3mhi7NMv8UX/xkLK3HnBupMEuEwsMJgCUD8Pn6om1mEiQebHBAqu4cT7GN9Y0g_0_____Retail_CoreN
|
f742e4ff-909d-4fe9-aacb-3231d24a0c58_4CPRK-NM3K3-X6XXQ-RXX86-WX%f%CHW__98_X19-98877_0_____Retail_CoreN
|
||||||
1d1bac85-7365-4fea-949a-96978ec91ae0_N2434-X9D7W-8PF6X-8DV9T-8T%f%YMD__99_X19-99652_Nv17eUTrr1TmUX6frlI7V69VR6yWb7alppCFJPcdjfI+xX4/Cf2np3zm7jmC+zxFb9nELUs477/ydw2KCCXFfM53bKpBQZKHE5+MdGJGxebOCcOtJ3hrkDJtwlVxTQmUgk5xnlmpk8PHg82M2uM5B7UsGLxGKK4d3hi0voSyKeI_0_____Retail_CoreCountrySpecific
|
1d1bac85-7365-4fea-949a-96978ec91ae0_N2434-X9D7W-8PF6X-8DV9T-8T%f%YMD__99_X19-99652_0_____Retail_CoreCountrySpecific
|
||||||
3ae2cc14-ab2d-41f4-972f-5e20142771dc_BT79Q-G7N6G-PGBYW-4YWX6-6F%f%4BT_100_X19-99661_FV2Eao/R5v8sGrfQeOjQ4daokVlNOlqRCDZXuaC45bQd5PsNU3t1b4AwWeYM8TAwbHauzr4tPG0UlsUqUikCZHy0poROx35bBBMBym6Zbm9wDBVyi7nCzBtwS86eOonQ3cU6WfZxhZRze0POdR33G3QTNPrnVIM2gf6nZJYqDOA_0_____Retail_CoreSingleLanguage
|
3ae2cc14-ab2d-41f4-972f-5e20142771dc_BT79Q-G7N6G-PGBYW-4YWX6-6F%f%4BT_100_X19-99661_0_____Retail_CoreSingleLanguage
|
||||||
2b1f36bb-c1cd-4306-bf5c-a0367c2d97d8_YTMG3-N6DKC-DKB77-7M9GH-8H%f%VX7_101_X19-98868_GH/jwFxIcdQhNxJIlFka8c1H48PF0y7TgJwaryAUzqSKXynONLw7MVciDJFVXTkCjbXSdxLSWpPIC50/xyy1rAf8aC7WuN/9cRNAvtFPC1IVAJaMeq1vf4mCqRrrxJQP6ZEcuAeHFzLe/LLovGWCd8rrs6BbBwJXCvAqXImvycQ_0_____Retail_Core
|
2b1f36bb-c1cd-4306-bf5c-a0367c2d97d8_YTMG3-N6DKC-DKB77-7M9GH-8H%f%VX7_101_X19-98868_0_____Retail_Core
|
||||||
2a6137f3-75c0-4f26-8e3e-d83d802865a4_XKCNC-J26Q9-KFHD2-FKTHY-KD%f%72Y_119_X19-99606_hci78IRWDLBtdbnAIKLDgV9whYgtHc1uYyp9y6FszE9wZBD5Nc8CUD2pI2s2RRd3M04C4O7M3tisB3Ov/XVjpAbxlX3MWfUR5w4MH0AphbuQX0p5MuHEDYyfqlRgBBRzOKePF06qfYvPQMuEfDpKCKFwNojQxBV8O0Arf5zmrIw_0_OEM:NONSLP_PPIPro
|
2a6137f3-75c0-4f26-8e3e-d83d802865a4_XKCNC-J26Q9-KFHD2-FKTHY-KD%f%72Y_119_X19-99606_0_OEM:NONSLP_PPIPro
|
||||||
e558417a-5123-4f6f-91e7-385c1c7ca9d4_YNMGQ-8RYV3-4PGQ3-C8XTP-7C%f%FBY_121_X19-98886_x9tPFDZmjZMf29zFeHV5SHbXj8Wd8YAcCn/0hbpLcId4D7OWqkQKXxXHIegRlwcWjtII0sZ6WYB0HQV2KH3LvYRnWKpJ5SxeOgdzBIJ6fhegYGGyiXsBv9sEb3/zidPU6ZK9LugVGAcRZ6HQOiXyOw+Yf5H35iM+2oDZXSpjvJw_0_____Retail_Education
|
e558417a-5123-4f6f-91e7-385c1c7ca9d4_YNMGQ-8RYV3-4PGQ3-C8XTP-7C%f%FBY_121_X19-98886_0_____Retail_Education
|
||||||
c5198a66-e435-4432-89cf-ec777c9d0352_84NGF-MHBT6-FXBX8-QWJK7-DR%f%R8H_122_X19-98892_jkL4YZkmBCJtvL1fT30ZPBcjmzshBSxjwrE0Q00AZ1hYnhrH+npzo1MPCT6ZRHw19ZLTz7wzyBb0qqcBVbtEjZW0Xs2MYLxgriyoONkhnPE6KSUJBw7C0enFVLHEqnVu/nkaOFfockN3bc+Eouw6W2lmHjklPHc9c6Clo04jul0_0_____Retail_EducationN
|
c5198a66-e435-4432-89cf-ec777c9d0352_84NGF-MHBT6-FXBX8-QWJK7-DR%f%R8H_122_X19-98892_0_____Retail_EducationN
|
||||||
f6e29426-a256-4316-88bf-cc5b0f95ec0c_PJB47-8PN2T-MCGDY-JTY3D-CB%f%CPV_125_X23-50331_OPGhsyx+Ctw7w/KLMRNrY+fNBmKPjUG0R9RqkWk4e8ez+ExSJxSLLex5WhO5QSNgXLmEra+cCsN6C638aLjIdH2/L7D+8z/C6EDgRvbHMmidHg1lX3/O8lv0JudHkGtHJYewjorn/xXGY++vOCTQdZNk6qzEgmYSvPehKfdg8js_1_Volume:MAK_EnterpriseS_Ge
|
f6e29426-a256-4316-88bf-cc5b0f95ec0c_PJB47-8PN2T-MCGDY-JTY3D-CB%f%CPV_125_X23-50331_1_Volume:MAK_EnterpriseS_Ge
|
||||||
cce9d2de-98ee-4ce2-8113-222620c64a27_KCNVH-YKWX8-GJJB9-H9FDT-6F%f%7W2_125_X22-66075_GCqWmJOsTVun9z4QkE9n2XqBvt3ZWSPl9QmIh9Q2mXMG/QVt2IE7S+ES/NWlyTSNjLVySr1D2sGjxgEzy9kLwn7VENQVJ736h1iOdMj/3rdqLMSpTa813+nPSQgKpqJ3uMuvIvRP0FdB7Y4qt8qf9kNKK25A1QknioD/6YubL/4_1_Volume:MAK_EnterpriseS_VB
|
cce9d2de-98ee-4ce2-8113-222620c64a27_KCNVH-YKWX8-GJJB9-H9FDT-6F%f%7W2_125_X22-66075_1_Volume:MAK_EnterpriseS_VB
|
||||||
d06934ee-5448-4fd1-964a-cd077618aa06_43TBQ-NH92J-XKTM7-KT3KK-P3%f%9PB_125_X21-83233_EpB6qOCo8pRgO5kL4vxEHck2J1vxyd9OqvxUenDnYO9AkcGWat/D74ZcFg5SFlIya1U8l5zv+tsvZ4wAvQ1IaFW1PwOKJLOaGgejqZ41TIMdFGGw+G+s1RHsEnrWr3UOakTodby1aIMUMoqf3NdaM5aWFo8fOmqWC5/LnCoighs_0_OEM:NONSLP_EnterpriseS_RS5
|
d06934ee-5448-4fd1-964a-cd077618aa06_43TBQ-NH92J-XKTM7-KT3KK-P3%f%9PB_125_X21-83233_0_OEM:NONSLP_EnterpriseS_RS5
|
||||||
706e0cfd-23f4-43bb-a9af-1a492b9f1302_NK96Y-D9CD8-W44CQ-R8YTK-DY%f%JWX_125_X21-05035_ntcKmazIvLpZOryft28gWBHu1nHSbR+Gp143f/BiVe+BD2UjHBZfSR1q405xmQZsygz6VRK6+zm8FPR++71pkmArgCLhodCQJ5I4m7rAJNw/YX99pILphi1yCRcvHsOTGa825GUVXgf530tHT6hr0HQ1lGeGgG1hPekpqqBbTlg_0_OEM:NONSLP_EnterpriseS_RS1
|
706e0cfd-23f4-43bb-a9af-1a492b9f1302_NK96Y-D9CD8-W44CQ-R8YTK-DY%f%JWX_125_X21-05035_0_OEM:NONSLP_EnterpriseS_RS1
|
||||||
faa57748-75c8-40a2-b851-71ce92aa8b45_FWN7H-PF93Q-4GGP8-M8RF3-MD%f%WWW_125_X19-99617_Fe9CDClilrAmwwT7Yhfx67GafWRQEpwyj8R+a4eaTqbpPcAt7d1hv1rx8Sa9AzopEGxIrb7IhiPoDZs0XaT1HN0/olJJ/MnD73CfBP4sdQdLTsSJE3dKMWYTQHpnjqRaS/pNBYRr8l9Mv8yfcP8uS2MjIQ1cRTqRmC7WMpShyCg_0_OEM:NONSLP_EnterpriseS_TH
|
faa57748-75c8-40a2-b851-71ce92aa8b45_FWN7H-PF93Q-4GGP8-M8RF3-MD%f%WWW_125_X19-99617_0_OEM:NONSLP_EnterpriseS_TH
|
||||||
3d1022d8-969f-4222-b54b-327f5a5af4c9_2DBW3-N2PJG-MVHW3-G7TDK-9H%f%KR4_126_X21-04921_zLPNvcl1iqOefy0VLg+WZgNtRNhuGpn8+BFKjMqjaNOSKiuDcR6GNDS5FF1Aqk6/e6shJ+ohKzuwrnmYq3iNQ3I2MBlYjM5kuNfKs8Vl9dCjSpQr//GBGps6HtF2xrG/2g/yhtYC7FbtGDIE16uOeNKFcVg+XMb0qHE/5Etyfd8_0_Volume:MAK_EnterpriseSN_RS1
|
3d1022d8-969f-4222-b54b-327f5a5af4c9_2DBW3-N2PJG-MVHW3-G7TDK-9H%f%KR4_126_X21-04921_0_Volume:MAK_EnterpriseSN_RS1
|
||||||
60c243e1-f90b-4a1b-ba89-387294948fb6_NTX6B-BRYC2-K6786-F6MVQ-M7%f%V2X_126_X19-98770_kbXfe0z9Vi1S0yfxMWzI5+UtWsJKzxs7wLGUDLjrckFDn1bDQb4MvvuCK1w+Qrq33lemiGpNDspa+ehXiYEeSPFcCvUBpoMlGBFfzurNCHWiv3o1k3jBoawJr/VoDoVZfxhkps0fVoubf9oy6C6AgrkZ7PjCaS58edMcaUWvYYg_0_Volume:MAK_EnterpriseSN_TH
|
60c243e1-f90b-4a1b-ba89-387294948fb6_NTX6B-BRYC2-K6786-F6MVQ-M7%f%V2X_126_X19-98770_0_Volume:MAK_EnterpriseSN_TH
|
||||||
01eb852c-424d-4060-94b8-c10d799d7364_3XP6D-CRND4-DRYM2-GM84D-4G%f%G8Y_139_X23-37869_PVW0XnRJnsWYjTqxb6StCi2tge/uUwegjdiFaFUiZpwdJ620RK+MIAsSq5S+egXXzIWNntoy2fB6BO8F1wBFmxP/mm/3rn5C33jtF5QrbNqY7X9HMbqSiC7zhs4v4u2Xa4oZQx8JQkwr8Q2c/NgHrOJKKRASsSckhunxZ+WVEuM_1_____Retail_ProfessionalCountrySpecific_Zn
|
01eb852c-424d-4060-94b8-c10d799d7364_3XP6D-CRND4-DRYM2-GM84D-4G%f%G8Y_139_X23-37869_1_____Retail_ProfessionalCountrySpecific_Zn
|
||||||
eb6d346f-1c60-4643-b960-40ec31596c45_DXG7C-N36C4-C4HTG-X4T3X-2Y%f%V77_161_X21-43626_MaVqTkRrGnOqYizl15whCOKWzx01+BZTVAalvEuHXM+WV55jnIfhWmd/u1GqCd5OplqXdU959zmipK2Iwgu2nw/g91nW//sQiN/cUcvg1Lxo6pC3gAo1AjTpHmGIIf9XlZMYlD+Vl6gXsi/Auwh3yrSSFh5s7gOczZoDTqQwHXA_0_____Retail_ProfessionalWorkstation
|
eb6d346f-1c60-4643-b960-40ec31596c45_DXG7C-N36C4-C4HTG-X4T3X-2Y%f%V77_161_X21-43626_0_____Retail_ProfessionalWorkstation
|
||||||
89e87510-ba92-45f6-8329-3afa905e3e83_WYPNQ-8C467-V2W6J-TX4WX-WT%f%2RQ_162_X21-43644_JVGQowLiCcPtGY9ndbBDV+rTu/q5ljmQTwQWZgBIQsrAeQjLD8jLEk/qse7riZ7tMT6PKFVNXeWqF7PhLAmACbE8O3Lvp65XMd/Oml9Daynj5/4n7unsffFHIHH8TGyO5j7xb4dkFNqC5TX3P8/1gQEkTIdZEOTQQXFu0L2SP5c_0_____Retail_ProfessionalWorkstationN
|
89e87510-ba92-45f6-8329-3afa905e3e83_WYPNQ-8C467-V2W6J-TX4WX-WT%f%2RQ_162_X21-43644_0_____Retail_ProfessionalWorkstationN
|
||||||
62f0c100-9c53-4e02-b886-a3528ddfe7f6_8PTT6-RNW4C-6V7J2-C2D3X-MH%f%BPB_164_X21-04955_CEDgxI8f/fxMBiwmeXw5Of55DG32sbGALzHihXkdbYTDaE3pY37oAA4zwGHALzAFN/t254QImGPYR6hATgl+Cp804f7serJqiLeXY965Zy67I4CKIMBm49lzHLFJeDnVTjDB0wVyN29pvgO3+HLhZ22KYCpkRHFFMy2OKxS68Yc_0_____Retail_ProfessionalEducation
|
62f0c100-9c53-4e02-b886-a3528ddfe7f6_8PTT6-RNW4C-6V7J2-C2D3X-MH%f%BPB_164_X21-04955_0_____Retail_ProfessionalEducation
|
||||||
13a38698-4a49-4b9e-8e83-98fe51110953_GJTYN-HDMQY-FRR76-HVGC7-QP%f%F8P_165_X21-04956_r35zp9OfxKSBcTxKWon3zFtbOiCufAPo6xRGY5DJqCRFKdB0jgZalNQitvjmaZ/Rlez2vjRJnEart4LrvyW4d9rrukAjR3+c3UkeTKwoD3qBl9AdRJbXCa2BdsoXJs1WVS4w4LuVzpB/SZDuggZt0F2DlMB427F5aflook/n1pY_0_____Retail_ProfessionalEducationN
|
13a38698-4a49-4b9e-8e83-98fe51110953_GJTYN-HDMQY-FRR76-HVGC7-QP%f%F8P_165_X21-04956_0_____Retail_ProfessionalEducationN
|
||||||
df96023b-dcd9-4be2-afa0-c6c871159ebe_NJCF7-PW8QT-3324D-688JX-2Y%f%V66_175_X21-41295_rVpetYUmiRB48YJfCvJHiaZapJ0bO8gQDRoql+rq5IobiSRu//efV1VXqVpBkwILQRKgKIVONSTUF5y2TSxlDLbDSPKp7UHfbz17g6vRKLwOameYEz0ZcK3NTbApN/cMljHvvF/mBag1+sHjWu+eoFzk8H89k9nw8LMeVOPJRDc_0_____Retail_ServerRdsh
|
df96023b-dcd9-4be2-afa0-c6c871159ebe_NJCF7-PW8QT-3324D-688JX-2Y%f%V66_175_X21-41295_0_____Retail_ServerRdsh
|
||||||
d4ef7282-3d2c-4cf0-9976-8854e64a8d1e_V3WVW-N2PV2-CGWC3-34QGF-VM%f%J2C_178_X21-32983_Xzme9hDZR6H0Yx0deURVdE6LiTOkVqWng5W/OTbkxRc0rq+mSYpo/f/yqhtwYlrkBPWx16Yok5Bvcb34vbKHvEAtxfYp4te20uexLzVOtBcoeEozARv4W/6MhYfl+llZtR5efsktj4N4/G4sVbuGvZ9nzNfQO9TwV6NGgGEj2Ec_0_____Retail_Cloud
|
d4ef7282-3d2c-4cf0-9976-8854e64a8d1e_V3WVW-N2PV2-CGWC3-34QGF-VM%f%J2C_178_X21-32983_0_____Retail_Cloud
|
||||||
af5c9381-9240-417d-8d35-eb40cd03e484_NH9J3-68WK7-6FB93-4K3DF-DJ%f%4F6_179_X21-32987_QGRDZOU/VZhYLOSdp2xDnFs8HInNZctcQlWCIrORVnxTQr55IJwN4vK3PJHjkfRLQ/bgUrcEIhyFbANqZFUq8yD1YNubb2bjNORgI/m8u85O9V7nDGtxzO/viEBSWyEHnrzLKKWYqkRQKbbSW3ungaZR0Ti5O2mAUI4HzAFej50_0_____Retail_CloudN
|
af5c9381-9240-417d-8d35-eb40cd03e484_NH9J3-68WK7-6FB93-4K3DF-DJ%f%4F6_179_X21-32987_0_____Retail_CloudN
|
||||||
8ab9bdd1-1f67-4997-82d9-8878520837d9_XQQYW-NFFMW-XJPBH-K8732-CK%f%FFD_188_X21-99378_djy0od0uuKd2rrIl+V1/2+MeRltNgW7FEeTNQsPMkVSL75NBphgoso4uS0JPv2D7Y1iEEvmVq6G842Kyt52QOwXgFWmP/IQ6Sq1dr+fHK/4Et7bEPrrGBEZoCfWqk0kdcZRPBij2KN6qCRWhrk1hX2g+U40smx/EYCLGh9HCi24_0_____OEM:DM_IoTEnterprise
|
8ab9bdd1-1f67-4997-82d9-8878520837d9_XQQYW-NFFMW-XJPBH-K8732-CK%f%FFD_188_X21-99378_0_____OEM:DM_IoTEnterprise
|
||||||
ed655016-a9e8-4434-95d9-4345352c2552_QPM6N-7J2WJ-P88HH-P3YRH-YY%f%74H_191_X21-99682_qHs/PzfhYWdtSys2edzcz4h+Qs8aDqb8BIiQ/mJ/+0uyoJh1fitbRCIgiFh2WAGZXjdgB8hZeheNwHibd8ChXaXg4u+0XlOdFlaDTgTXblji8fjETzDBk9aGkeMCvyVXRuUYhTSdp83IqGHz7XuLwN2p/6AUArx9JZCoLGV8j3w_0_OEM:NONSLP_IoTEnterpriseS_VB
|
ed655016-a9e8-4434-95d9-4345352c2552_QPM6N-7J2WJ-P88HH-P3YRH-YY%f%74H_191_X21-99682_0_OEM:NONSLP_IoTEnterpriseS_VB
|
||||||
6c4de1b8-24bb-4c17-9a77-7b939414c298_CGK42-GYN6Y-VD22B-BX98W-J8%f%JXD_191_X23-12617_J/fpIRynsVQXbp4qZNKp6RvOgZ/P2klILUKQguMlcwrBZybwNkHg/kM5LNOF/aDzEktbPnLnX40GEvKkYT6/qP4cMhn/SOY0/hYOkIdR34ilzNlVNq5xP7CMjCjaUYJe+6ydHPK6FpOuEoWOYYP5BZENKNGyBy4w4shkMAw19mA_0_OEM:NONSLP_IoTEnterpriseS_Ge
|
6c4de1b8-24bb-4c17-9a77-7b939414c298_CGK42-GYN6Y-VD22B-BX98W-J8%f%JXD_191_X23-12617_0_OEM:NONSLP_IoTEnterpriseS_Ge
|
||||||
d4bdc678-0a4b-4a32-a5b3-aaa24c3b0f24_K9VKN-3BGWV-Y624W-MCRMQ-BH%f%DCD_202_X22-53884_kyoNx2s93U6OUSklB1xn+GXcwCJO1QTEtACYnChi8aXSoxGQ6H2xHfUdHVCwUA1OR0UeNcRrMmOzZBOEUBtdoGWSYPg9AMjvxlxq9JOzYAH+G6lT0UbCWgMSGGrqdcIfmshyEak3aUmsZK6l+uIAFCCZZ/HbbCRkkHC5rWKstMI_0_____Retail_CloudEditionN
|
d4bdc678-0a4b-4a32-a5b3-aaa24c3b0f24_K9VKN-3BGWV-Y624W-MCRMQ-BH%f%DCD_202_X22-53884_0_____Retail_CloudEditionN
|
||||||
92fb8726-92a8-4ffc-94ce-f82e07444653_KY7PN-VR6RX-83W6Y-6DDYQ-T6%f%R4W_203_X22-53847_gD6HnT4jP4rcNu9u83gvDiQq1xs7QSujcDbo60Di5iSVa9/ihZ7nlhnA0eDEZfnoDXriRiPPqc09T6AhSnFxLYitAkOuPJqL5UMobIrab9dwTKlowqFolxoHhLOO4V92Hsvn/9JLy7rEzoiAWHhX/0cpMr3FCzVYPeUW1OyLT1A_0_____Retail_CloudEdition
|
92fb8726-92a8-4ffc-94ce-f82e07444653_KY7PN-VR6RX-83W6Y-6DDYQ-T6%f%R4W_203_X22-53847_0_____Retail_CloudEdition
|
||||||
5a85300a-bfce-474f-ac07-a30983e3fb90_N979K-XWD77-YW3GB-HBGH6-D3%f%2MH_205_X23-15042_blZopkUuayCTgZKH4bOFiisH9GTAHG5/js6UX/qcMWWc3sWNxKSX1OLp1k3h8Xx1cFuvfG/fNAw/I83ssEtPY+A0Gx1JF4QpRqsGOqJ5ruQ2tGW56CJcCVHkB+i46nJAD759gYmy3pEYMQbmpWbhLx3MJ6kvwxKfU+0VCio8k50_0_____OEM:DM_IoTEnterpriseSK
|
5a85300a-bfce-474f-ac07-a30983e3fb90_N979K-XWD77-YW3GB-HBGH6-D3%f%2MH_205_X23-15042_0_____OEM:DM_IoTEnterpriseSK
|
||||||
80083eae-7031-4394-9e88-4901973d56fe_P8Q7T-WNK7X-PMFXY-VXHBG-RR%f%K69_206_X23-62084_habUJ0hhAG0P8iIKaRQ74/wZQHyAdFlwHmrejNjOSRG08JeqilJlTM6V8G9UERLJ92/uMDVHIVOPXfN8Zdh8JuYO8oflPnqymIRmff/pU+Gpb871jV2JDA4Cft5gmn+ictKoN4VoSfEZRR+R5hzF2FsoCExDNNw6gLdjtiX94uA_0_____OEM:DM_IoTEnterpriseK
|
80083eae-7031-4394-9e88-4901973d56fe_P8Q7T-WNK7X-PMFXY-VXHBG-RR%f%K69_206_X23-62084_0_____OEM:DM_IoTEnterpriseK
|
||||||
) do (
|
) do (
|
||||||
for /f "tokens=1-9 delims=_" %%A in ("%%#") do (
|
for /f "tokens=1-9 delims=_" %%A in ("%%#") do (
|
||||||
|
|
||||||
@@ -2344,7 +2355,7 @@ REM Detect key
|
|||||||
|
|
||||||
if %1==key if %osSKU%==%%C if not defined key (
|
if %1==key if %osSKU%==%%C if not defined key (
|
||||||
echo "!allapps! !altapplist!" | find /i "%%A" %nul1% && (
|
echo "!allapps! !altapplist!" | find /i "%%A" %nul1% && (
|
||||||
if %%F==1 set notworking=1
|
if %%E==1 set notworking=1
|
||||||
set key=%%B
|
set key=%%B
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@@ -2352,11 +2363,8 @@ set key=%%B
|
|||||||
REM Generate ticket
|
REM Generate ticket
|
||||||
|
|
||||||
if %1==ticket if "%key%"=="%%B" (
|
if %1==ticket if "%key%"=="%%B" (
|
||||||
set "string=OSMajorVersion=5;OSMinorVersion=1;OSPlatformId=2;PP=0;Pfn=Microsoft.Windows.%%C.%%D_8wekyb3d8bbwe;PKeyIID=465145217131314304264339481117862266242033457260311819664735280;$([char]0)"
|
set "SessionIdStr=OSMajorVersion=5;OSMinorVersion=1;OSPlatformId=2;PP=0;Pfn=Microsoft.Windows.%%C.%%D_8wekyb3d8bbwe;PKeyIID=465145217131314304264339481117862266242033457260311819664735280;"
|
||||||
for /f "tokens=* delims=" %%i in ('%psc% [conv%f%ert]::ToBas%f%e64String([Text.En%f%coding]::Uni%f%code.GetBytes("""!string!"""^)^)') do set "encoded=%%i"
|
%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':sign\:.*';. ([scriptblock]::Create($f[1]))"
|
||||||
echo "!encoded!" | find "AAAA" %nul1% || exit /b
|
|
||||||
|
|
||||||
<nul set /p "=<?xml version="1.0" encoding="utf-8"?><genuineAuthorization xmlns="http://www.microsoft.com/DRM/SL/GenuineAuthorization/1.0"><version>1.0</version><genuineProperties origin="sppclient"><properties>OA3xOriginalProductId=;OA3xOriginalProductKey=;SessionId=!encoded!;TimeStampClient=2022-10-11T12:00:00Z</properties><signatures><signature name="clientLockboxKey" method="rsa-sha256">%%E=</signature></signatures></genuineProperties></genuineAuthorization>" >"%tdir%\GenuineTicket"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
)
|
)
|
||||||
@@ -2365,6 +2373,77 @@ exit /b
|
|||||||
|
|
||||||
::========================================================================================================================================
|
::========================================================================================================================================
|
||||||
|
|
||||||
|
:sign:
|
||||||
|
$ErrorActionPreference = "Stop"
|
||||||
|
|
||||||
|
function SignProperties {
|
||||||
|
param (
|
||||||
|
$Properties,
|
||||||
|
$rsa
|
||||||
|
)
|
||||||
|
|
||||||
|
$sha256 = [Security.Cryptography.SHA256]::Create()
|
||||||
|
$bytes = [Text.Encoding]::UTF8.GetBytes($Properties)
|
||||||
|
$hash = $sha256.ComputeHash($bytes)
|
||||||
|
|
||||||
|
$signature = $rsa.SignHash($hash, [Security.Cryptography.HashAlgorithmName]::SHA256, [Security.Cryptography.RSASignaturePadding]::Pkcs1)
|
||||||
|
return [Convert]::ToBase64String($signature)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
[byte[]] $key = 0x07,0x02,0x00,0x00,0x00,0xA4,0x00,0x00,0x52,0x53,0x41,0x32,0x00,0x04,0x00,0x00,
|
||||||
|
0x01,0x00,0x01,0x00,0x29,0x87,0xBA,0x3F,0x52,0x90,0x57,0xD8,0x12,0x26,0x6B,0x38,
|
||||||
|
0xB2,0x3B,0xF9,0x67,0x08,0x4F,0xDD,0x8B,0xF5,0xE3,0x11,0xB8,0x61,0x3A,0x33,0x42,
|
||||||
|
0x51,0x65,0x05,0x86,0x1E,0x00,0x41,0xDE,0xC5,0xDD,0x44,0x60,0x56,0x3D,0x14,0x39,
|
||||||
|
0xB7,0x43,0x65,0xE9,0xF7,0x2B,0xA5,0xF0,0xA3,0x65,0x68,0xE9,0xE4,0x8B,0x5C,0x03,
|
||||||
|
0x2D,0x36,0xFE,0x28,0x4C,0xD1,0x3C,0x3D,0xC1,0x90,0x75,0xF9,0x6E,0x02,0xE0,0x58,
|
||||||
|
0x97,0x6A,0xCA,0x80,0x02,0x42,0x3F,0x6C,0x15,0x85,0x4D,0x83,0x23,0x6A,0x95,0x9E,
|
||||||
|
0x38,0x52,0x59,0x38,0x6A,0x99,0xF0,0xB5,0xCD,0x53,0x7E,0x08,0x7C,0xB5,0x51,0xD3,
|
||||||
|
0x8F,0xA3,0x0D,0xA0,0xFA,0x8D,0x87,0x3C,0xFC,0x59,0x21,0xD8,0x2E,0xD9,0x97,0x8B,
|
||||||
|
0x40,0x60,0xB1,0xD7,0x2B,0x0A,0x6E,0x60,0xB5,0x50,0xCC,0x3C,0xB1,0x57,0xE4,0xB7,
|
||||||
|
0xDC,0x5A,0x4D,0xE1,0x5C,0xE0,0x94,0x4C,0x5E,0x28,0xFF,0xFA,0x80,0x6A,0x13,0x53,
|
||||||
|
0x52,0xDB,0xF3,0x04,0x92,0x43,0x38,0xB9,0x1B,0xD9,0x85,0x54,0x7B,0x14,0xC7,0x89,
|
||||||
|
0x16,0x8A,0x4B,0x82,0xA1,0x08,0x02,0x99,0x23,0x48,0xDD,0x75,0x9C,0xC8,0xC1,0xCE,
|
||||||
|
0xB0,0xD7,0x1B,0xD8,0xFB,0x2D,0xA7,0x2E,0x47,0xA7,0x18,0x4B,0xF6,0x29,0x69,0x44,
|
||||||
|
0x30,0x33,0xBA,0xA7,0x1F,0xCE,0x96,0x9E,0x40,0xE1,0x43,0xF0,0xE0,0x0D,0x0A,0x32,
|
||||||
|
0xB4,0xEE,0xA1,0xC3,0x5E,0x9B,0xC7,0x7F,0xF5,0x9D,0xD8,0xF2,0x0F,0xD9,0x8F,0xAD,
|
||||||
|
0x75,0x0A,0x00,0xD5,0x25,0x43,0xF7,0xAE,0x51,0x7F,0xB7,0xDE,0xB7,0xAD,0xFB,0xCE,
|
||||||
|
0x83,0xE1,0x81,0xFF,0xDD,0xA2,0x77,0xFE,0xEB,0x27,0x1F,0x10,0xFA,0x82,0x37,0xF4,
|
||||||
|
0x7E,0xCC,0xE2,0xA1,0x58,0xC8,0xAF,0x1D,0x1A,0x81,0x31,0x6E,0xF4,0x8B,0x63,0x34,
|
||||||
|
0xF3,0x05,0x0F,0xE1,0xCC,0x15,0xDC,0xA4,0x28,0x7A,0x9E,0xEB,0x62,0xD8,0xD8,0x8C,
|
||||||
|
0x85,0xD7,0x07,0x87,0x90,0x2F,0xF7,0x1C,0x56,0x85,0x2F,0xEF,0x32,0x37,0x07,0xAB,
|
||||||
|
0xB0,0xE6,0xB5,0x02,0x19,0x35,0xAF,0xDB,0xD4,0xA2,0x9C,0x36,0x80,0xC6,0xDC,0x82,
|
||||||
|
0x08,0xE0,0xC0,0x5F,0x3C,0x59,0xAA,0x4E,0x26,0x03,0x29,0xB3,0x62,0x58,0x41,0x59,
|
||||||
|
0x3A,0x37,0x43,0x35,0xE3,0x9F,0x34,0xE2,0xA1,0x04,0x97,0x12,0x9D,0x8C,0xAD,0xF7,
|
||||||
|
0xFB,0x8C,0xA1,0xA2,0xE9,0xE4,0xEF,0xD9,0xC5,0xE5,0xDF,0x0E,0xBF,0x4A,0xE0,0x7A,
|
||||||
|
0x1E,0x10,0x50,0x58,0x63,0x51,0xE1,0xD4,0xFE,0x57,0xB0,0x9E,0xD7,0xDA,0x8C,0xED,
|
||||||
|
0x7D,0x82,0xAC,0x2F,0x25,0x58,0x0A,0x58,0xE6,0xA4,0xF4,0x57,0x4B,0xA4,0x1B,0x65,
|
||||||
|
0xB9,0x4A,0x87,0x46,0xEB,0x8C,0x0F,0x9A,0x48,0x90,0xF9,0x9F,0x76,0x69,0x03,0x72,
|
||||||
|
0x77,0xEC,0xC1,0x42,0x4C,0x87,0xDB,0x0B,0x3C,0xD4,0x74,0xEF,0xE5,0x34,0xE0,0x32,
|
||||||
|
0x45,0xB0,0xF8,0xAB,0xD5,0x26,0x21,0xD7,0xD2,0x98,0x54,0x8F,0x64,0x88,0x20,0x2B,
|
||||||
|
0x14,0xE3,0x82,0xD5,0x2A,0x4B,0x8F,0x4E,0x35,0x20,0x82,0x7E,0x1B,0xFE,0xFA,0x2C,
|
||||||
|
0x79,0x6C,0x6E,0x66,0x94,0xBB,0x0A,0xEB,0xBA,0xD9,0x70,0x61,0xE9,0x47,0xB5,0x82,
|
||||||
|
0xFC,0x18,0x3C,0x66,0x3A,0x09,0x2E,0x1F,0x61,0x74,0xCA,0xCB,0xF6,0x7A,0x52,0x37,
|
||||||
|
0x1D,0xAC,0x8D,0x63,0x69,0x84,0x8E,0xC7,0x70,0x59,0xDD,0x2D,0x91,0x1E,0xF7,0xB1,
|
||||||
|
0x56,0xED,0x7A,0x06,0x9D,0x5B,0x33,0x15,0xDD,0x31,0xD0,0xE6,0x16,0x07,0x9B,0xA5,
|
||||||
|
0x94,0x06,0x7D,0xC1,0xE9,0xD6,0xC8,0xAF,0xB4,0x1E,0x2D,0x88,0x06,0xA7,0x63,0xB8,
|
||||||
|
0xCF,0xC8,0xA2,0x6E,0x84,0xB3,0x8D,0xE5,0x47,0xE6,0x13,0x63,0x8E,0xD1,0x7F,0xD4,
|
||||||
|
0x81,0x44,0x38,0xBF
|
||||||
|
|
||||||
|
$rsa = New-Object Security.Cryptography.RSACryptoServiceProvider
|
||||||
|
$rsa.ImportCspBlob($key)
|
||||||
|
$SessionId = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($env:SessionIdStr + [char]0))
|
||||||
|
$PropertiesStr = "OA3xOriginalProductId=;OA3xOriginalProductKey=;SessionId=$SessionId;TimeStampClient=2022-10-11T12:00:00Z"
|
||||||
|
$SignatureStr = SignProperties $PropertiesStr $rsa
|
||||||
|
|
||||||
|
$xml = @"
|
||||||
|
<?xml version="1.0" encoding="utf-8"?><genuineAuthorization xmlns="http://www.microsoft.com/DRM/SL/GenuineAuthorization/1.0"><version>1.0</version><genuineProperties origin="sppclient"><properties>$PropertiesStr</properties><signatures><signature name="clientLockboxKey" method="rsa-sha256">$SignatureStr</signature></signatures></genuineProperties></genuineAuthorization>
|
||||||
|
"@
|
||||||
|
[System.IO.File]::WriteAllText("$env:ProgramData\Microsoft\Windows\ClipSVC\GenuineTicket\GenuineTicket", ($xml -join ""), [System.Text.Encoding]::ASCII)
|
||||||
|
:sign:
|
||||||
|
|
||||||
|
::========================================================================================================================================
|
||||||
|
|
||||||
:: Below code is used to get alternate edition name and key if current edition doesn't support HWID activation
|
:: Below code is used to get alternate edition name and key if current edition doesn't support HWID activation
|
||||||
|
|
||||||
:: 1st column = Current SKU ID
|
:: 1st column = Current SKU ID
|
||||||
@@ -2754,7 +2833,7 @@ call :dk_color %Gray% "Checking Old Office With Sub License [Found. Update Of
|
|||||||
|
|
||||||
::========================================================================================================================================
|
::========================================================================================================================================
|
||||||
|
|
||||||
:: mass<>grave<.>dev/office-license-is-not-genuine
|
:: mass()grave(dot)dev/office-license-is-not-genuine
|
||||||
:: Add registry keys for volume products so that 'non-genuine' banner won't appear
|
:: Add registry keys for volume products so that 'non-genuine' banner won't appear
|
||||||
:: Script already is using MAK instead of GVLK so it won't appear anyway, but registry keys are added incase Office installs default GVLK grace key for volume products
|
:: Script already is using MAK instead of GVLK so it won't appear anyway, but registry keys are added incase Office installs default GVLK grace key for volume products
|
||||||
|
|
||||||
@@ -2796,7 +2875,7 @@ if defined ohub call :dk_color %Gray% "Office apps such as Word, Excel are activ
|
|||||||
echo Help: %mas%troubleshoot
|
echo Help: %mas%troubleshoot
|
||||||
) else (
|
) else (
|
||||||
call :dk_color %Red% "Some errors were detected."
|
call :dk_color %Red% "Some errors were detected."
|
||||||
if not defined ierror if not defined showfix if not defined serv_cor if not defined serv_cste call :dk_color %Blue% "%_fixmsg%"
|
if not defined ierror if not defined showfix call :dk_color %Blue% "%_fixmsg%"
|
||||||
echo:
|
echo:
|
||||||
set fixes=%fixes% %mas%troubleshoot
|
set fixes=%fixes% %mas%troubleshoot
|
||||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||||
@@ -3501,10 +3580,12 @@ call :dk_color %Gray% "Checking Total User Accounts [%counter%]"
|
|||||||
|
|
||||||
:: Clear the vNext/shared/device license blocks which may prevent ohook activation
|
:: Clear the vNext/shared/device license blocks which may prevent ohook activation
|
||||||
|
|
||||||
|
set vnextexist=
|
||||||
rmdir /s /q "%ProgramData%\Microsoft\Office\Licenses\" %nul%
|
rmdir /s /q "%ProgramData%\Microsoft\Office\Licenses\" %nul%
|
||||||
|
|
||||||
for %%x in (15 16) do (
|
for %%x in (15 16) do (
|
||||||
for %%# in (%_sidlist%) do (
|
for %%# in (%_sidlist%) do (
|
||||||
|
reg query HKU\%%#\Software\Microsoft\Office\%%x.0\Common\Licensing /s %nul2% | findstr /i "CIDToLicenseIdsMapping LicenseIdToEmailMapping @" %nul% && set vnextexist=1
|
||||||
reg delete HKU\%%#\Software\Microsoft\Office\%%x.0\Common\Licensing /f %nul%
|
reg delete HKU\%%#\Software\Microsoft\Office\%%x.0\Common\Licensing /f %nul%
|
||||||
|
|
||||||
for /f "skip=2 tokens=2*" %%a in ('"reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\%%#" /v ProfileImagePath" %nul6%') do (
|
for /f "skip=2 tokens=2*" %%a in ('"reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\%%#" /v ProfileImagePath" %nul6%') do (
|
||||||
@@ -3527,6 +3608,7 @@ rmdir /s /q "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\L
|
|||||||
if exist "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\SystemAppData\Helium\User.dat" (
|
if exist "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\SystemAppData\Helium\User.dat" (
|
||||||
set defname=DEFTEMP-%%#
|
set defname=DEFTEMP-%%#
|
||||||
reg load HKU\!defname! "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\SystemAppData\Helium\User.dat" %nul%
|
reg load HKU\!defname! "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\SystemAppData\Helium\User.dat" %nul%
|
||||||
|
reg query HKU\!defname!\Software\Microsoft\Office\16.0\Common\Licensing /s %nul2% | findstr /i "CIDToLicenseIdsMapping LicenseIdToEmailMapping @" %nul% && set vnextexist=1
|
||||||
reg delete HKU\!defname!\Software\Microsoft\Office\16.0\Common\Licensing /f %nul%
|
reg delete HKU\!defname!\Software\Microsoft\Office\16.0\Common\Licensing /f %nul%
|
||||||
reg unload HKU\!defname! %nul%
|
reg unload HKU\!defname! %nul%
|
||||||
)
|
)
|
||||||
@@ -3534,6 +3616,15 @@ reg unload HKU\!defname! %nul%
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if defined vnextexist (
|
||||||
|
echo:
|
||||||
|
call :dk_color %Gray% "Office vNext subscription detected:"
|
||||||
|
call :dk_color %Blue% "If active, this license overrides other activation methods."
|
||||||
|
call :dk_color %Blue% "If expiring soon, rerun the script after expiration."
|
||||||
|
call :dk_color2 %Blue% "If expired and script activation fails, get help - " %_Yellow% " %mas%troubleshoot"
|
||||||
|
echo:
|
||||||
|
)
|
||||||
|
|
||||||
:: Clear SharedComputerLicensing for office
|
:: Clear SharedComputerLicensing for office
|
||||||
:: https://learn.microsoft.com/en-us/deployoffice/overview-shared-computer-activation
|
:: https://learn.microsoft.com/en-us/deployoffice/overview-shared-computer-activation
|
||||||
|
|
||||||
@@ -3700,7 +3791,6 @@ exit /b
|
|||||||
|
|
||||||
14_4eaff0d0-c6cb-4187-94f3-c7656d49a0aa_Retail________ExcelR_[HSExcelR]
|
14_4eaff0d0-c6cb-4187-94f3-c7656d49a0aa_Retail________ExcelR_[HSExcelR]
|
||||||
14_7004b7f0-6407-4f45-8eac-966e5f868bde_Retail________GrooveR
|
14_7004b7f0-6407-4f45-8eac-966e5f868bde_Retail________GrooveR
|
||||||
14_fbf4ac36-31c8-4340-8666-79873129cf40_Retail________OutlookR
|
|
||||||
14_133c8359-4e93-4241-8118-30bb18737ea0_Retail________PowerPointR_[HSPowerPointR]
|
14_133c8359-4e93-4241-8118-30bb18737ea0_Retail________PowerPointR_[HSPowerPointR]
|
||||||
14_db3bbc9c-ce52-41d1-a46f-1a1d68059119_Retail________WordR_[HSWordR]
|
14_db3bbc9c-ce52-41d1-a46f-1a1d68059119_Retail________WordR_[HSWordR]
|
||||||
14_dbe3aee0-5183-4ff7-8142-66050173cb01_Retail________SmallBusBasicsR_[SmallBusBasicsMSDNR]
|
14_dbe3aee0-5183-4ff7-8142-66050173cb01_Retail________SmallBusBasicsR_[SmallBusBasicsMSDNR]
|
||||||
@@ -3729,6 +3819,7 @@ for %%# in (
|
|||||||
14_85e22450-b741-430c-a172-a37962c938af_6GKT2-KMJPK-4RRBF-8VQKB-JB%f%6G6_MAK___________InfoPathVL
|
14_85e22450-b741-430c-a172-a37962c938af_6GKT2-KMJPK-4RRBF-8VQKB-JB%f%6G6_MAK___________InfoPathVL
|
||||||
14_3f7aa693-9a7e-44fc-9309-bb3d8e604925_2TG3P-9DB76-4YT99-8RXGD-CW%f%XBP_Retail________OneNoteR_[HSOneNoteR]
|
14_3f7aa693-9a7e-44fc-9309-bb3d8e604925_2TG3P-9DB76-4YT99-8RXGD-CW%f%XBP_Retail________OneNoteR_[HSOneNoteR]
|
||||||
14_6860b31f-6a67-48b8-84b9-e312b3485c4b_CV64P-F4VRH-BJ33D-PH6MR-X6%f%9RY_MAK___________OneNoteVL
|
14_6860b31f-6a67-48b8-84b9-e312b3485c4b_CV64P-F4VRH-BJ33D-PH6MR-X6%f%9RY_MAK___________OneNoteVL
|
||||||
|
14_fbf4ac36-31c8-4340-8666-79873129cf40_9D8FR-7GYBW-4YG8M-V36JK-VD%f%7CM_Retail________OutlookR
|
||||||
14_a9aeabd8-63b8-4079-a28e-f531807fd6b8_J8C9M-YXMH2-9CX44-2C3YG-V7%f%692_MAK___________OutlookVL
|
14_a9aeabd8-63b8-4079-a28e-f531807fd6b8_J8C9M-YXMH2-9CX44-2C3YG-V7%f%692_MAK___________OutlookVL
|
||||||
14_acb51361-c0db-4895-9497-1831c41f31a6_GMBWM-WVX26-7WHV4-DB43D-WV%f%DY2_Retail________PersonalR_[PersonalDemoR,PersonalPrepaidR]
|
14_acb51361-c0db-4895-9497-1831c41f31a6_GMBWM-WVX26-7WHV4-DB43D-WV%f%DY2_Retail________PersonalR_[PersonalDemoR,PersonalPrepaidR]
|
||||||
14_38252940-718c-4aa6-81a4-135398e53851_HPBQP-RJHDR-Q3472-PT9Q6-PB%f%B72_MAK___________PowerPointVL
|
14_38252940-718c-4aa6-81a4-135398e53851_HPBQP-RJHDR-Q3472-PT9Q6-PB%f%B72_MAK___________PowerPointVL
|
||||||
@@ -4067,13 +4158,13 @@ $MemoryStream.Close()
|
|||||||
::
|
::
|
||||||
:: The files are encoded in base64 to make AIO version.
|
:: The files are encoded in base64 to make AIO version.
|
||||||
::
|
::
|
||||||
:: mass<>grave<.>dev/ohook
|
:: mass()grave(dot)dev/ohook
|
||||||
:: Here you can find the files source code and info on how to rebuild the identical sppc.dll files
|
:: Here you can find the files source code and info on how to rebuild the identical sppc.dll files
|
||||||
::
|
::
|
||||||
:: stackoverflow.com/a/35335273
|
:: stackoverflow.com/a/35335273
|
||||||
:: Here you can check how to extract sppc.dll files from base64
|
:: Here you can check how to extract sppc.dll files from base64
|
||||||
::
|
::
|
||||||
:: For any further question, feel free to contact us on mass<>grave<.>dev/contactus
|
:: For any further question, feel free to contact us on mass()grave(dot)dev/contactus
|
||||||
::
|
::
|
||||||
::========================================================================================================================================
|
::========================================================================================================================================
|
||||||
::
|
::
|
||||||
@@ -4259,7 +4350,7 @@ set tsids=
|
|||||||
set _resall=0
|
set _resall=0
|
||||||
|
|
||||||
:: Choose activation method:
|
:: Choose activation method:
|
||||||
:: In builds 19041 and later, the script will auto select StaticCID (requires internet). If no internet is detected, it will then auto select the KMS4k method. For builds lower than 19041, the script will auto select ZeroCID.
|
:: In builds 26100 and later, the script will auto select StaticCID (requires internet). If no internet is detected, it will then auto select the KMS4k method. For builds lower than 26100, the script will auto select ZeroCID.
|
||||||
:: To change the activation method, run the script with the parameters "/Z-SCID", "/Z-ZCID", or "/Z-KMS4k", or modify the option from Auto to SCID, ZCID, or KMS4k in the line below.
|
:: To change the activation method, run the script with the parameters "/Z-SCID", "/Z-ZCID", or "/Z-KMS4k", or modify the option from Auto to SCID, ZCID, or KMS4k in the line below.
|
||||||
set _actmethod=Auto
|
set _actmethod=Auto
|
||||||
|
|
||||||
@@ -4394,8 +4485,8 @@ echo:
|
|||||||
echo ______________________________________________________________
|
echo ______________________________________________________________
|
||||||
echo:
|
echo:
|
||||||
call :dk_color2 %_White% " [1] " %_Green% "Auto"
|
call :dk_color2 %_White% " [1] " %_Green% "Auto"
|
||||||
echo Builds ^>= 19041 - StaticCID (KMS4k if offline)
|
echo Builds ^>= 26100 - StaticCID (KMS4k if offline)
|
||||||
echo Builds ^< 19041 - ZeroCID
|
echo Builds ^< 26100 - ZeroCID
|
||||||
echo __________________________________________________
|
echo __________________________________________________
|
||||||
echo:
|
echo:
|
||||||
echo [2] StaticCID
|
echo [2] StaticCID
|
||||||
@@ -4404,8 +4495,7 @@ echo Not for Windows 7 or older
|
|||||||
echo __________________________________________________
|
echo __________________________________________________
|
||||||
echo:
|
echo:
|
||||||
echo [3] ZeroCID
|
echo [3] ZeroCID
|
||||||
echo Works reliably on builds below 19041
|
echo Works reliably on builds below 26100
|
||||||
echo May break on builds between 19041-26100
|
|
||||||
echo Does not work on builds above 26100.4188
|
echo Does not work on builds above 26100.4188
|
||||||
echo __________________________________________________
|
echo __________________________________________________
|
||||||
echo:
|
echo:
|
||||||
@@ -4517,7 +4607,7 @@ if /i %_actmethod%==ZCID set tsmethod=ZeroCID
|
|||||||
if /i %_actmethod%==KMS4k set tsmethod=KMS4k
|
if /i %_actmethod%==KMS4k set tsmethod=KMS4k
|
||||||
|
|
||||||
if /i %_actmethod%==Auto (
|
if /i %_actmethod%==Auto (
|
||||||
if %winbuild% GEQ 19041 (
|
if %winbuild% GEQ 26100 (
|
||||||
set tsmethod=StaticCID
|
set tsmethod=StaticCID
|
||||||
) else (
|
) else (
|
||||||
set tsmethod=ZeroCID
|
set tsmethod=ZeroCID
|
||||||
@@ -5319,7 +5409,7 @@ call :ts_process
|
|||||||
|
|
||||||
::========================================================================================================================================
|
::========================================================================================================================================
|
||||||
|
|
||||||
:: mass<>grave<.>dev/office-license-is-not-genuine
|
:: mass()grave(dot)dev/office-license-is-not-genuine
|
||||||
:: Add registry keys for volume products so that 'non-genuine' banner won't appear
|
:: Add registry keys for volume products so that 'non-genuine' banner won't appear
|
||||||
|
|
||||||
set "kmskey=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\0ff1ce15-a989-479d-af46-f275c6370663"
|
set "kmskey=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\0ff1ce15-a989-479d-af46-f275c6370663"
|
||||||
@@ -6299,7 +6389,7 @@ using System.Xml.Linq;
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Common.cs
|
// LibTSforge/Common.cs
|
||||||
namespace LibTSforge
|
namespace LibTSforge
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
@@ -6541,7 +6631,7 @@ namespace LibTSforge
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// SPP/PKeyConfig.cs
|
// LibTSforge/SPP/PKeyConfig.cs
|
||||||
namespace LibTSforge.SPP
|
namespace LibTSforge.SPP
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
@@ -6567,7 +6657,7 @@ namespace LibTSforge.SPP
|
|||||||
|
|
||||||
public bool Contains(int n)
|
public bool Contains(int n)
|
||||||
{
|
{
|
||||||
return Start <= n && End <= n;
|
return Start <= n && n <= End;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6697,10 +6787,19 @@ namespace LibTSforge.SPP
|
|||||||
string refActIdStr = configNode.SelectSingleNode("./p:ActConfigId", nsmgr).InnerText;
|
string refActIdStr = configNode.SelectSingleNode("./p:ActConfigId", nsmgr).InnerText;
|
||||||
Guid refActId = new Guid(refActIdStr);
|
Guid refActId = new Guid(refActIdStr);
|
||||||
int group = int.Parse(configNode.SelectSingleNode("./p:RefGroupId", nsmgr).InnerText);
|
int group = int.Parse(configNode.SelectSingleNode("./p:RefGroupId", nsmgr).InnerText);
|
||||||
List<KeyRange> keyRanges = ranges[refActIdStr];
|
List<KeyRange> keyRanges;
|
||||||
|
ranges.TryGetValue(refActIdStr, out keyRanges);
|
||||||
|
|
||||||
|
if (keyRanges == null)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (keyRanges.Count > 0 && !Products.ContainsKey(refActId))
|
if (keyRanges.Count > 0 && !Products.ContainsKey(refActId))
|
||||||
{
|
{
|
||||||
|
PKeyAlgorithm algorithm;
|
||||||
|
algorithms.TryGetValue(group, out algorithm);
|
||||||
|
|
||||||
ProductConfig productConfig = new ProductConfig
|
ProductConfig productConfig = new ProductConfig
|
||||||
{
|
{
|
||||||
GroupId = group,
|
GroupId = group,
|
||||||
@@ -6708,7 +6807,7 @@ namespace LibTSforge.SPP
|
|||||||
Description = configNode.SelectSingleNode("./p:ProductDescription", nsmgr).InnerText,
|
Description = configNode.SelectSingleNode("./p:ProductDescription", nsmgr).InnerText,
|
||||||
Channel = configNode.SelectSingleNode("./p:ProductKeyType", nsmgr).InnerText,
|
Channel = configNode.SelectSingleNode("./p:ProductKeyType", nsmgr).InnerText,
|
||||||
Randomized = configNode.SelectSingleNode("./p:ProductKeyType", nsmgr).InnerText.ToLower() == "true",
|
Randomized = configNode.SelectSingleNode("./p:ProductKeyType", nsmgr).InnerText.ToLower() == "true",
|
||||||
Algorithm = algorithms[group],
|
Algorithm = algorithm,
|
||||||
Ranges = keyRanges,
|
Ranges = keyRanges,
|
||||||
ActivationId = refActId
|
ActivationId = refActId
|
||||||
};
|
};
|
||||||
@@ -6758,7 +6857,7 @@ namespace LibTSforge.SPP
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// SPP/ProductKey.cs
|
// LibTSforge/SPP/ProductKey.cs
|
||||||
namespace LibTSforge.SPP
|
namespace LibTSforge.SPP
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
@@ -7074,7 +7173,7 @@ namespace LibTSforge.SPP
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// SPP/SLAPI.cs
|
// LibTSforge/SPP/SLAPI.cs
|
||||||
namespace LibTSforge.SPP
|
namespace LibTSforge.SPP
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
@@ -7487,7 +7586,7 @@ namespace LibTSforge.SPP
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// SPP/SPPUtils.cs
|
// LibTSforge/SPP/SPPUtils.cs
|
||||||
namespace LibTSforge.SPP
|
namespace LibTSforge.SPP
|
||||||
{
|
{
|
||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
@@ -7824,7 +7923,7 @@ namespace LibTSforge.SPP
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// SPP/SPSys.cs
|
// LibTSforge/SPP/SPSys.cs
|
||||||
namespace LibTSforge.SPP
|
namespace LibTSforge.SPP
|
||||||
{
|
{
|
||||||
using Microsoft.Win32.SafeHandles;
|
using Microsoft.Win32.SafeHandles;
|
||||||
@@ -7871,7 +7970,7 @@ namespace LibTSforge.SPP
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Crypto/CryptoUtils.cs
|
// LibTSforge/Crypto/CryptoUtils.cs
|
||||||
namespace LibTSforge.Crypto
|
namespace LibTSforge.Crypto
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
@@ -8006,7 +8105,7 @@ namespace LibTSforge.Crypto
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Crypto/Keys.cs
|
// LibTSforge/Crypto/Keys.cs
|
||||||
namespace LibTSforge.Crypto
|
namespace LibTSforge.Crypto
|
||||||
{
|
{
|
||||||
public static class Keys
|
public static class Keys
|
||||||
@@ -8096,7 +8195,7 @@ namespace LibTSforge.Crypto
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Crypto/PhysStoreCrypto.cs
|
// LibTSforge/Crypto/PhysStoreCrypto.cs
|
||||||
namespace LibTSforge.Crypto
|
namespace LibTSforge.Crypto
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
@@ -8181,7 +8280,7 @@ namespace LibTSforge.Crypto
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Modifiers/GenPKeyInstall.cs
|
// LibTSforge/Modifiers/GenPKeyInstall.cs
|
||||||
namespace LibTSforge.Modifiers
|
namespace LibTSforge.Modifiers
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
@@ -8392,7 +8491,7 @@ namespace LibTSforge.Modifiers
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Modifiers/GracePeriodReset.cs
|
// LibTSforge/Modifiers/GracePeriodReset.cs
|
||||||
namespace LibTSforge.Modifiers
|
namespace LibTSforge.Modifiers
|
||||||
{
|
{
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -8425,7 +8524,7 @@ namespace LibTSforge.Modifiers
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Modifiers/KeyChangeLockDelete.cs
|
// LibTSforge/Modifiers/KeyChangeLockDelete.cs
|
||||||
namespace LibTSforge.Modifiers
|
namespace LibTSforge.Modifiers
|
||||||
{
|
{
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -8465,7 +8564,7 @@ namespace LibTSforge.Modifiers
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Modifiers/KMSHostCharge.cs
|
// LibTSforge/Modifiers/KMSHostCharge.cs
|
||||||
namespace LibTSforge.Modifiers
|
namespace LibTSforge.Modifiers
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
@@ -8626,7 +8725,7 @@ namespace LibTSforge.Modifiers
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Modifiers/RearmReset.cs
|
// LibTSforge/Modifiers/RearmReset.cs
|
||||||
namespace LibTSforge.Modifiers
|
namespace LibTSforge.Modifiers
|
||||||
{
|
{
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -8682,7 +8781,7 @@ namespace LibTSforge.Modifiers
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Modifiers/SetIIDParams.cs
|
// LibTSforge/Modifiers/SetIIDParams.cs
|
||||||
namespace LibTSforge.Modifiers
|
namespace LibTSforge.Modifiers
|
||||||
{
|
{
|
||||||
using PhysicalStore;
|
using PhysicalStore;
|
||||||
@@ -8751,7 +8850,7 @@ namespace LibTSforge.Modifiers
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Modifiers/TamperedFlagsDelete.cs
|
// LibTSforge/Modifiers/TamperedFlagsDelete.cs
|
||||||
namespace LibTSforge.Modifiers
|
namespace LibTSforge.Modifiers
|
||||||
{
|
{
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -8801,7 +8900,7 @@ namespace LibTSforge.Modifiers
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Modifiers/UniqueIdDelete.cs
|
// LibTSforge/Modifiers/UniqueIdDelete.cs
|
||||||
namespace LibTSforge.Modifiers
|
namespace LibTSforge.Modifiers
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
@@ -8860,7 +8959,7 @@ namespace LibTSforge.Modifiers
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Activators/KMS4K.cs
|
// LibTSforge/Activators/KMS4K.cs
|
||||||
namespace LibTSforge.Activators
|
namespace LibTSforge.Activators
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
@@ -9071,7 +9170,7 @@ namespace LibTSforge.Activators
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Activators/ZeroCID.cs
|
// LibTSforge/Activators/ZeroCID.cs
|
||||||
namespace LibTSforge.Activators
|
namespace LibTSforge.Activators
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
@@ -9260,7 +9359,7 @@ namespace LibTSforge.Activators
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// TokenStore/Common.cs
|
// LibTSforge/TokenStore/Common.cs
|
||||||
namespace LibTSforge.TokenStore
|
namespace LibTSforge.TokenStore
|
||||||
{
|
{
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -9330,7 +9429,7 @@ namespace LibTSforge.TokenStore
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// TokenStore/ITokenStore.cs
|
// LibTSforge/TokenStore/ITokenStore.cs
|
||||||
namespace LibTSforge.TokenStore
|
namespace LibTSforge.TokenStore
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
@@ -9350,7 +9449,7 @@ namespace LibTSforge.TokenStore
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// TokenStore/TokenStoreModern.cs
|
// LibTSforge/TokenStore/TokenStoreModern.cs
|
||||||
namespace LibTSforge.TokenStore
|
namespace LibTSforge.TokenStore
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
@@ -9636,7 +9735,7 @@ namespace LibTSforge.TokenStore
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// PhysicalStore/Common.cs
|
// LibTSforge/PhysicalStore/Common.cs
|
||||||
namespace LibTSforge.PhysicalStore
|
namespace LibTSforge.PhysicalStore
|
||||||
{
|
{
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
@@ -9667,7 +9766,7 @@ namespace LibTSforge.PhysicalStore
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// PhysicalStore/IPhysicalStore.cs
|
// LibTSforge/PhysicalStore/IPhysicalStore.cs
|
||||||
namespace LibTSforge.PhysicalStore
|
namespace LibTSforge.PhysicalStore
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
@@ -9762,7 +9861,7 @@ namespace LibTSforge.PhysicalStore
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// PhysicalStore/PhysicalStoreModern.cs
|
// LibTSforge/PhysicalStore/PhysicalStoreModern.cs
|
||||||
namespace LibTSforge.PhysicalStore
|
namespace LibTSforge.PhysicalStore
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
@@ -10180,7 +10279,7 @@ namespace LibTSforge.PhysicalStore
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// PhysicalStore/PhysicalStoreVista.cs
|
// LibTSforge/PhysicalStore/PhysicalStoreVista.cs
|
||||||
namespace LibTSforge.PhysicalStore
|
namespace LibTSforge.PhysicalStore
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
@@ -10539,7 +10638,7 @@ namespace LibTSforge.PhysicalStore
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// PhysicalStore/PhysicalStoreWin7.cs
|
// LibTSforge/PhysicalStore/PhysicalStoreWin7.cs
|
||||||
namespace LibTSforge.PhysicalStore
|
namespace LibTSforge.PhysicalStore
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
@@ -10916,7 +11015,7 @@ namespace LibTSforge.PhysicalStore
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// PhysicalStore/VariableBag.cs
|
// LibTSforge/PhysicalStore/VariableBag.cs
|
||||||
namespace LibTSforge.PhysicalStore
|
namespace LibTSforge.PhysicalStore
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
@@ -11195,6 +11294,7 @@ else {
|
|||||||
if ($env:_debug -eq '0') {
|
if ($env:_debug -eq '0') {
|
||||||
[LibTSforge.Logger]::HideOutput = $true
|
[LibTSforge.Logger]::HideOutput = $true
|
||||||
}
|
}
|
||||||
|
[void][LibTSforge.Utils]::Wow64EnableWow64FsRedirection($false)
|
||||||
$ver = [LibTSforge.Utils]::DetectVersion()
|
$ver = [LibTSforge.Utils]::DetectVersion()
|
||||||
$prod = [LibTSforge.SPP.SPPUtils]::DetectCurrentKey()
|
$prod = [LibTSforge.SPP.SPPUtils]::DetectCurrentKey()
|
||||||
$tsactids = @($args)
|
$tsactids = @($args)
|
||||||
@@ -12325,13 +12425,10 @@ if exist "%tdir%\Genuine*" del /f /q "%tdir%\Genuine*" %nul%
|
|||||||
if exist "%tdir%\*.xml" del /f /q "%tdir%\*.xml" %nul%
|
if exist "%tdir%\*.xml" del /f /q "%tdir%\*.xml" %nul%
|
||||||
if exist "%ProgramData%\Microsoft\Windows\ClipSVC\Install\Migration\*" del /f /q "%ProgramData%\Microsoft\Windows\ClipSVC\Install\Migration\*" %nul%
|
if exist "%ProgramData%\Microsoft\Windows\ClipSVC\Install\Migration\*" del /f /q "%ProgramData%\Microsoft\Windows\ClipSVC\Install\Migration\*" %nul%
|
||||||
|
|
||||||
:: Signature value is as it is, it's not encoded
|
:: Generate ticket
|
||||||
:: Session ID is in Base64 encoded format. It's decoded value is "OSMajorVersion=5;OSMinorVersion=1;OSPlatformId=2;PP=0;GVLKExp=2038-01-19T03:14:07Z;DownlevelGenuineState=1;"
|
|
||||||
:: Check mass grave [.] dev/kms38#manual-activation to see how it's generated
|
|
||||||
|
|
||||||
set "signature=C52iGEoH+1VqzI6kEAqOhUyrWuEObnivzaVjyef8WqItVYd/xGDTZZ3bkxAI9hTpobPFNJyJx6a3uriXq3HVd7mlXfSUK9ydeoUdG4eqMeLwkxeb6jQWJzLOz41rFVSMtBL0e+ycCATebTaXS4uvFYaDHDdPw2lKY8ADj3MLgsA="
|
set "SessionIdStr=OSMajorVersion=5;OSMinorVersion=1;OSPlatformId=2;PP=0;GVLKExp=2038-01-19T03:14:07Z;DownlevelGenuineState=1;"
|
||||||
set "sessionId=TwBTAE0AYQBqAG8AcgBWAGUAcgBzAGkAbwBuAD0ANQA7AE8AUwBNAGkAbgBvAHIAVgBlAHIAcwBpAG8AbgA9ADEAOwBPAFMAUABsAGEAdABmAG8AcgBtAEkAZAA9ADIAOwBQAFAAPQAwADsARwBWAEwASwBFAHgAcAA9ADIAMAAzADgALQAwADEALQAxADkAVAAwADMAOgAxADQAOgAwADcAWgA7AEQAbwB3AG4AbABlAHYAZQBsAEcAZQBuAHUAaQBuAGUAUwB0AGEAdABlAD0AMQA7AAAA"
|
%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':sign\:.*';. ([scriptblock]::Create($f[1]))"
|
||||||
<nul set /p "=<?xml version="1.0" encoding="utf-8"?><genuineAuthorization xmlns="http://www.microsoft.com/DRM/SL/GenuineAuthorization/1.0"><version>1.0</version><genuineProperties origin="sppclient"><properties>OA3xOriginalProductId=;OA3xOriginalProductKey=;SessionId=%sessionId%;TimeStampClient=2022-10-11T12:00:00Z</properties><signatures><signature name="clientLockboxKey" method="rsa-sha256">%signature%</signature></signatures></genuineProperties></genuineAuthorization>" >"%tdir%\GenuineTicket"
|
|
||||||
|
|
||||||
copy /y /b "%tdir%\GenuineTicket" "%tdir%\GenuineTicket.xml" %nul%
|
copy /y /b "%tdir%\GenuineTicket" "%tdir%\GenuineTicket.xml" %nul%
|
||||||
|
|
||||||
@@ -13348,7 +13445,7 @@ if %winbuild% GEQ 9200 (
|
|||||||
for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun /v InstallPath" %nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" set "_C16R=1"
|
for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun /v InstallPath" %nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" set "_C16R=1"
|
||||||
for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun /v InstallPath /reg:32" %nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" set "_C16R=1"
|
for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun /v InstallPath /reg:32" %nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" set "_C16R=1"
|
||||||
if defined _C16R (
|
if defined _C16R (
|
||||||
REM mass<>grave<.>dev/office-license-is-not-genuine
|
REM mass()grave(dot)dev/office-license-is-not-genuine
|
||||||
set _server=10.0.0.10
|
set _server=10.0.0.10
|
||||||
call :_taskregserv
|
call :_taskregserv
|
||||||
echo Keeping the non-existent IP address 10.0.0.10 as %KS% Server.
|
echo Keeping the non-existent IP address 10.0.0.10 as %KS% Server.
|
||||||
@@ -13693,7 +13790,7 @@ exit /b
|
|||||||
|
|
||||||
::============================================================================
|
::============================================================================
|
||||||
::
|
::
|
||||||
:: Homepage: mass<>grave<.>dev
|
:: Homepage: mass()grave(dot)dev
|
||||||
:: Email: mas.help@outlook.com
|
:: Email: mas.help@outlook.com
|
||||||
::
|
::
|
||||||
::============================================================================
|
::============================================================================
|
||||||
@@ -13734,7 +13831,7 @@ set "PSModulePath=%ProgramFiles%\WindowsPowerShell\Modules;%SysPath%\WindowsPowe
|
|||||||
set _tserror=
|
set _tserror=
|
||||||
set winbuild=1
|
set winbuild=1
|
||||||
set "nul=>nul 2>&1"
|
set "nul=>nul 2>&1"
|
||||||
for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G
|
for /f "tokens=2 delims=[]" %%G in ('ver') do for /f "tokens=2,3,4 delims=. " %%H in ("%%~G") do set "winbuild=%%J"
|
||||||
set psc=powershell.exe -nop -c
|
set psc=powershell.exe -nop -c
|
||||||
|
|
||||||
set _slexe=sppsvc.exe& set _slser=sppsvc
|
set _slexe=sppsvc.exe& set _slser=sppsvc
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
@set masver=3.4
|
@set masver=3.7
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
::============================================================================
|
::============================================================================
|
||||||
::
|
::
|
||||||
:: Homepage: mass<>grave<.>dev
|
:: Homepage: mass()grave(dot)dev
|
||||||
:: Email: mas.help@outlook.com
|
:: Email: mas.help@outlook.com
|
||||||
::
|
::
|
||||||
::============================================================================
|
::============================================================================
|
||||||
@@ -50,6 +50,7 @@ set "_cmdf=%~f0"
|
|||||||
for %%# in (%*) do (
|
for %%# in (%*) do (
|
||||||
if /i "%%#"=="re1" set re1=1
|
if /i "%%#"=="re1" set re1=1
|
||||||
if /i "%%#"=="re2" set re2=1
|
if /i "%%#"=="re2" set re2=1
|
||||||
|
if /i "%%#"=="-qedit" (set re1=1&set re2=1)
|
||||||
)
|
)
|
||||||
|
|
||||||
:: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows
|
:: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows
|
||||||
@@ -878,7 +879,7 @@ goto :dk_done
|
|||||||
set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe
|
set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe
|
||||||
set psc=%ps% -nop -c
|
set psc=%ps% -nop -c
|
||||||
set winbuild=1
|
set winbuild=1
|
||||||
for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G
|
for /f "tokens=2 delims=[]" %%G in ('ver') do for /f "tokens=2,3,4 delims=. " %%H in ("%%~G") do set "winbuild=%%J"
|
||||||
|
|
||||||
set _slexe=sppsvc.exe& set _slser=sppsvc
|
set _slexe=sppsvc.exe& set _slser=sppsvc
|
||||||
if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc)
|
if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc)
|
||||||
@@ -1342,7 +1343,7 @@ sc start %%# %nul%
|
|||||||
if !errorlevel! EQU 1060 set _corrupt=1
|
if !errorlevel! EQU 1060 set _corrupt=1
|
||||||
sc query %%# %nul% || set _corrupt=1
|
sc query %%# %nul% || set _corrupt=1
|
||||||
for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _regcorr (
|
for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _regcorr (
|
||||||
reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr="-RegistryError" )
|
reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr=-RegistryError)
|
||||||
)
|
)
|
||||||
|
|
||||||
if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#!_regcorr!") else (set "serv_cor=%%#!_regcorr!"))
|
if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#!_regcorr!") else (set "serv_cor=%%#!_regcorr!"))
|
||||||
@@ -1668,7 +1669,7 @@ cmd /c exit /b %error_code%
|
|||||||
if %error_code% NEQ 0 set "error_code=0x%=ExitCode%"
|
if %error_code% NEQ 0 set "error_code=0x%=ExitCode%"
|
||||||
|
|
||||||
if %error_code% NEQ 0 (
|
if %error_code% NEQ 0 (
|
||||||
call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] %error_code%"
|
call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] [%error_code%]"
|
||||||
if not defined showfix (
|
if not defined showfix (
|
||||||
echo:
|
echo:
|
||||||
call :dk_color %Blue% "%_fixmsg%"
|
call :dk_color %Blue% "%_fixmsg%"
|
||||||
@@ -1687,6 +1688,7 @@ call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
|||||||
|
|
||||||
if not defined apps (
|
if not defined apps (
|
||||||
%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul%
|
%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul%
|
||||||
|
if not defined _vis if !errorlevel! NEQ 0 set rlicfailed=1
|
||||||
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -1708,6 +1710,13 @@ set error=1
|
|||||||
set showfix=1
|
set showfix=1
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if not defined showfix if defined rlicfailed (
|
||||||
|
echo:
|
||||||
|
call :dk_color %Blue% "%_fixmsg%"
|
||||||
|
call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option."
|
||||||
|
echo:
|
||||||
|
)
|
||||||
|
|
||||||
if %winbuild% GEQ 7600 if exist "%tokenstore%\" if not exist "%tokenstore%\tokens.dat" (
|
if %winbuild% GEQ 7600 if exist "%tokenstore%\" if not exist "%tokenstore%\tokens.dat" (
|
||||||
call :dk_color %Red% "Checking SPP tokens.dat [Not Found] [%tokenstore%\]"
|
call :dk_color %Red% "Checking SPP tokens.dat [Not Found] [%tokenstore%\]"
|
||||||
)
|
)
|
||||||
@@ -1846,19 +1855,22 @@ call :dk_color %Gray% "Checking SkipRearm [Default 0 Value
|
|||||||
|
|
||||||
if %winbuild% GEQ 9200 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" (
|
if %winbuild% GEQ 9200 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" (
|
||||||
%psc% "Get-WmiObject -Query 'SELECT Description FROM SoftwareLicensingProduct WHERE PartialProductKey IS NOT NULL AND LicenseDependsOn IS NULL' | Select-Object -Property Description" %nul2% | findstr /i "KMS_" %nul1% || (
|
%psc% "Get-WmiObject -Query 'SELECT Description FROM SoftwareLicensingProduct WHERE PartialProductKey IS NOT NULL AND LicenseDependsOn IS NULL' | Select-Object -Property Description" %nul2% | findstr /i "KMS_" %nul1% || (
|
||||||
for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' -TaskPath '\Microsoft\Windows\SoftwareProtectionPlatform\').State" %nul6%') do (set taskinfo=%%a)
|
for /f "delims=" %%a in ('%psc% "$s=New-Object -ComObject 'Schedule.Service'; $s.Connect(); $state=$s.GetFolder('\Microsoft\Windows\SoftwareProtectionPlatform').GetTask('SvcRestartTask').State; @{0='Unknown';1='Disabled';2='Queued';3='Ready';4='Running'}[$state]" %nul6%') do (set taskinfo=%%a)
|
||||||
|
|
||||||
echo !taskinfo! | find /i "Ready" %nul% || (
|
echo !taskinfo! | find /i "Ready" %nul% || (
|
||||||
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul%
|
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul%
|
||||||
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed
|
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed
|
||||||
if "!taskinfo!"=="" set "taskinfo=Not Found"
|
if "!taskinfo!"=="" set "taskinfo=Not Found"
|
||||||
|
|
||||||
call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, system might deactivate later]"
|
call :dk_color %Gray% "Checking SvcRestartTask Status [!taskinfo!. System might deactivate later.]"
|
||||||
if not defined showfix (
|
if not defined showfix (
|
||||||
echo:
|
echo:
|
||||||
|
echo "!taskinfo!" | findstr /i "Removed Not Found" %nul1% && (
|
||||||
|
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||||
|
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||||
|
) || (
|
||||||
call :dk_color %Blue% "Reboot your machine using the restart option and run the script again."
|
call :dk_color %Blue% "Reboot your machine using the restart option and run the script again."
|
||||||
set fixes=%fixes% %mas%troubleshoot
|
)
|
||||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
|
||||||
echo:
|
echo:
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@@ -1976,11 +1988,10 @@ exit /b
|
|||||||
:: 2nd column = Generic Retail/OEM/MAK Key
|
:: 2nd column = Generic Retail/OEM/MAK Key
|
||||||
:: 3rd column = SKU ID
|
:: 3rd column = SKU ID
|
||||||
:: 4th column = Key part number
|
:: 4th column = Key part number
|
||||||
:: 5th column = Ticket signature value. It's as it is, it's not encoded. (Check mass<>grave<.>dev/hwid#manual-activation to see how it's generated)
|
:: 5th column = 1 = activation is not working (at the time of writing this), 0 = activation is working
|
||||||
:: 6th column = 1 = activation is not working (at the time of writing this), 0 = activation is working
|
:: 6th column = Key Type
|
||||||
:: 7th column = Key Type
|
:: 7th column = WMI Edition ID (For reference only)
|
||||||
:: 8th column = WMI Edition ID (For reference only)
|
:: 8th column = Version name incase same Edition ID is used in different OS versions with different key
|
||||||
:: 9th column = Version name incase same Edition ID is used in different OS versions with different key
|
|
||||||
:: Separator = _
|
:: Separator = _
|
||||||
|
|
||||||
|
|
||||||
@@ -1988,39 +1999,39 @@ exit /b
|
|||||||
|
|
||||||
set f=
|
set f=
|
||||||
for %%# in (
|
for %%# in (
|
||||||
8b351c9c-f398-4515-9900-09df49427262_XGVPP-NMH47-7TTHJ-W3FW7-8H%f%V2C___4_X19-99683_HGNKjkKcKQHO6n8srMUrDh/MElffBZarLqCMD9rWtgFKf3YzYOLDPEMGhuO/auNMKCeiU7ebFbQALS/MyZ7TvidMQ2dvzXeXXKzPBjfwQx549WJUU7qAQ9Txg9cR9SAT8b12Pry2iBk+nZWD9VtHK3kOnEYkvp5WTCTsrSi6Re4_0_OEM:NONSLP_Enterprise
|
8b351c9c-f398-4515-9900-09df49427262_XGVPP-NMH47-7TTHJ-W3FW7-8H%f%V2C___4_X19-99683_0_OEM:NONSLP_Enterprise
|
||||||
c83cef07-6b72-4bbc-a28f-a00386872839_3V6Q6-NQXCX-V8YXR-9QCYV-QP%f%FCT__27_X19-98746_NHn2n0N1UfVf00CfaI5LCDMDsKdVAWpD/HAfUrcTAKsw9d2Sks4h5MhyH/WUx+B6dFi8ol7D3AHorR8y9dqVS1Bd2FdZNJl/tTR1PGwYn6KL88NS19aHmFNdX8s4438vaa+Ty8Qk8EDcwm/wscC8lQmi3/RgUKYdyGFvpbGSVlk_0_Volume:MAK_EnterpriseN
|
c83cef07-6b72-4bbc-a28f-a00386872839_3V6Q6-NQXCX-V8YXR-9QCYV-QP%f%FCT__27_X19-98746_0_Volume:MAK_EnterpriseN
|
||||||
4de7cb65-cdf1-4de9-8ae8-e3cce27b9f2c_VK7JG-NPHTM-C97JM-9MPGT-3V%f%66T__48_X19-98841_Yl/jNfxJ1SnaIZCIZ4m6Pf3ySNoQXifNeqfltNaNctx+onwiivOx7qcSn8dFtURzgMzSOFnsRQzb5IrvuqHoxWWl1S3JIQn56FvKsvSx7aFXIX3+2Q98G1amPV/WEQ0uHA5d7Ya6An+g0Z0zRP7evGoomTs4YuweaWiZQjQzSpA_0_____Retail_Professional
|
4de7cb65-cdf1-4de9-8ae8-e3cce27b9f2c_VK7JG-NPHTM-C97JM-9MPGT-3V%f%66T__48_X19-98841_0_____Retail_Professional
|
||||||
9fbaf5d6-4d83-4422-870d-fdda6e5858aa_2B87N-8KFHP-DKV6R-Y2C8J-PK%f%CKT__49_X19-98859_Ge0mRQbW8ALk7T09V+1k1yg66qoS0lhkgPIROOIOgxKmWPAvsiLAYPKDqM4+neFCA/qf1dHFmdh0VUrwFBPYsK251UeWuElj4bZFVISL6gUt1eZwbGfv5eurQ0i+qZiFv+CcQOEFsd5DD4Up6xPLLQS3nAXODL5rSrn2sHRoCVY_0_____Retail_ProfessionalN
|
9fbaf5d6-4d83-4422-870d-fdda6e5858aa_2B87N-8KFHP-DKV6R-Y2C8J-PK%f%CKT__49_X19-98859_0_____Retail_ProfessionalN
|
||||||
f742e4ff-909d-4fe9-aacb-3231d24a0c58_4CPRK-NM3K3-X6XXQ-RXX86-WX%f%CHW__98_X19-98877_vel4ytVtnE8FhvN87Cflz9sbh5QwHD1YGOeej9QP7hF3vlBR4EX2/S/09gRneeXVbQnjDOCd2KFMKRUWHLM7ZhFBk8AtlG+kvUawPZ+CIrwrD3mhi7NMv8UX/xkLK3HnBupMEuEwsMJgCUD8Pn6om1mEiQebHBAqu4cT7GN9Y0g_0_____Retail_CoreN
|
f742e4ff-909d-4fe9-aacb-3231d24a0c58_4CPRK-NM3K3-X6XXQ-RXX86-WX%f%CHW__98_X19-98877_0_____Retail_CoreN
|
||||||
1d1bac85-7365-4fea-949a-96978ec91ae0_N2434-X9D7W-8PF6X-8DV9T-8T%f%YMD__99_X19-99652_Nv17eUTrr1TmUX6frlI7V69VR6yWb7alppCFJPcdjfI+xX4/Cf2np3zm7jmC+zxFb9nELUs477/ydw2KCCXFfM53bKpBQZKHE5+MdGJGxebOCcOtJ3hrkDJtwlVxTQmUgk5xnlmpk8PHg82M2uM5B7UsGLxGKK4d3hi0voSyKeI_0_____Retail_CoreCountrySpecific
|
1d1bac85-7365-4fea-949a-96978ec91ae0_N2434-X9D7W-8PF6X-8DV9T-8T%f%YMD__99_X19-99652_0_____Retail_CoreCountrySpecific
|
||||||
3ae2cc14-ab2d-41f4-972f-5e20142771dc_BT79Q-G7N6G-PGBYW-4YWX6-6F%f%4BT_100_X19-99661_FV2Eao/R5v8sGrfQeOjQ4daokVlNOlqRCDZXuaC45bQd5PsNU3t1b4AwWeYM8TAwbHauzr4tPG0UlsUqUikCZHy0poROx35bBBMBym6Zbm9wDBVyi7nCzBtwS86eOonQ3cU6WfZxhZRze0POdR33G3QTNPrnVIM2gf6nZJYqDOA_0_____Retail_CoreSingleLanguage
|
3ae2cc14-ab2d-41f4-972f-5e20142771dc_BT79Q-G7N6G-PGBYW-4YWX6-6F%f%4BT_100_X19-99661_0_____Retail_CoreSingleLanguage
|
||||||
2b1f36bb-c1cd-4306-bf5c-a0367c2d97d8_YTMG3-N6DKC-DKB77-7M9GH-8H%f%VX7_101_X19-98868_GH/jwFxIcdQhNxJIlFka8c1H48PF0y7TgJwaryAUzqSKXynONLw7MVciDJFVXTkCjbXSdxLSWpPIC50/xyy1rAf8aC7WuN/9cRNAvtFPC1IVAJaMeq1vf4mCqRrrxJQP6ZEcuAeHFzLe/LLovGWCd8rrs6BbBwJXCvAqXImvycQ_0_____Retail_Core
|
2b1f36bb-c1cd-4306-bf5c-a0367c2d97d8_YTMG3-N6DKC-DKB77-7M9GH-8H%f%VX7_101_X19-98868_0_____Retail_Core
|
||||||
2a6137f3-75c0-4f26-8e3e-d83d802865a4_XKCNC-J26Q9-KFHD2-FKTHY-KD%f%72Y_119_X19-99606_hci78IRWDLBtdbnAIKLDgV9whYgtHc1uYyp9y6FszE9wZBD5Nc8CUD2pI2s2RRd3M04C4O7M3tisB3Ov/XVjpAbxlX3MWfUR5w4MH0AphbuQX0p5MuHEDYyfqlRgBBRzOKePF06qfYvPQMuEfDpKCKFwNojQxBV8O0Arf5zmrIw_0_OEM:NONSLP_PPIPro
|
2a6137f3-75c0-4f26-8e3e-d83d802865a4_XKCNC-J26Q9-KFHD2-FKTHY-KD%f%72Y_119_X19-99606_0_OEM:NONSLP_PPIPro
|
||||||
e558417a-5123-4f6f-91e7-385c1c7ca9d4_YNMGQ-8RYV3-4PGQ3-C8XTP-7C%f%FBY_121_X19-98886_x9tPFDZmjZMf29zFeHV5SHbXj8Wd8YAcCn/0hbpLcId4D7OWqkQKXxXHIegRlwcWjtII0sZ6WYB0HQV2KH3LvYRnWKpJ5SxeOgdzBIJ6fhegYGGyiXsBv9sEb3/zidPU6ZK9LugVGAcRZ6HQOiXyOw+Yf5H35iM+2oDZXSpjvJw_0_____Retail_Education
|
e558417a-5123-4f6f-91e7-385c1c7ca9d4_YNMGQ-8RYV3-4PGQ3-C8XTP-7C%f%FBY_121_X19-98886_0_____Retail_Education
|
||||||
c5198a66-e435-4432-89cf-ec777c9d0352_84NGF-MHBT6-FXBX8-QWJK7-DR%f%R8H_122_X19-98892_jkL4YZkmBCJtvL1fT30ZPBcjmzshBSxjwrE0Q00AZ1hYnhrH+npzo1MPCT6ZRHw19ZLTz7wzyBb0qqcBVbtEjZW0Xs2MYLxgriyoONkhnPE6KSUJBw7C0enFVLHEqnVu/nkaOFfockN3bc+Eouw6W2lmHjklPHc9c6Clo04jul0_0_____Retail_EducationN
|
c5198a66-e435-4432-89cf-ec777c9d0352_84NGF-MHBT6-FXBX8-QWJK7-DR%f%R8H_122_X19-98892_0_____Retail_EducationN
|
||||||
f6e29426-a256-4316-88bf-cc5b0f95ec0c_PJB47-8PN2T-MCGDY-JTY3D-CB%f%CPV_125_X23-50331_OPGhsyx+Ctw7w/KLMRNrY+fNBmKPjUG0R9RqkWk4e8ez+ExSJxSLLex5WhO5QSNgXLmEra+cCsN6C638aLjIdH2/L7D+8z/C6EDgRvbHMmidHg1lX3/O8lv0JudHkGtHJYewjorn/xXGY++vOCTQdZNk6qzEgmYSvPehKfdg8js_1_Volume:MAK_EnterpriseS_Ge
|
f6e29426-a256-4316-88bf-cc5b0f95ec0c_PJB47-8PN2T-MCGDY-JTY3D-CB%f%CPV_125_X23-50331_1_Volume:MAK_EnterpriseS_Ge
|
||||||
cce9d2de-98ee-4ce2-8113-222620c64a27_KCNVH-YKWX8-GJJB9-H9FDT-6F%f%7W2_125_X22-66075_GCqWmJOsTVun9z4QkE9n2XqBvt3ZWSPl9QmIh9Q2mXMG/QVt2IE7S+ES/NWlyTSNjLVySr1D2sGjxgEzy9kLwn7VENQVJ736h1iOdMj/3rdqLMSpTa813+nPSQgKpqJ3uMuvIvRP0FdB7Y4qt8qf9kNKK25A1QknioD/6YubL/4_1_Volume:MAK_EnterpriseS_VB
|
cce9d2de-98ee-4ce2-8113-222620c64a27_KCNVH-YKWX8-GJJB9-H9FDT-6F%f%7W2_125_X22-66075_1_Volume:MAK_EnterpriseS_VB
|
||||||
d06934ee-5448-4fd1-964a-cd077618aa06_43TBQ-NH92J-XKTM7-KT3KK-P3%f%9PB_125_X21-83233_EpB6qOCo8pRgO5kL4vxEHck2J1vxyd9OqvxUenDnYO9AkcGWat/D74ZcFg5SFlIya1U8l5zv+tsvZ4wAvQ1IaFW1PwOKJLOaGgejqZ41TIMdFGGw+G+s1RHsEnrWr3UOakTodby1aIMUMoqf3NdaM5aWFo8fOmqWC5/LnCoighs_0_OEM:NONSLP_EnterpriseS_RS5
|
d06934ee-5448-4fd1-964a-cd077618aa06_43TBQ-NH92J-XKTM7-KT3KK-P3%f%9PB_125_X21-83233_0_OEM:NONSLP_EnterpriseS_RS5
|
||||||
706e0cfd-23f4-43bb-a9af-1a492b9f1302_NK96Y-D9CD8-W44CQ-R8YTK-DY%f%JWX_125_X21-05035_ntcKmazIvLpZOryft28gWBHu1nHSbR+Gp143f/BiVe+BD2UjHBZfSR1q405xmQZsygz6VRK6+zm8FPR++71pkmArgCLhodCQJ5I4m7rAJNw/YX99pILphi1yCRcvHsOTGa825GUVXgf530tHT6hr0HQ1lGeGgG1hPekpqqBbTlg_0_OEM:NONSLP_EnterpriseS_RS1
|
706e0cfd-23f4-43bb-a9af-1a492b9f1302_NK96Y-D9CD8-W44CQ-R8YTK-DY%f%JWX_125_X21-05035_0_OEM:NONSLP_EnterpriseS_RS1
|
||||||
faa57748-75c8-40a2-b851-71ce92aa8b45_FWN7H-PF93Q-4GGP8-M8RF3-MD%f%WWW_125_X19-99617_Fe9CDClilrAmwwT7Yhfx67GafWRQEpwyj8R+a4eaTqbpPcAt7d1hv1rx8Sa9AzopEGxIrb7IhiPoDZs0XaT1HN0/olJJ/MnD73CfBP4sdQdLTsSJE3dKMWYTQHpnjqRaS/pNBYRr8l9Mv8yfcP8uS2MjIQ1cRTqRmC7WMpShyCg_0_OEM:NONSLP_EnterpriseS_TH
|
faa57748-75c8-40a2-b851-71ce92aa8b45_FWN7H-PF93Q-4GGP8-M8RF3-MD%f%WWW_125_X19-99617_0_OEM:NONSLP_EnterpriseS_TH
|
||||||
3d1022d8-969f-4222-b54b-327f5a5af4c9_2DBW3-N2PJG-MVHW3-G7TDK-9H%f%KR4_126_X21-04921_zLPNvcl1iqOefy0VLg+WZgNtRNhuGpn8+BFKjMqjaNOSKiuDcR6GNDS5FF1Aqk6/e6shJ+ohKzuwrnmYq3iNQ3I2MBlYjM5kuNfKs8Vl9dCjSpQr//GBGps6HtF2xrG/2g/yhtYC7FbtGDIE16uOeNKFcVg+XMb0qHE/5Etyfd8_0_Volume:MAK_EnterpriseSN_RS1
|
3d1022d8-969f-4222-b54b-327f5a5af4c9_2DBW3-N2PJG-MVHW3-G7TDK-9H%f%KR4_126_X21-04921_0_Volume:MAK_EnterpriseSN_RS1
|
||||||
60c243e1-f90b-4a1b-ba89-387294948fb6_NTX6B-BRYC2-K6786-F6MVQ-M7%f%V2X_126_X19-98770_kbXfe0z9Vi1S0yfxMWzI5+UtWsJKzxs7wLGUDLjrckFDn1bDQb4MvvuCK1w+Qrq33lemiGpNDspa+ehXiYEeSPFcCvUBpoMlGBFfzurNCHWiv3o1k3jBoawJr/VoDoVZfxhkps0fVoubf9oy6C6AgrkZ7PjCaS58edMcaUWvYYg_0_Volume:MAK_EnterpriseSN_TH
|
60c243e1-f90b-4a1b-ba89-387294948fb6_NTX6B-BRYC2-K6786-F6MVQ-M7%f%V2X_126_X19-98770_0_Volume:MAK_EnterpriseSN_TH
|
||||||
01eb852c-424d-4060-94b8-c10d799d7364_3XP6D-CRND4-DRYM2-GM84D-4G%f%G8Y_139_X23-37869_PVW0XnRJnsWYjTqxb6StCi2tge/uUwegjdiFaFUiZpwdJ620RK+MIAsSq5S+egXXzIWNntoy2fB6BO8F1wBFmxP/mm/3rn5C33jtF5QrbNqY7X9HMbqSiC7zhs4v4u2Xa4oZQx8JQkwr8Q2c/NgHrOJKKRASsSckhunxZ+WVEuM_1_____Retail_ProfessionalCountrySpecific_Zn
|
01eb852c-424d-4060-94b8-c10d799d7364_3XP6D-CRND4-DRYM2-GM84D-4G%f%G8Y_139_X23-37869_1_____Retail_ProfessionalCountrySpecific_Zn
|
||||||
eb6d346f-1c60-4643-b960-40ec31596c45_DXG7C-N36C4-C4HTG-X4T3X-2Y%f%V77_161_X21-43626_MaVqTkRrGnOqYizl15whCOKWzx01+BZTVAalvEuHXM+WV55jnIfhWmd/u1GqCd5OplqXdU959zmipK2Iwgu2nw/g91nW//sQiN/cUcvg1Lxo6pC3gAo1AjTpHmGIIf9XlZMYlD+Vl6gXsi/Auwh3yrSSFh5s7gOczZoDTqQwHXA_0_____Retail_ProfessionalWorkstation
|
eb6d346f-1c60-4643-b960-40ec31596c45_DXG7C-N36C4-C4HTG-X4T3X-2Y%f%V77_161_X21-43626_0_____Retail_ProfessionalWorkstation
|
||||||
89e87510-ba92-45f6-8329-3afa905e3e83_WYPNQ-8C467-V2W6J-TX4WX-WT%f%2RQ_162_X21-43644_JVGQowLiCcPtGY9ndbBDV+rTu/q5ljmQTwQWZgBIQsrAeQjLD8jLEk/qse7riZ7tMT6PKFVNXeWqF7PhLAmACbE8O3Lvp65XMd/Oml9Daynj5/4n7unsffFHIHH8TGyO5j7xb4dkFNqC5TX3P8/1gQEkTIdZEOTQQXFu0L2SP5c_0_____Retail_ProfessionalWorkstationN
|
89e87510-ba92-45f6-8329-3afa905e3e83_WYPNQ-8C467-V2W6J-TX4WX-WT%f%2RQ_162_X21-43644_0_____Retail_ProfessionalWorkstationN
|
||||||
62f0c100-9c53-4e02-b886-a3528ddfe7f6_8PTT6-RNW4C-6V7J2-C2D3X-MH%f%BPB_164_X21-04955_CEDgxI8f/fxMBiwmeXw5Of55DG32sbGALzHihXkdbYTDaE3pY37oAA4zwGHALzAFN/t254QImGPYR6hATgl+Cp804f7serJqiLeXY965Zy67I4CKIMBm49lzHLFJeDnVTjDB0wVyN29pvgO3+HLhZ22KYCpkRHFFMy2OKxS68Yc_0_____Retail_ProfessionalEducation
|
62f0c100-9c53-4e02-b886-a3528ddfe7f6_8PTT6-RNW4C-6V7J2-C2D3X-MH%f%BPB_164_X21-04955_0_____Retail_ProfessionalEducation
|
||||||
13a38698-4a49-4b9e-8e83-98fe51110953_GJTYN-HDMQY-FRR76-HVGC7-QP%f%F8P_165_X21-04956_r35zp9OfxKSBcTxKWon3zFtbOiCufAPo6xRGY5DJqCRFKdB0jgZalNQitvjmaZ/Rlez2vjRJnEart4LrvyW4d9rrukAjR3+c3UkeTKwoD3qBl9AdRJbXCa2BdsoXJs1WVS4w4LuVzpB/SZDuggZt0F2DlMB427F5aflook/n1pY_0_____Retail_ProfessionalEducationN
|
13a38698-4a49-4b9e-8e83-98fe51110953_GJTYN-HDMQY-FRR76-HVGC7-QP%f%F8P_165_X21-04956_0_____Retail_ProfessionalEducationN
|
||||||
df96023b-dcd9-4be2-afa0-c6c871159ebe_NJCF7-PW8QT-3324D-688JX-2Y%f%V66_175_X21-41295_rVpetYUmiRB48YJfCvJHiaZapJ0bO8gQDRoql+rq5IobiSRu//efV1VXqVpBkwILQRKgKIVONSTUF5y2TSxlDLbDSPKp7UHfbz17g6vRKLwOameYEz0ZcK3NTbApN/cMljHvvF/mBag1+sHjWu+eoFzk8H89k9nw8LMeVOPJRDc_0_____Retail_ServerRdsh
|
df96023b-dcd9-4be2-afa0-c6c871159ebe_NJCF7-PW8QT-3324D-688JX-2Y%f%V66_175_X21-41295_0_____Retail_ServerRdsh
|
||||||
d4ef7282-3d2c-4cf0-9976-8854e64a8d1e_V3WVW-N2PV2-CGWC3-34QGF-VM%f%J2C_178_X21-32983_Xzme9hDZR6H0Yx0deURVdE6LiTOkVqWng5W/OTbkxRc0rq+mSYpo/f/yqhtwYlrkBPWx16Yok5Bvcb34vbKHvEAtxfYp4te20uexLzVOtBcoeEozARv4W/6MhYfl+llZtR5efsktj4N4/G4sVbuGvZ9nzNfQO9TwV6NGgGEj2Ec_0_____Retail_Cloud
|
d4ef7282-3d2c-4cf0-9976-8854e64a8d1e_V3WVW-N2PV2-CGWC3-34QGF-VM%f%J2C_178_X21-32983_0_____Retail_Cloud
|
||||||
af5c9381-9240-417d-8d35-eb40cd03e484_NH9J3-68WK7-6FB93-4K3DF-DJ%f%4F6_179_X21-32987_QGRDZOU/VZhYLOSdp2xDnFs8HInNZctcQlWCIrORVnxTQr55IJwN4vK3PJHjkfRLQ/bgUrcEIhyFbANqZFUq8yD1YNubb2bjNORgI/m8u85O9V7nDGtxzO/viEBSWyEHnrzLKKWYqkRQKbbSW3ungaZR0Ti5O2mAUI4HzAFej50_0_____Retail_CloudN
|
af5c9381-9240-417d-8d35-eb40cd03e484_NH9J3-68WK7-6FB93-4K3DF-DJ%f%4F6_179_X21-32987_0_____Retail_CloudN
|
||||||
8ab9bdd1-1f67-4997-82d9-8878520837d9_XQQYW-NFFMW-XJPBH-K8732-CK%f%FFD_188_X21-99378_djy0od0uuKd2rrIl+V1/2+MeRltNgW7FEeTNQsPMkVSL75NBphgoso4uS0JPv2D7Y1iEEvmVq6G842Kyt52QOwXgFWmP/IQ6Sq1dr+fHK/4Et7bEPrrGBEZoCfWqk0kdcZRPBij2KN6qCRWhrk1hX2g+U40smx/EYCLGh9HCi24_0_____OEM:DM_IoTEnterprise
|
8ab9bdd1-1f67-4997-82d9-8878520837d9_XQQYW-NFFMW-XJPBH-K8732-CK%f%FFD_188_X21-99378_0_____OEM:DM_IoTEnterprise
|
||||||
ed655016-a9e8-4434-95d9-4345352c2552_QPM6N-7J2WJ-P88HH-P3YRH-YY%f%74H_191_X21-99682_qHs/PzfhYWdtSys2edzcz4h+Qs8aDqb8BIiQ/mJ/+0uyoJh1fitbRCIgiFh2WAGZXjdgB8hZeheNwHibd8ChXaXg4u+0XlOdFlaDTgTXblji8fjETzDBk9aGkeMCvyVXRuUYhTSdp83IqGHz7XuLwN2p/6AUArx9JZCoLGV8j3w_0_OEM:NONSLP_IoTEnterpriseS_VB
|
ed655016-a9e8-4434-95d9-4345352c2552_QPM6N-7J2WJ-P88HH-P3YRH-YY%f%74H_191_X21-99682_0_OEM:NONSLP_IoTEnterpriseS_VB
|
||||||
6c4de1b8-24bb-4c17-9a77-7b939414c298_CGK42-GYN6Y-VD22B-BX98W-J8%f%JXD_191_X23-12617_J/fpIRynsVQXbp4qZNKp6RvOgZ/P2klILUKQguMlcwrBZybwNkHg/kM5LNOF/aDzEktbPnLnX40GEvKkYT6/qP4cMhn/SOY0/hYOkIdR34ilzNlVNq5xP7CMjCjaUYJe+6ydHPK6FpOuEoWOYYP5BZENKNGyBy4w4shkMAw19mA_0_OEM:NONSLP_IoTEnterpriseS_Ge
|
6c4de1b8-24bb-4c17-9a77-7b939414c298_CGK42-GYN6Y-VD22B-BX98W-J8%f%JXD_191_X23-12617_0_OEM:NONSLP_IoTEnterpriseS_Ge
|
||||||
d4bdc678-0a4b-4a32-a5b3-aaa24c3b0f24_K9VKN-3BGWV-Y624W-MCRMQ-BH%f%DCD_202_X22-53884_kyoNx2s93U6OUSklB1xn+GXcwCJO1QTEtACYnChi8aXSoxGQ6H2xHfUdHVCwUA1OR0UeNcRrMmOzZBOEUBtdoGWSYPg9AMjvxlxq9JOzYAH+G6lT0UbCWgMSGGrqdcIfmshyEak3aUmsZK6l+uIAFCCZZ/HbbCRkkHC5rWKstMI_0_____Retail_CloudEditionN
|
d4bdc678-0a4b-4a32-a5b3-aaa24c3b0f24_K9VKN-3BGWV-Y624W-MCRMQ-BH%f%DCD_202_X22-53884_0_____Retail_CloudEditionN
|
||||||
92fb8726-92a8-4ffc-94ce-f82e07444653_KY7PN-VR6RX-83W6Y-6DDYQ-T6%f%R4W_203_X22-53847_gD6HnT4jP4rcNu9u83gvDiQq1xs7QSujcDbo60Di5iSVa9/ihZ7nlhnA0eDEZfnoDXriRiPPqc09T6AhSnFxLYitAkOuPJqL5UMobIrab9dwTKlowqFolxoHhLOO4V92Hsvn/9JLy7rEzoiAWHhX/0cpMr3FCzVYPeUW1OyLT1A_0_____Retail_CloudEdition
|
92fb8726-92a8-4ffc-94ce-f82e07444653_KY7PN-VR6RX-83W6Y-6DDYQ-T6%f%R4W_203_X22-53847_0_____Retail_CloudEdition
|
||||||
5a85300a-bfce-474f-ac07-a30983e3fb90_N979K-XWD77-YW3GB-HBGH6-D3%f%2MH_205_X23-15042_blZopkUuayCTgZKH4bOFiisH9GTAHG5/js6UX/qcMWWc3sWNxKSX1OLp1k3h8Xx1cFuvfG/fNAw/I83ssEtPY+A0Gx1JF4QpRqsGOqJ5ruQ2tGW56CJcCVHkB+i46nJAD759gYmy3pEYMQbmpWbhLx3MJ6kvwxKfU+0VCio8k50_0_____OEM:DM_IoTEnterpriseSK
|
5a85300a-bfce-474f-ac07-a30983e3fb90_N979K-XWD77-YW3GB-HBGH6-D3%f%2MH_205_X23-15042_0_____OEM:DM_IoTEnterpriseSK
|
||||||
80083eae-7031-4394-9e88-4901973d56fe_P8Q7T-WNK7X-PMFXY-VXHBG-RR%f%K69_206_X23-62084_habUJ0hhAG0P8iIKaRQ74/wZQHyAdFlwHmrejNjOSRG08JeqilJlTM6V8G9UERLJ92/uMDVHIVOPXfN8Zdh8JuYO8oflPnqymIRmff/pU+Gpb871jV2JDA4Cft5gmn+ictKoN4VoSfEZRR+R5hzF2FsoCExDNNw6gLdjtiX94uA_0_____OEM:DM_IoTEnterpriseK
|
80083eae-7031-4394-9e88-4901973d56fe_P8Q7T-WNK7X-PMFXY-VXHBG-RR%f%K69_206_X23-62084_0_____OEM:DM_IoTEnterpriseK
|
||||||
) do (
|
) do (
|
||||||
for /f "tokens=1-9 delims=_" %%A in ("%%#") do (
|
for /f "tokens=1-9 delims=_" %%A in ("%%#") do (
|
||||||
|
|
||||||
@@ -2028,7 +2039,7 @@ REM Detect key
|
|||||||
|
|
||||||
if %1==key if %osSKU%==%%C if not defined key (
|
if %1==key if %osSKU%==%%C if not defined key (
|
||||||
echo "!allapps! !altapplist!" | find /i "%%A" %nul1% && (
|
echo "!allapps! !altapplist!" | find /i "%%A" %nul1% && (
|
||||||
if %%F==1 set notworking=1
|
if %%E==1 set notworking=1
|
||||||
set key=%%B
|
set key=%%B
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@@ -2036,11 +2047,8 @@ set key=%%B
|
|||||||
REM Generate ticket
|
REM Generate ticket
|
||||||
|
|
||||||
if %1==ticket if "%key%"=="%%B" (
|
if %1==ticket if "%key%"=="%%B" (
|
||||||
set "string=OSMajorVersion=5;OSMinorVersion=1;OSPlatformId=2;PP=0;Pfn=Microsoft.Windows.%%C.%%D_8wekyb3d8bbwe;PKeyIID=465145217131314304264339481117862266242033457260311819664735280;$([char]0)"
|
set "SessionIdStr=OSMajorVersion=5;OSMinorVersion=1;OSPlatformId=2;PP=0;Pfn=Microsoft.Windows.%%C.%%D_8wekyb3d8bbwe;PKeyIID=465145217131314304264339481117862266242033457260311819664735280;"
|
||||||
for /f "tokens=* delims=" %%i in ('%psc% [conv%f%ert]::ToBas%f%e64String([Text.En%f%coding]::Uni%f%code.GetBytes("""!string!"""^)^)') do set "encoded=%%i"
|
%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':sign\:.*';. ([scriptblock]::Create($f[1]))"
|
||||||
echo "!encoded!" | find "AAAA" %nul1% || exit /b
|
|
||||||
|
|
||||||
<nul set /p "=<?xml version="1.0" encoding="utf-8"?><genuineAuthorization xmlns="http://www.microsoft.com/DRM/SL/GenuineAuthorization/1.0"><version>1.0</version><genuineProperties origin="sppclient"><properties>OA3xOriginalProductId=;OA3xOriginalProductKey=;SessionId=!encoded!;TimeStampClient=2022-10-11T12:00:00Z</properties><signatures><signature name="clientLockboxKey" method="rsa-sha256">%%E=</signature></signatures></genuineProperties></genuineAuthorization>" >"%tdir%\GenuineTicket"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
)
|
)
|
||||||
@@ -2049,6 +2057,77 @@ exit /b
|
|||||||
|
|
||||||
::========================================================================================================================================
|
::========================================================================================================================================
|
||||||
|
|
||||||
|
:sign:
|
||||||
|
$ErrorActionPreference = "Stop"
|
||||||
|
|
||||||
|
function SignProperties {
|
||||||
|
param (
|
||||||
|
$Properties,
|
||||||
|
$rsa
|
||||||
|
)
|
||||||
|
|
||||||
|
$sha256 = [Security.Cryptography.SHA256]::Create()
|
||||||
|
$bytes = [Text.Encoding]::UTF8.GetBytes($Properties)
|
||||||
|
$hash = $sha256.ComputeHash($bytes)
|
||||||
|
|
||||||
|
$signature = $rsa.SignHash($hash, [Security.Cryptography.HashAlgorithmName]::SHA256, [Security.Cryptography.RSASignaturePadding]::Pkcs1)
|
||||||
|
return [Convert]::ToBase64String($signature)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
[byte[]] $key = 0x07,0x02,0x00,0x00,0x00,0xA4,0x00,0x00,0x52,0x53,0x41,0x32,0x00,0x04,0x00,0x00,
|
||||||
|
0x01,0x00,0x01,0x00,0x29,0x87,0xBA,0x3F,0x52,0x90,0x57,0xD8,0x12,0x26,0x6B,0x38,
|
||||||
|
0xB2,0x3B,0xF9,0x67,0x08,0x4F,0xDD,0x8B,0xF5,0xE3,0x11,0xB8,0x61,0x3A,0x33,0x42,
|
||||||
|
0x51,0x65,0x05,0x86,0x1E,0x00,0x41,0xDE,0xC5,0xDD,0x44,0x60,0x56,0x3D,0x14,0x39,
|
||||||
|
0xB7,0x43,0x65,0xE9,0xF7,0x2B,0xA5,0xF0,0xA3,0x65,0x68,0xE9,0xE4,0x8B,0x5C,0x03,
|
||||||
|
0x2D,0x36,0xFE,0x28,0x4C,0xD1,0x3C,0x3D,0xC1,0x90,0x75,0xF9,0x6E,0x02,0xE0,0x58,
|
||||||
|
0x97,0x6A,0xCA,0x80,0x02,0x42,0x3F,0x6C,0x15,0x85,0x4D,0x83,0x23,0x6A,0x95,0x9E,
|
||||||
|
0x38,0x52,0x59,0x38,0x6A,0x99,0xF0,0xB5,0xCD,0x53,0x7E,0x08,0x7C,0xB5,0x51,0xD3,
|
||||||
|
0x8F,0xA3,0x0D,0xA0,0xFA,0x8D,0x87,0x3C,0xFC,0x59,0x21,0xD8,0x2E,0xD9,0x97,0x8B,
|
||||||
|
0x40,0x60,0xB1,0xD7,0x2B,0x0A,0x6E,0x60,0xB5,0x50,0xCC,0x3C,0xB1,0x57,0xE4,0xB7,
|
||||||
|
0xDC,0x5A,0x4D,0xE1,0x5C,0xE0,0x94,0x4C,0x5E,0x28,0xFF,0xFA,0x80,0x6A,0x13,0x53,
|
||||||
|
0x52,0xDB,0xF3,0x04,0x92,0x43,0x38,0xB9,0x1B,0xD9,0x85,0x54,0x7B,0x14,0xC7,0x89,
|
||||||
|
0x16,0x8A,0x4B,0x82,0xA1,0x08,0x02,0x99,0x23,0x48,0xDD,0x75,0x9C,0xC8,0xC1,0xCE,
|
||||||
|
0xB0,0xD7,0x1B,0xD8,0xFB,0x2D,0xA7,0x2E,0x47,0xA7,0x18,0x4B,0xF6,0x29,0x69,0x44,
|
||||||
|
0x30,0x33,0xBA,0xA7,0x1F,0xCE,0x96,0x9E,0x40,0xE1,0x43,0xF0,0xE0,0x0D,0x0A,0x32,
|
||||||
|
0xB4,0xEE,0xA1,0xC3,0x5E,0x9B,0xC7,0x7F,0xF5,0x9D,0xD8,0xF2,0x0F,0xD9,0x8F,0xAD,
|
||||||
|
0x75,0x0A,0x00,0xD5,0x25,0x43,0xF7,0xAE,0x51,0x7F,0xB7,0xDE,0xB7,0xAD,0xFB,0xCE,
|
||||||
|
0x83,0xE1,0x81,0xFF,0xDD,0xA2,0x77,0xFE,0xEB,0x27,0x1F,0x10,0xFA,0x82,0x37,0xF4,
|
||||||
|
0x7E,0xCC,0xE2,0xA1,0x58,0xC8,0xAF,0x1D,0x1A,0x81,0x31,0x6E,0xF4,0x8B,0x63,0x34,
|
||||||
|
0xF3,0x05,0x0F,0xE1,0xCC,0x15,0xDC,0xA4,0x28,0x7A,0x9E,0xEB,0x62,0xD8,0xD8,0x8C,
|
||||||
|
0x85,0xD7,0x07,0x87,0x90,0x2F,0xF7,0x1C,0x56,0x85,0x2F,0xEF,0x32,0x37,0x07,0xAB,
|
||||||
|
0xB0,0xE6,0xB5,0x02,0x19,0x35,0xAF,0xDB,0xD4,0xA2,0x9C,0x36,0x80,0xC6,0xDC,0x82,
|
||||||
|
0x08,0xE0,0xC0,0x5F,0x3C,0x59,0xAA,0x4E,0x26,0x03,0x29,0xB3,0x62,0x58,0x41,0x59,
|
||||||
|
0x3A,0x37,0x43,0x35,0xE3,0x9F,0x34,0xE2,0xA1,0x04,0x97,0x12,0x9D,0x8C,0xAD,0xF7,
|
||||||
|
0xFB,0x8C,0xA1,0xA2,0xE9,0xE4,0xEF,0xD9,0xC5,0xE5,0xDF,0x0E,0xBF,0x4A,0xE0,0x7A,
|
||||||
|
0x1E,0x10,0x50,0x58,0x63,0x51,0xE1,0xD4,0xFE,0x57,0xB0,0x9E,0xD7,0xDA,0x8C,0xED,
|
||||||
|
0x7D,0x82,0xAC,0x2F,0x25,0x58,0x0A,0x58,0xE6,0xA4,0xF4,0x57,0x4B,0xA4,0x1B,0x65,
|
||||||
|
0xB9,0x4A,0x87,0x46,0xEB,0x8C,0x0F,0x9A,0x48,0x90,0xF9,0x9F,0x76,0x69,0x03,0x72,
|
||||||
|
0x77,0xEC,0xC1,0x42,0x4C,0x87,0xDB,0x0B,0x3C,0xD4,0x74,0xEF,0xE5,0x34,0xE0,0x32,
|
||||||
|
0x45,0xB0,0xF8,0xAB,0xD5,0x26,0x21,0xD7,0xD2,0x98,0x54,0x8F,0x64,0x88,0x20,0x2B,
|
||||||
|
0x14,0xE3,0x82,0xD5,0x2A,0x4B,0x8F,0x4E,0x35,0x20,0x82,0x7E,0x1B,0xFE,0xFA,0x2C,
|
||||||
|
0x79,0x6C,0x6E,0x66,0x94,0xBB,0x0A,0xEB,0xBA,0xD9,0x70,0x61,0xE9,0x47,0xB5,0x82,
|
||||||
|
0xFC,0x18,0x3C,0x66,0x3A,0x09,0x2E,0x1F,0x61,0x74,0xCA,0xCB,0xF6,0x7A,0x52,0x37,
|
||||||
|
0x1D,0xAC,0x8D,0x63,0x69,0x84,0x8E,0xC7,0x70,0x59,0xDD,0x2D,0x91,0x1E,0xF7,0xB1,
|
||||||
|
0x56,0xED,0x7A,0x06,0x9D,0x5B,0x33,0x15,0xDD,0x31,0xD0,0xE6,0x16,0x07,0x9B,0xA5,
|
||||||
|
0x94,0x06,0x7D,0xC1,0xE9,0xD6,0xC8,0xAF,0xB4,0x1E,0x2D,0x88,0x06,0xA7,0x63,0xB8,
|
||||||
|
0xCF,0xC8,0xA2,0x6E,0x84,0xB3,0x8D,0xE5,0x47,0xE6,0x13,0x63,0x8E,0xD1,0x7F,0xD4,
|
||||||
|
0x81,0x44,0x38,0xBF
|
||||||
|
|
||||||
|
$rsa = New-Object Security.Cryptography.RSACryptoServiceProvider
|
||||||
|
$rsa.ImportCspBlob($key)
|
||||||
|
$SessionId = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($env:SessionIdStr + [char]0))
|
||||||
|
$PropertiesStr = "OA3xOriginalProductId=;OA3xOriginalProductKey=;SessionId=$SessionId;TimeStampClient=2022-10-11T12:00:00Z"
|
||||||
|
$SignatureStr = SignProperties $PropertiesStr $rsa
|
||||||
|
|
||||||
|
$xml = @"
|
||||||
|
<?xml version="1.0" encoding="utf-8"?><genuineAuthorization xmlns="http://www.microsoft.com/DRM/SL/GenuineAuthorization/1.0"><version>1.0</version><genuineProperties origin="sppclient"><properties>$PropertiesStr</properties><signatures><signature name="clientLockboxKey" method="rsa-sha256">$SignatureStr</signature></signatures></genuineProperties></genuineAuthorization>
|
||||||
|
"@
|
||||||
|
[System.IO.File]::WriteAllText("$env:ProgramData\Microsoft\Windows\ClipSVC\GenuineTicket\GenuineTicket", ($xml -join ""), [System.Text.Encoding]::ASCII)
|
||||||
|
:sign:
|
||||||
|
|
||||||
|
::========================================================================================================================================
|
||||||
|
|
||||||
:: Below code is used to get alternate edition name and key if current edition doesn't support HWID activation
|
:: Below code is used to get alternate edition name and key if current edition doesn't support HWID activation
|
||||||
|
|
||||||
:: 1st column = Current SKU ID
|
:: 1st column = Current SKU ID
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
@set masver=3.4
|
@set masver=3.7
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
::============================================================================
|
::============================================================================
|
||||||
::
|
::
|
||||||
:: Homepage: mass<>grave<.>dev
|
:: Homepage: mass()grave(dot)dev
|
||||||
:: Email: mas.help@outlook.com
|
:: Email: mas.help@outlook.com
|
||||||
::
|
::
|
||||||
::============================================================================
|
::============================================================================
|
||||||
@@ -50,6 +50,7 @@ set "_cmdf=%~f0"
|
|||||||
for %%# in (%*) do (
|
for %%# in (%*) do (
|
||||||
if /i "%%#"=="re1" set re1=1
|
if /i "%%#"=="re1" set re1=1
|
||||||
if /i "%%#"=="re2" set re2=1
|
if /i "%%#"=="re2" set re2=1
|
||||||
|
if /i "%%#"=="-qedit" (set re1=1&set re2=1)
|
||||||
)
|
)
|
||||||
|
|
||||||
:: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows
|
:: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows
|
||||||
@@ -732,13 +733,10 @@ if exist "%tdir%\Genuine*" del /f /q "%tdir%\Genuine*" %nul%
|
|||||||
if exist "%tdir%\*.xml" del /f /q "%tdir%\*.xml" %nul%
|
if exist "%tdir%\*.xml" del /f /q "%tdir%\*.xml" %nul%
|
||||||
if exist "%ProgramData%\Microsoft\Windows\ClipSVC\Install\Migration\*" del /f /q "%ProgramData%\Microsoft\Windows\ClipSVC\Install\Migration\*" %nul%
|
if exist "%ProgramData%\Microsoft\Windows\ClipSVC\Install\Migration\*" del /f /q "%ProgramData%\Microsoft\Windows\ClipSVC\Install\Migration\*" %nul%
|
||||||
|
|
||||||
:: Signature value is as it is, it's not encoded
|
:: Generate ticket
|
||||||
:: Session ID is in Base64 encoded format. It's decoded value is "OSMajorVersion=5;OSMinorVersion=1;OSPlatformId=2;PP=0;GVLKExp=2038-01-19T03:14:07Z;DownlevelGenuineState=1;"
|
|
||||||
:: Check mass grave [.] dev/kms38#manual-activation to see how it's generated
|
|
||||||
|
|
||||||
set "signature=C52iGEoH+1VqzI6kEAqOhUyrWuEObnivzaVjyef8WqItVYd/xGDTZZ3bkxAI9hTpobPFNJyJx6a3uriXq3HVd7mlXfSUK9ydeoUdG4eqMeLwkxeb6jQWJzLOz41rFVSMtBL0e+ycCATebTaXS4uvFYaDHDdPw2lKY8ADj3MLgsA="
|
set "SessionIdStr=OSMajorVersion=5;OSMinorVersion=1;OSPlatformId=2;PP=0;GVLKExp=2038-01-19T03:14:07Z;DownlevelGenuineState=1;"
|
||||||
set "sessionId=TwBTAE0AYQBqAG8AcgBWAGUAcgBzAGkAbwBuAD0ANQA7AE8AUwBNAGkAbgBvAHIAVgBlAHIAcwBpAG8AbgA9ADEAOwBPAFMAUABsAGEAdABmAG8AcgBtAEkAZAA9ADIAOwBQAFAAPQAwADsARwBWAEwASwBFAHgAcAA9ADIAMAAzADgALQAwADEALQAxADkAVAAwADMAOgAxADQAOgAwADcAWgA7AEQAbwB3AG4AbABlAHYAZQBsAEcAZQBuAHUAaQBuAGUAUwB0AGEAdABlAD0AMQA7AAAA"
|
%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':sign\:.*';. ([scriptblock]::Create($f[1]))"
|
||||||
<nul set /p "=<?xml version="1.0" encoding="utf-8"?><genuineAuthorization xmlns="http://www.microsoft.com/DRM/SL/GenuineAuthorization/1.0"><version>1.0</version><genuineProperties origin="sppclient"><properties>OA3xOriginalProductId=;OA3xOriginalProductKey=;SessionId=%sessionId%;TimeStampClient=2022-10-11T12:00:00Z</properties><signatures><signature name="clientLockboxKey" method="rsa-sha256">%signature%</signature></signatures></genuineProperties></genuineAuthorization>" >"%tdir%\GenuineTicket"
|
|
||||||
|
|
||||||
copy /y /b "%tdir%\GenuineTicket" "%tdir%\GenuineTicket.xml" %nul%
|
copy /y /b "%tdir%\GenuineTicket" "%tdir%\GenuineTicket.xml" %nul%
|
||||||
|
|
||||||
@@ -920,7 +918,7 @@ goto :dk_done
|
|||||||
set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe
|
set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe
|
||||||
set psc=%ps% -nop -c
|
set psc=%ps% -nop -c
|
||||||
set winbuild=1
|
set winbuild=1
|
||||||
for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G
|
for /f "tokens=2 delims=[]" %%G in ('ver') do for /f "tokens=2,3,4 delims=. " %%H in ("%%~G") do set "winbuild=%%J"
|
||||||
|
|
||||||
set _slexe=sppsvc.exe& set _slser=sppsvc
|
set _slexe=sppsvc.exe& set _slser=sppsvc
|
||||||
if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc)
|
if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc)
|
||||||
@@ -1427,7 +1425,7 @@ sc start %%# %nul%
|
|||||||
if !errorlevel! EQU 1060 set _corrupt=1
|
if !errorlevel! EQU 1060 set _corrupt=1
|
||||||
sc query %%# %nul% || set _corrupt=1
|
sc query %%# %nul% || set _corrupt=1
|
||||||
for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _regcorr (
|
for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _regcorr (
|
||||||
reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr="-RegistryError" )
|
reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr=-RegistryError)
|
||||||
)
|
)
|
||||||
|
|
||||||
if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#!_regcorr!") else (set "serv_cor=%%#!_regcorr!"))
|
if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#!_regcorr!") else (set "serv_cor=%%#!_regcorr!"))
|
||||||
@@ -1753,7 +1751,7 @@ cmd /c exit /b %error_code%
|
|||||||
if %error_code% NEQ 0 set "error_code=0x%=ExitCode%"
|
if %error_code% NEQ 0 set "error_code=0x%=ExitCode%"
|
||||||
|
|
||||||
if %error_code% NEQ 0 (
|
if %error_code% NEQ 0 (
|
||||||
call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] %error_code%"
|
call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] [%error_code%]"
|
||||||
if not defined showfix (
|
if not defined showfix (
|
||||||
echo:
|
echo:
|
||||||
call :dk_color %Blue% "%_fixmsg%"
|
call :dk_color %Blue% "%_fixmsg%"
|
||||||
@@ -1772,6 +1770,7 @@ call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
|||||||
|
|
||||||
if not defined apps (
|
if not defined apps (
|
||||||
%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul%
|
%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul%
|
||||||
|
if not defined _vis if !errorlevel! NEQ 0 set rlicfailed=1
|
||||||
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -1793,6 +1792,13 @@ set error=1
|
|||||||
set showfix=1
|
set showfix=1
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if not defined showfix if defined rlicfailed (
|
||||||
|
echo:
|
||||||
|
call :dk_color %Blue% "%_fixmsg%"
|
||||||
|
call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option."
|
||||||
|
echo:
|
||||||
|
)
|
||||||
|
|
||||||
if %winbuild% GEQ 7600 if exist "%tokenstore%\" if not exist "%tokenstore%\tokens.dat" (
|
if %winbuild% GEQ 7600 if exist "%tokenstore%\" if not exist "%tokenstore%\tokens.dat" (
|
||||||
call :dk_color %Red% "Checking SPP tokens.dat [Not Found] [%tokenstore%\]"
|
call :dk_color %Red% "Checking SPP tokens.dat [Not Found] [%tokenstore%\]"
|
||||||
)
|
)
|
||||||
@@ -1931,19 +1937,22 @@ call :dk_color %Gray% "Checking SkipRearm [Default 0 Value
|
|||||||
|
|
||||||
if %winbuild% GEQ 9200 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" (
|
if %winbuild% GEQ 9200 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" (
|
||||||
%psc% "Get-WmiObject -Query 'SELECT Description FROM SoftwareLicensingProduct WHERE PartialProductKey IS NOT NULL AND LicenseDependsOn IS NULL' | Select-Object -Property Description" %nul2% | findstr /i "KMS_" %nul1% || (
|
%psc% "Get-WmiObject -Query 'SELECT Description FROM SoftwareLicensingProduct WHERE PartialProductKey IS NOT NULL AND LicenseDependsOn IS NULL' | Select-Object -Property Description" %nul2% | findstr /i "KMS_" %nul1% || (
|
||||||
for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' -TaskPath '\Microsoft\Windows\SoftwareProtectionPlatform\').State" %nul6%') do (set taskinfo=%%a)
|
for /f "delims=" %%a in ('%psc% "$s=New-Object -ComObject 'Schedule.Service'; $s.Connect(); $state=$s.GetFolder('\Microsoft\Windows\SoftwareProtectionPlatform').GetTask('SvcRestartTask').State; @{0='Unknown';1='Disabled';2='Queued';3='Ready';4='Running'}[$state]" %nul6%') do (set taskinfo=%%a)
|
||||||
|
|
||||||
echo !taskinfo! | find /i "Ready" %nul% || (
|
echo !taskinfo! | find /i "Ready" %nul% || (
|
||||||
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul%
|
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul%
|
||||||
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed
|
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed
|
||||||
if "!taskinfo!"=="" set "taskinfo=Not Found"
|
if "!taskinfo!"=="" set "taskinfo=Not Found"
|
||||||
|
|
||||||
call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, system might deactivate later]"
|
call :dk_color %Gray% "Checking SvcRestartTask Status [!taskinfo!. System might deactivate later.]"
|
||||||
if not defined showfix (
|
if not defined showfix (
|
||||||
echo:
|
echo:
|
||||||
|
echo "!taskinfo!" | findstr /i "Removed Not Found" %nul1% && (
|
||||||
|
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||||
|
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||||
|
) || (
|
||||||
call :dk_color %Blue% "Reboot your machine using the restart option and run the script again."
|
call :dk_color %Blue% "Reboot your machine using the restart option and run the script again."
|
||||||
set fixes=%fixes% %mas%troubleshoot
|
)
|
||||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
|
||||||
echo:
|
echo:
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@@ -2132,6 +2141,77 @@ exit /b
|
|||||||
|
|
||||||
::========================================================================================================================================
|
::========================================================================================================================================
|
||||||
|
|
||||||
|
:sign:
|
||||||
|
$ErrorActionPreference = "Stop"
|
||||||
|
|
||||||
|
function SignProperties {
|
||||||
|
param (
|
||||||
|
$Properties,
|
||||||
|
$rsa
|
||||||
|
)
|
||||||
|
|
||||||
|
$sha256 = [Security.Cryptography.SHA256]::Create()
|
||||||
|
$bytes = [Text.Encoding]::UTF8.GetBytes($Properties)
|
||||||
|
$hash = $sha256.ComputeHash($bytes)
|
||||||
|
|
||||||
|
$signature = $rsa.SignHash($hash, [Security.Cryptography.HashAlgorithmName]::SHA256, [Security.Cryptography.RSASignaturePadding]::Pkcs1)
|
||||||
|
return [Convert]::ToBase64String($signature)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
[byte[]] $key = 0x07,0x02,0x00,0x00,0x00,0xA4,0x00,0x00,0x52,0x53,0x41,0x32,0x00,0x04,0x00,0x00,
|
||||||
|
0x01,0x00,0x01,0x00,0x29,0x87,0xBA,0x3F,0x52,0x90,0x57,0xD8,0x12,0x26,0x6B,0x38,
|
||||||
|
0xB2,0x3B,0xF9,0x67,0x08,0x4F,0xDD,0x8B,0xF5,0xE3,0x11,0xB8,0x61,0x3A,0x33,0x42,
|
||||||
|
0x51,0x65,0x05,0x86,0x1E,0x00,0x41,0xDE,0xC5,0xDD,0x44,0x60,0x56,0x3D,0x14,0x39,
|
||||||
|
0xB7,0x43,0x65,0xE9,0xF7,0x2B,0xA5,0xF0,0xA3,0x65,0x68,0xE9,0xE4,0x8B,0x5C,0x03,
|
||||||
|
0x2D,0x36,0xFE,0x28,0x4C,0xD1,0x3C,0x3D,0xC1,0x90,0x75,0xF9,0x6E,0x02,0xE0,0x58,
|
||||||
|
0x97,0x6A,0xCA,0x80,0x02,0x42,0x3F,0x6C,0x15,0x85,0x4D,0x83,0x23,0x6A,0x95,0x9E,
|
||||||
|
0x38,0x52,0x59,0x38,0x6A,0x99,0xF0,0xB5,0xCD,0x53,0x7E,0x08,0x7C,0xB5,0x51,0xD3,
|
||||||
|
0x8F,0xA3,0x0D,0xA0,0xFA,0x8D,0x87,0x3C,0xFC,0x59,0x21,0xD8,0x2E,0xD9,0x97,0x8B,
|
||||||
|
0x40,0x60,0xB1,0xD7,0x2B,0x0A,0x6E,0x60,0xB5,0x50,0xCC,0x3C,0xB1,0x57,0xE4,0xB7,
|
||||||
|
0xDC,0x5A,0x4D,0xE1,0x5C,0xE0,0x94,0x4C,0x5E,0x28,0xFF,0xFA,0x80,0x6A,0x13,0x53,
|
||||||
|
0x52,0xDB,0xF3,0x04,0x92,0x43,0x38,0xB9,0x1B,0xD9,0x85,0x54,0x7B,0x14,0xC7,0x89,
|
||||||
|
0x16,0x8A,0x4B,0x82,0xA1,0x08,0x02,0x99,0x23,0x48,0xDD,0x75,0x9C,0xC8,0xC1,0xCE,
|
||||||
|
0xB0,0xD7,0x1B,0xD8,0xFB,0x2D,0xA7,0x2E,0x47,0xA7,0x18,0x4B,0xF6,0x29,0x69,0x44,
|
||||||
|
0x30,0x33,0xBA,0xA7,0x1F,0xCE,0x96,0x9E,0x40,0xE1,0x43,0xF0,0xE0,0x0D,0x0A,0x32,
|
||||||
|
0xB4,0xEE,0xA1,0xC3,0x5E,0x9B,0xC7,0x7F,0xF5,0x9D,0xD8,0xF2,0x0F,0xD9,0x8F,0xAD,
|
||||||
|
0x75,0x0A,0x00,0xD5,0x25,0x43,0xF7,0xAE,0x51,0x7F,0xB7,0xDE,0xB7,0xAD,0xFB,0xCE,
|
||||||
|
0x83,0xE1,0x81,0xFF,0xDD,0xA2,0x77,0xFE,0xEB,0x27,0x1F,0x10,0xFA,0x82,0x37,0xF4,
|
||||||
|
0x7E,0xCC,0xE2,0xA1,0x58,0xC8,0xAF,0x1D,0x1A,0x81,0x31,0x6E,0xF4,0x8B,0x63,0x34,
|
||||||
|
0xF3,0x05,0x0F,0xE1,0xCC,0x15,0xDC,0xA4,0x28,0x7A,0x9E,0xEB,0x62,0xD8,0xD8,0x8C,
|
||||||
|
0x85,0xD7,0x07,0x87,0x90,0x2F,0xF7,0x1C,0x56,0x85,0x2F,0xEF,0x32,0x37,0x07,0xAB,
|
||||||
|
0xB0,0xE6,0xB5,0x02,0x19,0x35,0xAF,0xDB,0xD4,0xA2,0x9C,0x36,0x80,0xC6,0xDC,0x82,
|
||||||
|
0x08,0xE0,0xC0,0x5F,0x3C,0x59,0xAA,0x4E,0x26,0x03,0x29,0xB3,0x62,0x58,0x41,0x59,
|
||||||
|
0x3A,0x37,0x43,0x35,0xE3,0x9F,0x34,0xE2,0xA1,0x04,0x97,0x12,0x9D,0x8C,0xAD,0xF7,
|
||||||
|
0xFB,0x8C,0xA1,0xA2,0xE9,0xE4,0xEF,0xD9,0xC5,0xE5,0xDF,0x0E,0xBF,0x4A,0xE0,0x7A,
|
||||||
|
0x1E,0x10,0x50,0x58,0x63,0x51,0xE1,0xD4,0xFE,0x57,0xB0,0x9E,0xD7,0xDA,0x8C,0xED,
|
||||||
|
0x7D,0x82,0xAC,0x2F,0x25,0x58,0x0A,0x58,0xE6,0xA4,0xF4,0x57,0x4B,0xA4,0x1B,0x65,
|
||||||
|
0xB9,0x4A,0x87,0x46,0xEB,0x8C,0x0F,0x9A,0x48,0x90,0xF9,0x9F,0x76,0x69,0x03,0x72,
|
||||||
|
0x77,0xEC,0xC1,0x42,0x4C,0x87,0xDB,0x0B,0x3C,0xD4,0x74,0xEF,0xE5,0x34,0xE0,0x32,
|
||||||
|
0x45,0xB0,0xF8,0xAB,0xD5,0x26,0x21,0xD7,0xD2,0x98,0x54,0x8F,0x64,0x88,0x20,0x2B,
|
||||||
|
0x14,0xE3,0x82,0xD5,0x2A,0x4B,0x8F,0x4E,0x35,0x20,0x82,0x7E,0x1B,0xFE,0xFA,0x2C,
|
||||||
|
0x79,0x6C,0x6E,0x66,0x94,0xBB,0x0A,0xEB,0xBA,0xD9,0x70,0x61,0xE9,0x47,0xB5,0x82,
|
||||||
|
0xFC,0x18,0x3C,0x66,0x3A,0x09,0x2E,0x1F,0x61,0x74,0xCA,0xCB,0xF6,0x7A,0x52,0x37,
|
||||||
|
0x1D,0xAC,0x8D,0x63,0x69,0x84,0x8E,0xC7,0x70,0x59,0xDD,0x2D,0x91,0x1E,0xF7,0xB1,
|
||||||
|
0x56,0xED,0x7A,0x06,0x9D,0x5B,0x33,0x15,0xDD,0x31,0xD0,0xE6,0x16,0x07,0x9B,0xA5,
|
||||||
|
0x94,0x06,0x7D,0xC1,0xE9,0xD6,0xC8,0xAF,0xB4,0x1E,0x2D,0x88,0x06,0xA7,0x63,0xB8,
|
||||||
|
0xCF,0xC8,0xA2,0x6E,0x84,0xB3,0x8D,0xE5,0x47,0xE6,0x13,0x63,0x8E,0xD1,0x7F,0xD4,
|
||||||
|
0x81,0x44,0x38,0xBF
|
||||||
|
|
||||||
|
$rsa = New-Object Security.Cryptography.RSACryptoServiceProvider
|
||||||
|
$rsa.ImportCspBlob($key)
|
||||||
|
$SessionId = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($env:SessionIdStr + [char]0))
|
||||||
|
$PropertiesStr = "OA3xOriginalProductId=;OA3xOriginalProductKey=;SessionId=$SessionId;TimeStampClient=2022-10-11T12:00:00Z"
|
||||||
|
$SignatureStr = SignProperties $PropertiesStr $rsa
|
||||||
|
|
||||||
|
$xml = @"
|
||||||
|
<?xml version="1.0" encoding="utf-8"?><genuineAuthorization xmlns="http://www.microsoft.com/DRM/SL/GenuineAuthorization/1.0"><version>1.0</version><genuineProperties origin="sppclient"><properties>$PropertiesStr</properties><signatures><signature name="clientLockboxKey" method="rsa-sha256">$SignatureStr</signature></signatures></genuineProperties></genuineAuthorization>
|
||||||
|
"@
|
||||||
|
[System.IO.File]::WriteAllText("$env:ProgramData\Microsoft\Windows\ClipSVC\GenuineTicket\GenuineTicket", ($xml -join ""), [System.Text.Encoding]::ASCII)
|
||||||
|
:sign:
|
||||||
|
|
||||||
|
::========================================================================================================================================
|
||||||
|
|
||||||
:: Below code is used to get alternate edition name and key if current edition doesn't support KMS38 activation
|
:: Below code is used to get alternate edition name and key if current edition doesn't support KMS38 activation
|
||||||
|
|
||||||
:: 1st column = Current SKU ID
|
:: 1st column = Current SKU ID
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
@set masver=3.4
|
@set masver=3.7
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
::============================================================================
|
::============================================================================
|
||||||
::
|
::
|
||||||
:: Homepage: mass<>grave<.>dev
|
:: Homepage: mass()grave(dot)dev
|
||||||
:: Email: mas.help@outlook.com
|
:: Email: mas.help@outlook.com
|
||||||
::
|
::
|
||||||
::============================================================================
|
::============================================================================
|
||||||
@@ -50,6 +50,7 @@ set "_cmdf=%~f0"
|
|||||||
for %%# in (%*) do (
|
for %%# in (%*) do (
|
||||||
if /i "%%#"=="re1" set re1=1
|
if /i "%%#"=="re1" set re1=1
|
||||||
if /i "%%#"=="re2" set re2=1
|
if /i "%%#"=="re2" set re2=1
|
||||||
|
if /i "%%#"=="-qedit" (set re1=1&set re2=1)
|
||||||
)
|
)
|
||||||
|
|
||||||
:: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows
|
:: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows
|
||||||
@@ -727,7 +728,7 @@ call :dk_color %Gray% "Checking Old Office With Sub License [Found. Update Of
|
|||||||
|
|
||||||
::========================================================================================================================================
|
::========================================================================================================================================
|
||||||
|
|
||||||
:: mass<>grave<.>dev/office-license-is-not-genuine
|
:: mass()grave(dot)dev/office-license-is-not-genuine
|
||||||
:: Add registry keys for volume products so that 'non-genuine' banner won't appear
|
:: Add registry keys for volume products so that 'non-genuine' banner won't appear
|
||||||
:: Script already is using MAK instead of GVLK so it won't appear anyway, but registry keys are added incase Office installs default GVLK grace key for volume products
|
:: Script already is using MAK instead of GVLK so it won't appear anyway, but registry keys are added incase Office installs default GVLK grace key for volume products
|
||||||
|
|
||||||
@@ -769,7 +770,7 @@ if defined ohub call :dk_color %Gray% "Office apps such as Word, Excel are activ
|
|||||||
echo Help: %mas%troubleshoot
|
echo Help: %mas%troubleshoot
|
||||||
) else (
|
) else (
|
||||||
call :dk_color %Red% "Some errors were detected."
|
call :dk_color %Red% "Some errors were detected."
|
||||||
if not defined ierror if not defined showfix if not defined serv_cor if not defined serv_cste call :dk_color %Blue% "%_fixmsg%"
|
if not defined ierror if not defined showfix call :dk_color %Blue% "%_fixmsg%"
|
||||||
echo:
|
echo:
|
||||||
set fixes=%fixes% %mas%troubleshoot
|
set fixes=%fixes% %mas%troubleshoot
|
||||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||||
@@ -1474,10 +1475,12 @@ call :dk_color %Gray% "Checking Total User Accounts [%counter%]"
|
|||||||
|
|
||||||
:: Clear the vNext/shared/device license blocks which may prevent ohook activation
|
:: Clear the vNext/shared/device license blocks which may prevent ohook activation
|
||||||
|
|
||||||
|
set vnextexist=
|
||||||
rmdir /s /q "%ProgramData%\Microsoft\Office\Licenses\" %nul%
|
rmdir /s /q "%ProgramData%\Microsoft\Office\Licenses\" %nul%
|
||||||
|
|
||||||
for %%x in (15 16) do (
|
for %%x in (15 16) do (
|
||||||
for %%# in (%_sidlist%) do (
|
for %%# in (%_sidlist%) do (
|
||||||
|
reg query HKU\%%#\Software\Microsoft\Office\%%x.0\Common\Licensing /s %nul2% | findstr /i "CIDToLicenseIdsMapping LicenseIdToEmailMapping @" %nul% && set vnextexist=1
|
||||||
reg delete HKU\%%#\Software\Microsoft\Office\%%x.0\Common\Licensing /f %nul%
|
reg delete HKU\%%#\Software\Microsoft\Office\%%x.0\Common\Licensing /f %nul%
|
||||||
|
|
||||||
for /f "skip=2 tokens=2*" %%a in ('"reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\%%#" /v ProfileImagePath" %nul6%') do (
|
for /f "skip=2 tokens=2*" %%a in ('"reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\%%#" /v ProfileImagePath" %nul6%') do (
|
||||||
@@ -1500,6 +1503,7 @@ rmdir /s /q "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\L
|
|||||||
if exist "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\SystemAppData\Helium\User.dat" (
|
if exist "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\SystemAppData\Helium\User.dat" (
|
||||||
set defname=DEFTEMP-%%#
|
set defname=DEFTEMP-%%#
|
||||||
reg load HKU\!defname! "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\SystemAppData\Helium\User.dat" %nul%
|
reg load HKU\!defname! "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\SystemAppData\Helium\User.dat" %nul%
|
||||||
|
reg query HKU\!defname!\Software\Microsoft\Office\16.0\Common\Licensing /s %nul2% | findstr /i "CIDToLicenseIdsMapping LicenseIdToEmailMapping @" %nul% && set vnextexist=1
|
||||||
reg delete HKU\!defname!\Software\Microsoft\Office\16.0\Common\Licensing /f %nul%
|
reg delete HKU\!defname!\Software\Microsoft\Office\16.0\Common\Licensing /f %nul%
|
||||||
reg unload HKU\!defname! %nul%
|
reg unload HKU\!defname! %nul%
|
||||||
)
|
)
|
||||||
@@ -1507,6 +1511,15 @@ reg unload HKU\!defname! %nul%
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if defined vnextexist (
|
||||||
|
echo:
|
||||||
|
call :dk_color %Gray% "Office vNext subscription detected:"
|
||||||
|
call :dk_color %Blue% "If active, this license overrides other activation methods."
|
||||||
|
call :dk_color %Blue% "If expiring soon, rerun the script after expiration."
|
||||||
|
call :dk_color2 %Blue% "If expired and script activation fails, get help - " %_Yellow% " %mas%troubleshoot"
|
||||||
|
echo:
|
||||||
|
)
|
||||||
|
|
||||||
:: Clear SharedComputerLicensing for office
|
:: Clear SharedComputerLicensing for office
|
||||||
:: https://learn.microsoft.com/en-us/deployoffice/overview-shared-computer-activation
|
:: https://learn.microsoft.com/en-us/deployoffice/overview-shared-computer-activation
|
||||||
|
|
||||||
@@ -1662,7 +1675,7 @@ exit /b
|
|||||||
set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe
|
set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe
|
||||||
set psc=%ps% -nop -c
|
set psc=%ps% -nop -c
|
||||||
set winbuild=1
|
set winbuild=1
|
||||||
for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G
|
for /f "tokens=2 delims=[]" %%G in ('ver') do for /f "tokens=2,3,4 delims=. " %%H in ("%%~G") do set "winbuild=%%J"
|
||||||
|
|
||||||
set _slexe=sppsvc.exe& set _slser=sppsvc
|
set _slexe=sppsvc.exe& set _slser=sppsvc
|
||||||
if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc)
|
if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc)
|
||||||
@@ -2016,7 +2029,7 @@ sc start %%# %nul%
|
|||||||
if !errorlevel! EQU 1060 set _corrupt=1
|
if !errorlevel! EQU 1060 set _corrupt=1
|
||||||
sc query %%# %nul% || set _corrupt=1
|
sc query %%# %nul% || set _corrupt=1
|
||||||
for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _regcorr (
|
for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _regcorr (
|
||||||
reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr="-RegistryError" )
|
reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr=-RegistryError)
|
||||||
)
|
)
|
||||||
|
|
||||||
if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#!_regcorr!") else (set "serv_cor=%%#!_regcorr!"))
|
if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#!_regcorr!") else (set "serv_cor=%%#!_regcorr!"))
|
||||||
@@ -2342,7 +2355,7 @@ cmd /c exit /b %error_code%
|
|||||||
if %error_code% NEQ 0 set "error_code=0x%=ExitCode%"
|
if %error_code% NEQ 0 set "error_code=0x%=ExitCode%"
|
||||||
|
|
||||||
if %error_code% NEQ 0 (
|
if %error_code% NEQ 0 (
|
||||||
call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] %error_code%"
|
call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] [%error_code%]"
|
||||||
if not defined showfix (
|
if not defined showfix (
|
||||||
echo:
|
echo:
|
||||||
call :dk_color %Blue% "%_fixmsg%"
|
call :dk_color %Blue% "%_fixmsg%"
|
||||||
@@ -2361,6 +2374,7 @@ call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
|||||||
|
|
||||||
if not defined apps (
|
if not defined apps (
|
||||||
%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul%
|
%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul%
|
||||||
|
if not defined _vis if !errorlevel! NEQ 0 set rlicfailed=1
|
||||||
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -2382,6 +2396,13 @@ set error=1
|
|||||||
set showfix=1
|
set showfix=1
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if not defined showfix if defined rlicfailed (
|
||||||
|
echo:
|
||||||
|
call :dk_color %Blue% "%_fixmsg%"
|
||||||
|
call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option."
|
||||||
|
echo:
|
||||||
|
)
|
||||||
|
|
||||||
if %winbuild% GEQ 7600 if exist "%tokenstore%\" if not exist "%tokenstore%\tokens.dat" (
|
if %winbuild% GEQ 7600 if exist "%tokenstore%\" if not exist "%tokenstore%\tokens.dat" (
|
||||||
call :dk_color %Red% "Checking SPP tokens.dat [Not Found] [%tokenstore%\]"
|
call :dk_color %Red% "Checking SPP tokens.dat [Not Found] [%tokenstore%\]"
|
||||||
)
|
)
|
||||||
@@ -2520,19 +2541,22 @@ call :dk_color %Gray% "Checking SkipRearm [Default 0 Value
|
|||||||
|
|
||||||
if %winbuild% GEQ 9200 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" (
|
if %winbuild% GEQ 9200 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" (
|
||||||
%psc% "Get-WmiObject -Query 'SELECT Description FROM SoftwareLicensingProduct WHERE PartialProductKey IS NOT NULL AND LicenseDependsOn IS NULL' | Select-Object -Property Description" %nul2% | findstr /i "KMS_" %nul1% || (
|
%psc% "Get-WmiObject -Query 'SELECT Description FROM SoftwareLicensingProduct WHERE PartialProductKey IS NOT NULL AND LicenseDependsOn IS NULL' | Select-Object -Property Description" %nul2% | findstr /i "KMS_" %nul1% || (
|
||||||
for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' -TaskPath '\Microsoft\Windows\SoftwareProtectionPlatform\').State" %nul6%') do (set taskinfo=%%a)
|
for /f "delims=" %%a in ('%psc% "$s=New-Object -ComObject 'Schedule.Service'; $s.Connect(); $state=$s.GetFolder('\Microsoft\Windows\SoftwareProtectionPlatform').GetTask('SvcRestartTask').State; @{0='Unknown';1='Disabled';2='Queued';3='Ready';4='Running'}[$state]" %nul6%') do (set taskinfo=%%a)
|
||||||
|
|
||||||
echo !taskinfo! | find /i "Ready" %nul% || (
|
echo !taskinfo! | find /i "Ready" %nul% || (
|
||||||
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul%
|
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul%
|
||||||
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed
|
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed
|
||||||
if "!taskinfo!"=="" set "taskinfo=Not Found"
|
if "!taskinfo!"=="" set "taskinfo=Not Found"
|
||||||
|
|
||||||
call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, system might deactivate later]"
|
call :dk_color %Gray% "Checking SvcRestartTask Status [!taskinfo!. System might deactivate later.]"
|
||||||
if not defined showfix (
|
if not defined showfix (
|
||||||
echo:
|
echo:
|
||||||
|
echo "!taskinfo!" | findstr /i "Removed Not Found" %nul1% && (
|
||||||
|
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||||
|
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||||
|
) || (
|
||||||
call :dk_color %Blue% "Reboot your machine using the restart option and run the script again."
|
call :dk_color %Blue% "Reboot your machine using the restart option and run the script again."
|
||||||
set fixes=%fixes% %mas%troubleshoot
|
)
|
||||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
|
||||||
echo:
|
echo:
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@@ -2662,7 +2686,6 @@ exit /b
|
|||||||
|
|
||||||
14_4eaff0d0-c6cb-4187-94f3-c7656d49a0aa_Retail________ExcelR_[HSExcelR]
|
14_4eaff0d0-c6cb-4187-94f3-c7656d49a0aa_Retail________ExcelR_[HSExcelR]
|
||||||
14_7004b7f0-6407-4f45-8eac-966e5f868bde_Retail________GrooveR
|
14_7004b7f0-6407-4f45-8eac-966e5f868bde_Retail________GrooveR
|
||||||
14_fbf4ac36-31c8-4340-8666-79873129cf40_Retail________OutlookR
|
|
||||||
14_133c8359-4e93-4241-8118-30bb18737ea0_Retail________PowerPointR_[HSPowerPointR]
|
14_133c8359-4e93-4241-8118-30bb18737ea0_Retail________PowerPointR_[HSPowerPointR]
|
||||||
14_db3bbc9c-ce52-41d1-a46f-1a1d68059119_Retail________WordR_[HSWordR]
|
14_db3bbc9c-ce52-41d1-a46f-1a1d68059119_Retail________WordR_[HSWordR]
|
||||||
14_dbe3aee0-5183-4ff7-8142-66050173cb01_Retail________SmallBusBasicsR_[SmallBusBasicsMSDNR]
|
14_dbe3aee0-5183-4ff7-8142-66050173cb01_Retail________SmallBusBasicsR_[SmallBusBasicsMSDNR]
|
||||||
@@ -2691,6 +2714,7 @@ for %%# in (
|
|||||||
14_85e22450-b741-430c-a172-a37962c938af_6GKT2-KMJPK-4RRBF-8VQKB-JB%f%6G6_MAK___________InfoPathVL
|
14_85e22450-b741-430c-a172-a37962c938af_6GKT2-KMJPK-4RRBF-8VQKB-JB%f%6G6_MAK___________InfoPathVL
|
||||||
14_3f7aa693-9a7e-44fc-9309-bb3d8e604925_2TG3P-9DB76-4YT99-8RXGD-CW%f%XBP_Retail________OneNoteR_[HSOneNoteR]
|
14_3f7aa693-9a7e-44fc-9309-bb3d8e604925_2TG3P-9DB76-4YT99-8RXGD-CW%f%XBP_Retail________OneNoteR_[HSOneNoteR]
|
||||||
14_6860b31f-6a67-48b8-84b9-e312b3485c4b_CV64P-F4VRH-BJ33D-PH6MR-X6%f%9RY_MAK___________OneNoteVL
|
14_6860b31f-6a67-48b8-84b9-e312b3485c4b_CV64P-F4VRH-BJ33D-PH6MR-X6%f%9RY_MAK___________OneNoteVL
|
||||||
|
14_fbf4ac36-31c8-4340-8666-79873129cf40_9D8FR-7GYBW-4YG8M-V36JK-VD%f%7CM_Retail________OutlookR
|
||||||
14_a9aeabd8-63b8-4079-a28e-f531807fd6b8_J8C9M-YXMH2-9CX44-2C3YG-V7%f%692_MAK___________OutlookVL
|
14_a9aeabd8-63b8-4079-a28e-f531807fd6b8_J8C9M-YXMH2-9CX44-2C3YG-V7%f%692_MAK___________OutlookVL
|
||||||
14_acb51361-c0db-4895-9497-1831c41f31a6_GMBWM-WVX26-7WHV4-DB43D-WV%f%DY2_Retail________PersonalR_[PersonalDemoR,PersonalPrepaidR]
|
14_acb51361-c0db-4895-9497-1831c41f31a6_GMBWM-WVX26-7WHV4-DB43D-WV%f%DY2_Retail________PersonalR_[PersonalDemoR,PersonalPrepaidR]
|
||||||
14_38252940-718c-4aa6-81a4-135398e53851_HPBQP-RJHDR-Q3472-PT9Q6-PB%f%B72_MAK___________PowerPointVL
|
14_38252940-718c-4aa6-81a4-135398e53851_HPBQP-RJHDR-Q3472-PT9Q6-PB%f%B72_MAK___________PowerPointVL
|
||||||
@@ -3209,13 +3233,13 @@ $MemoryStream.Close()
|
|||||||
::
|
::
|
||||||
:: The files are encoded in base64 to make AIO version.
|
:: The files are encoded in base64 to make AIO version.
|
||||||
::
|
::
|
||||||
:: mass<>grave<.>dev/ohook
|
:: mass()grave(dot)dev/ohook
|
||||||
:: Here you can find the files source code and info on how to rebuild the identical sppc.dll files
|
:: Here you can find the files source code and info on how to rebuild the identical sppc.dll files
|
||||||
::
|
::
|
||||||
:: stackoverflow.com/a/35335273
|
:: stackoverflow.com/a/35335273
|
||||||
:: Here you can check how to extract sppc.dll files from base64
|
:: Here you can check how to extract sppc.dll files from base64
|
||||||
::
|
::
|
||||||
:: For any further question, feel free to contact us on mass<>grave<.>dev/contactus
|
:: For any further question, feel free to contact us on mass()grave(dot)dev/contactus
|
||||||
::
|
::
|
||||||
::========================================================================================================================================
|
::========================================================================================================================================
|
||||||
::
|
::
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
@set masver=3.4
|
@set masver=3.7
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
::============================================================================
|
::============================================================================
|
||||||
::
|
::
|
||||||
:: Homepage: mass<>grave<.>dev
|
:: Homepage: mass()grave(dot)dev
|
||||||
:: Email: mas.help@outlook.com
|
:: Email: mas.help@outlook.com
|
||||||
::
|
::
|
||||||
::============================================================================
|
::============================================================================
|
||||||
@@ -75,6 +75,7 @@ set "_cmdf=%~f0"
|
|||||||
for %%# in (%*) do (
|
for %%# in (%*) do (
|
||||||
if /i "%%#"=="re1" set re1=1
|
if /i "%%#"=="re1" set re1=1
|
||||||
if /i "%%#"=="re2" set re2=1
|
if /i "%%#"=="re2" set re2=1
|
||||||
|
if /i "%%#"=="-qedit" (set re1=1&set re2=1)
|
||||||
)
|
)
|
||||||
|
|
||||||
:: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows
|
:: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows
|
||||||
@@ -1030,7 +1031,7 @@ if %winbuild% GEQ 9200 (
|
|||||||
for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun /v InstallPath" %nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" set "_C16R=1"
|
for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun /v InstallPath" %nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" set "_C16R=1"
|
||||||
for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun /v InstallPath /reg:32" %nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" set "_C16R=1"
|
for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun /v InstallPath /reg:32" %nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" set "_C16R=1"
|
||||||
if defined _C16R (
|
if defined _C16R (
|
||||||
REM mass<>grave<.>dev/office-license-is-not-genuine
|
REM mass()grave(dot)dev/office-license-is-not-genuine
|
||||||
set _server=10.0.0.10
|
set _server=10.0.0.10
|
||||||
call :_taskregserv
|
call :_taskregserv
|
||||||
echo Keeping the non-existent IP address 10.0.0.10 as %KS% Server.
|
echo Keeping the non-existent IP address 10.0.0.10 as %KS% Server.
|
||||||
@@ -1452,10 +1453,12 @@ call :dk_color %Gray% "Checking Total User Accounts [%counter%]"
|
|||||||
|
|
||||||
:: Clear the vNext/shared/device license blocks which may prevent ohook activation
|
:: Clear the vNext/shared/device license blocks which may prevent ohook activation
|
||||||
|
|
||||||
|
set vnextexist=
|
||||||
rmdir /s /q "%ProgramData%\Microsoft\Office\Licenses\" %nul%
|
rmdir /s /q "%ProgramData%\Microsoft\Office\Licenses\" %nul%
|
||||||
|
|
||||||
for %%x in (15 16) do (
|
for %%x in (15 16) do (
|
||||||
for %%# in (%_sidlist%) do (
|
for %%# in (%_sidlist%) do (
|
||||||
|
reg query HKU\%%#\Software\Microsoft\Office\%%x.0\Common\Licensing /s %nul2% | findstr /i "CIDToLicenseIdsMapping LicenseIdToEmailMapping @" %nul% && set vnextexist=1
|
||||||
reg delete HKU\%%#\Software\Microsoft\Office\%%x.0\Common\Licensing /f %nul%
|
reg delete HKU\%%#\Software\Microsoft\Office\%%x.0\Common\Licensing /f %nul%
|
||||||
|
|
||||||
for /f "skip=2 tokens=2*" %%a in ('"reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\%%#" /v ProfileImagePath" %nul6%') do (
|
for /f "skip=2 tokens=2*" %%a in ('"reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\%%#" /v ProfileImagePath" %nul6%') do (
|
||||||
@@ -1478,6 +1481,7 @@ rmdir /s /q "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\L
|
|||||||
if exist "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\SystemAppData\Helium\User.dat" (
|
if exist "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\SystemAppData\Helium\User.dat" (
|
||||||
set defname=DEFTEMP-%%#
|
set defname=DEFTEMP-%%#
|
||||||
reg load HKU\!defname! "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\SystemAppData\Helium\User.dat" %nul%
|
reg load HKU\!defname! "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\SystemAppData\Helium\User.dat" %nul%
|
||||||
|
reg query HKU\!defname!\Software\Microsoft\Office\16.0\Common\Licensing /s %nul2% | findstr /i "CIDToLicenseIdsMapping LicenseIdToEmailMapping @" %nul% && set vnextexist=1
|
||||||
reg delete HKU\!defname!\Software\Microsoft\Office\16.0\Common\Licensing /f %nul%
|
reg delete HKU\!defname!\Software\Microsoft\Office\16.0\Common\Licensing /f %nul%
|
||||||
reg unload HKU\!defname! %nul%
|
reg unload HKU\!defname! %nul%
|
||||||
)
|
)
|
||||||
@@ -1485,6 +1489,15 @@ reg unload HKU\!defname! %nul%
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if defined vnextexist (
|
||||||
|
echo:
|
||||||
|
call :dk_color %Gray% "Office vNext subscription detected:"
|
||||||
|
call :dk_color %Blue% "If active, this license overrides other activation methods."
|
||||||
|
call :dk_color %Blue% "If expiring soon, rerun the script after expiration."
|
||||||
|
call :dk_color2 %Blue% "If expired and script activation fails, get help - " %_Yellow% " %mas%troubleshoot"
|
||||||
|
echo:
|
||||||
|
)
|
||||||
|
|
||||||
:: Clear SharedComputerLicensing for office
|
:: Clear SharedComputerLicensing for office
|
||||||
:: https://learn.microsoft.com/en-us/deployoffice/overview-shared-computer-activation
|
:: https://learn.microsoft.com/en-us/deployoffice/overview-shared-computer-activation
|
||||||
|
|
||||||
@@ -1714,7 +1727,7 @@ exit /b
|
|||||||
|
|
||||||
::============================================================================
|
::============================================================================
|
||||||
::
|
::
|
||||||
:: Homepage: mass<>grave<.>dev
|
:: Homepage: mass()grave(dot)dev
|
||||||
:: Email: mas.help@outlook.com
|
:: Email: mas.help@outlook.com
|
||||||
::
|
::
|
||||||
::============================================================================
|
::============================================================================
|
||||||
@@ -1755,7 +1768,7 @@ set "PSModulePath=%ProgramFiles%\WindowsPowerShell\Modules;%SysPath%\WindowsPowe
|
|||||||
set _tserror=
|
set _tserror=
|
||||||
set winbuild=1
|
set winbuild=1
|
||||||
set "nul=>nul 2>&1"
|
set "nul=>nul 2>&1"
|
||||||
for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G
|
for /f "tokens=2 delims=[]" %%G in ('ver') do for /f "tokens=2,3,4 delims=. " %%H in ("%%~G") do set "winbuild=%%J"
|
||||||
set psc=powershell.exe -nop -c
|
set psc=powershell.exe -nop -c
|
||||||
|
|
||||||
set _slexe=sppsvc.exe& set _slser=sppsvc
|
set _slexe=sppsvc.exe& set _slser=sppsvc
|
||||||
@@ -2575,7 +2588,7 @@ exit /b
|
|||||||
set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe
|
set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe
|
||||||
set psc=%ps% -nop -c
|
set psc=%ps% -nop -c
|
||||||
set winbuild=1
|
set winbuild=1
|
||||||
for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G
|
for /f "tokens=2 delims=[]" %%G in ('ver') do for /f "tokens=2,3,4 delims=. " %%H in ("%%~G") do set "winbuild=%%J"
|
||||||
|
|
||||||
set _slexe=sppsvc.exe& set _slser=sppsvc
|
set _slexe=sppsvc.exe& set _slser=sppsvc
|
||||||
if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc)
|
if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc)
|
||||||
@@ -3079,7 +3092,7 @@ sc start %%# %nul%
|
|||||||
if !errorlevel! EQU 1060 set _corrupt=1
|
if !errorlevel! EQU 1060 set _corrupt=1
|
||||||
sc query %%# %nul% || set _corrupt=1
|
sc query %%# %nul% || set _corrupt=1
|
||||||
for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _regcorr (
|
for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _regcorr (
|
||||||
reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr="-RegistryError" )
|
reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr=-RegistryError)
|
||||||
)
|
)
|
||||||
|
|
||||||
if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#!_regcorr!") else (set "serv_cor=%%#!_regcorr!"))
|
if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#!_regcorr!") else (set "serv_cor=%%#!_regcorr!"))
|
||||||
@@ -3405,7 +3418,7 @@ cmd /c exit /b %error_code%
|
|||||||
if %error_code% NEQ 0 set "error_code=0x%=ExitCode%"
|
if %error_code% NEQ 0 set "error_code=0x%=ExitCode%"
|
||||||
|
|
||||||
if %error_code% NEQ 0 (
|
if %error_code% NEQ 0 (
|
||||||
call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] %error_code%"
|
call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] [%error_code%]"
|
||||||
if not defined showfix (
|
if not defined showfix (
|
||||||
echo:
|
echo:
|
||||||
call :dk_color %Blue% "%_fixmsg%"
|
call :dk_color %Blue% "%_fixmsg%"
|
||||||
@@ -3424,6 +3437,7 @@ call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
|||||||
|
|
||||||
if not defined apps (
|
if not defined apps (
|
||||||
%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul%
|
%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul%
|
||||||
|
if not defined _vis if !errorlevel! NEQ 0 set rlicfailed=1
|
||||||
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -3445,6 +3459,13 @@ set error=1
|
|||||||
set showfix=1
|
set showfix=1
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if not defined showfix if defined rlicfailed (
|
||||||
|
echo:
|
||||||
|
call :dk_color %Blue% "%_fixmsg%"
|
||||||
|
call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option."
|
||||||
|
echo:
|
||||||
|
)
|
||||||
|
|
||||||
if %winbuild% GEQ 7600 if exist "%tokenstore%\" if not exist "%tokenstore%\tokens.dat" (
|
if %winbuild% GEQ 7600 if exist "%tokenstore%\" if not exist "%tokenstore%\tokens.dat" (
|
||||||
call :dk_color %Red% "Checking SPP tokens.dat [Not Found] [%tokenstore%\]"
|
call :dk_color %Red% "Checking SPP tokens.dat [Not Found] [%tokenstore%\]"
|
||||||
)
|
)
|
||||||
@@ -3583,19 +3604,22 @@ call :dk_color %Gray% "Checking SkipRearm [Default 0 Value
|
|||||||
|
|
||||||
if %winbuild% GEQ 9200 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" (
|
if %winbuild% GEQ 9200 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" (
|
||||||
%psc% "Get-WmiObject -Query 'SELECT Description FROM SoftwareLicensingProduct WHERE PartialProductKey IS NOT NULL AND LicenseDependsOn IS NULL' | Select-Object -Property Description" %nul2% | findstr /i "KMS_" %nul1% || (
|
%psc% "Get-WmiObject -Query 'SELECT Description FROM SoftwareLicensingProduct WHERE PartialProductKey IS NOT NULL AND LicenseDependsOn IS NULL' | Select-Object -Property Description" %nul2% | findstr /i "KMS_" %nul1% || (
|
||||||
for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' -TaskPath '\Microsoft\Windows\SoftwareProtectionPlatform\').State" %nul6%') do (set taskinfo=%%a)
|
for /f "delims=" %%a in ('%psc% "$s=New-Object -ComObject 'Schedule.Service'; $s.Connect(); $state=$s.GetFolder('\Microsoft\Windows\SoftwareProtectionPlatform').GetTask('SvcRestartTask').State; @{0='Unknown';1='Disabled';2='Queued';3='Ready';4='Running'}[$state]" %nul6%') do (set taskinfo=%%a)
|
||||||
|
|
||||||
echo !taskinfo! | find /i "Ready" %nul% || (
|
echo !taskinfo! | find /i "Ready" %nul% || (
|
||||||
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul%
|
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul%
|
||||||
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed
|
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed
|
||||||
if "!taskinfo!"=="" set "taskinfo=Not Found"
|
if "!taskinfo!"=="" set "taskinfo=Not Found"
|
||||||
|
|
||||||
call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, system might deactivate later]"
|
call :dk_color %Gray% "Checking SvcRestartTask Status [!taskinfo!. System might deactivate later.]"
|
||||||
if not defined showfix (
|
if not defined showfix (
|
||||||
echo:
|
echo:
|
||||||
|
echo "!taskinfo!" | findstr /i "Removed Not Found" %nul1% && (
|
||||||
|
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||||
|
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||||
|
) || (
|
||||||
call :dk_color %Blue% "Reboot your machine using the restart option and run the script again."
|
call :dk_color %Blue% "Reboot your machine using the restart option and run the script again."
|
||||||
set fixes=%fixes% %mas%troubleshoot
|
)
|
||||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
|
||||||
echo:
|
echo:
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
@set masver=3.4
|
@set masver=3.7
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
::============================================================================
|
::============================================================================
|
||||||
::
|
::
|
||||||
:: Homepage: mass<>grave<.>dev
|
:: Homepage: mass()grave(dot)dev
|
||||||
:: Email: mas.help@outlook.com
|
:: Email: mas.help@outlook.com
|
||||||
::
|
::
|
||||||
::============================================================================
|
::============================================================================
|
||||||
@@ -46,7 +46,7 @@ set tsids=
|
|||||||
set _resall=0
|
set _resall=0
|
||||||
|
|
||||||
:: Choose activation method:
|
:: Choose activation method:
|
||||||
:: In builds 19041 and later, the script will auto select StaticCID (requires internet). If no internet is detected, it will then auto select the KMS4k method. For builds lower than 19041, the script will auto select ZeroCID.
|
:: In builds 26100 and later, the script will auto select StaticCID (requires internet). If no internet is detected, it will then auto select the KMS4k method. For builds lower than 26100, the script will auto select ZeroCID.
|
||||||
:: To change the activation method, run the script with the parameters "/Z-SCID", "/Z-ZCID", or "/Z-KMS4k", or modify the option from Auto to SCID, ZCID, or KMS4k in the line below.
|
:: To change the activation method, run the script with the parameters "/Z-SCID", "/Z-ZCID", or "/Z-KMS4k", or modify the option from Auto to SCID, ZCID, or KMS4k in the line below.
|
||||||
set _actmethod=Auto
|
set _actmethod=Auto
|
||||||
|
|
||||||
@@ -84,6 +84,7 @@ set "_cmdf=%~f0"
|
|||||||
for %%# in (%*) do (
|
for %%# in (%*) do (
|
||||||
if /i "%%#"=="re1" set re1=1
|
if /i "%%#"=="re1" set re1=1
|
||||||
if /i "%%#"=="re2" set re2=1
|
if /i "%%#"=="re2" set re2=1
|
||||||
|
if /i "%%#"=="-qedit" (set re1=1&set re2=1)
|
||||||
)
|
)
|
||||||
|
|
||||||
:: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows
|
:: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows
|
||||||
@@ -544,8 +545,8 @@ echo:
|
|||||||
echo ______________________________________________________________
|
echo ______________________________________________________________
|
||||||
echo:
|
echo:
|
||||||
call :dk_color2 %_White% " [1] " %_Green% "Auto"
|
call :dk_color2 %_White% " [1] " %_Green% "Auto"
|
||||||
echo Builds ^>= 19041 - StaticCID (KMS4k if offline)
|
echo Builds ^>= 26100 - StaticCID (KMS4k if offline)
|
||||||
echo Builds ^< 19041 - ZeroCID
|
echo Builds ^< 26100 - ZeroCID
|
||||||
echo __________________________________________________
|
echo __________________________________________________
|
||||||
echo:
|
echo:
|
||||||
echo [2] StaticCID
|
echo [2] StaticCID
|
||||||
@@ -554,8 +555,7 @@ echo Not for Windows 7 or older
|
|||||||
echo __________________________________________________
|
echo __________________________________________________
|
||||||
echo:
|
echo:
|
||||||
echo [3] ZeroCID
|
echo [3] ZeroCID
|
||||||
echo Works reliably on builds below 19041
|
echo Works reliably on builds below 26100
|
||||||
echo May break on builds between 19041-26100
|
|
||||||
echo Does not work on builds above 26100.4188
|
echo Does not work on builds above 26100.4188
|
||||||
echo __________________________________________________
|
echo __________________________________________________
|
||||||
echo:
|
echo:
|
||||||
@@ -667,7 +667,7 @@ if /i %_actmethod%==ZCID set tsmethod=ZeroCID
|
|||||||
if /i %_actmethod%==KMS4k set tsmethod=KMS4k
|
if /i %_actmethod%==KMS4k set tsmethod=KMS4k
|
||||||
|
|
||||||
if /i %_actmethod%==Auto (
|
if /i %_actmethod%==Auto (
|
||||||
if %winbuild% GEQ 19041 (
|
if %winbuild% GEQ 26100 (
|
||||||
set tsmethod=StaticCID
|
set tsmethod=StaticCID
|
||||||
) else (
|
) else (
|
||||||
set tsmethod=ZeroCID
|
set tsmethod=ZeroCID
|
||||||
@@ -1469,7 +1469,7 @@ call :ts_process
|
|||||||
|
|
||||||
::========================================================================================================================================
|
::========================================================================================================================================
|
||||||
|
|
||||||
:: mass<>grave<.>dev/office-license-is-not-genuine
|
:: mass()grave(dot)dev/office-license-is-not-genuine
|
||||||
:: Add registry keys for volume products so that 'non-genuine' banner won't appear
|
:: Add registry keys for volume products so that 'non-genuine' banner won't appear
|
||||||
|
|
||||||
set "kmskey=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\0ff1ce15-a989-479d-af46-f275c6370663"
|
set "kmskey=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\0ff1ce15-a989-479d-af46-f275c6370663"
|
||||||
@@ -2411,10 +2411,12 @@ call :dk_color %Gray% "Checking Total User Accounts [%counter%]"
|
|||||||
|
|
||||||
:: Clear the vNext/shared/device license blocks which may prevent ohook activation
|
:: Clear the vNext/shared/device license blocks which may prevent ohook activation
|
||||||
|
|
||||||
|
set vnextexist=
|
||||||
rmdir /s /q "%ProgramData%\Microsoft\Office\Licenses\" %nul%
|
rmdir /s /q "%ProgramData%\Microsoft\Office\Licenses\" %nul%
|
||||||
|
|
||||||
for %%x in (15 16) do (
|
for %%x in (15 16) do (
|
||||||
for %%# in (%_sidlist%) do (
|
for %%# in (%_sidlist%) do (
|
||||||
|
reg query HKU\%%#\Software\Microsoft\Office\%%x.0\Common\Licensing /s %nul2% | findstr /i "CIDToLicenseIdsMapping LicenseIdToEmailMapping @" %nul% && set vnextexist=1
|
||||||
reg delete HKU\%%#\Software\Microsoft\Office\%%x.0\Common\Licensing /f %nul%
|
reg delete HKU\%%#\Software\Microsoft\Office\%%x.0\Common\Licensing /f %nul%
|
||||||
|
|
||||||
for /f "skip=2 tokens=2*" %%a in ('"reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\%%#" /v ProfileImagePath" %nul6%') do (
|
for /f "skip=2 tokens=2*" %%a in ('"reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\%%#" /v ProfileImagePath" %nul6%') do (
|
||||||
@@ -2437,6 +2439,7 @@ rmdir /s /q "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\L
|
|||||||
if exist "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\SystemAppData\Helium\User.dat" (
|
if exist "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\SystemAppData\Helium\User.dat" (
|
||||||
set defname=DEFTEMP-%%#
|
set defname=DEFTEMP-%%#
|
||||||
reg load HKU\!defname! "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\SystemAppData\Helium\User.dat" %nul%
|
reg load HKU\!defname! "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\SystemAppData\Helium\User.dat" %nul%
|
||||||
|
reg query HKU\!defname!\Software\Microsoft\Office\16.0\Common\Licensing /s %nul2% | findstr /i "CIDToLicenseIdsMapping LicenseIdToEmailMapping @" %nul% && set vnextexist=1
|
||||||
reg delete HKU\!defname!\Software\Microsoft\Office\16.0\Common\Licensing /f %nul%
|
reg delete HKU\!defname!\Software\Microsoft\Office\16.0\Common\Licensing /f %nul%
|
||||||
reg unload HKU\!defname! %nul%
|
reg unload HKU\!defname! %nul%
|
||||||
)
|
)
|
||||||
@@ -2444,6 +2447,15 @@ reg unload HKU\!defname! %nul%
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if defined vnextexist (
|
||||||
|
echo:
|
||||||
|
call :dk_color %Gray% "Office vNext subscription detected:"
|
||||||
|
call :dk_color %Blue% "If active, this license overrides other activation methods."
|
||||||
|
call :dk_color %Blue% "If expiring soon, rerun the script after expiration."
|
||||||
|
call :dk_color2 %Blue% "If expired and script activation fails, get help - " %_Yellow% " %mas%troubleshoot"
|
||||||
|
echo:
|
||||||
|
)
|
||||||
|
|
||||||
:: Clear SharedComputerLicensing for office
|
:: Clear SharedComputerLicensing for office
|
||||||
:: https://learn.microsoft.com/en-us/deployoffice/overview-shared-computer-activation
|
:: https://learn.microsoft.com/en-us/deployoffice/overview-shared-computer-activation
|
||||||
|
|
||||||
@@ -2624,7 +2636,7 @@ exit /b
|
|||||||
set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe
|
set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe
|
||||||
set psc=%ps% -nop -c
|
set psc=%ps% -nop -c
|
||||||
set winbuild=1
|
set winbuild=1
|
||||||
for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G
|
for /f "tokens=2 delims=[]" %%G in ('ver') do for /f "tokens=2,3,4 delims=. " %%H in ("%%~G") do set "winbuild=%%J"
|
||||||
|
|
||||||
set _slexe=sppsvc.exe& set _slser=sppsvc
|
set _slexe=sppsvc.exe& set _slser=sppsvc
|
||||||
if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc)
|
if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc)
|
||||||
@@ -3085,7 +3097,7 @@ sc start %%# %nul%
|
|||||||
if !errorlevel! EQU 1060 set _corrupt=1
|
if !errorlevel! EQU 1060 set _corrupt=1
|
||||||
sc query %%# %nul% || set _corrupt=1
|
sc query %%# %nul% || set _corrupt=1
|
||||||
for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _regcorr (
|
for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _regcorr (
|
||||||
reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr="-RegistryError" )
|
reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1&set _regcorr=-RegistryError)
|
||||||
)
|
)
|
||||||
|
|
||||||
if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#!_regcorr!") else (set "serv_cor=%%#!_regcorr!"))
|
if defined _corrupt (if defined serv_cor (set "serv_cor=!serv_cor! %%#!_regcorr!") else (set "serv_cor=%%#!_regcorr!"))
|
||||||
@@ -3411,7 +3423,7 @@ cmd /c exit /b %error_code%
|
|||||||
if %error_code% NEQ 0 set "error_code=0x%=ExitCode%"
|
if %error_code% NEQ 0 set "error_code=0x%=ExitCode%"
|
||||||
|
|
||||||
if %error_code% NEQ 0 (
|
if %error_code% NEQ 0 (
|
||||||
call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] %error_code%"
|
call :dk_color %Red% "Checking SoftwareLicensingService [Not Working] [%error_code%]"
|
||||||
if not defined showfix (
|
if not defined showfix (
|
||||||
echo:
|
echo:
|
||||||
call :dk_color %Blue% "%_fixmsg%"
|
call :dk_color %Blue% "%_fixmsg%"
|
||||||
@@ -3430,6 +3442,7 @@ call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
|||||||
|
|
||||||
if not defined apps (
|
if not defined apps (
|
||||||
%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul%
|
%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[System.IO.File]::ReadAllText('!_batp!') -split ':xrm\:.*';. ([scriptblock]::Create($f[1])); ReinstallLicenses" %nul%
|
||||||
|
if not defined _vis if !errorlevel! NEQ 0 set rlicfailed=1
|
||||||
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -3451,6 +3464,13 @@ set error=1
|
|||||||
set showfix=1
|
set showfix=1
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if not defined showfix if defined rlicfailed (
|
||||||
|
echo:
|
||||||
|
call :dk_color %Blue% "%_fixmsg%"
|
||||||
|
call :dk_color %Blue% "If activation still fails then run Fix WPA Registry option."
|
||||||
|
echo:
|
||||||
|
)
|
||||||
|
|
||||||
if %winbuild% GEQ 7600 if exist "%tokenstore%\" if not exist "%tokenstore%\tokens.dat" (
|
if %winbuild% GEQ 7600 if exist "%tokenstore%\" if not exist "%tokenstore%\tokens.dat" (
|
||||||
call :dk_color %Red% "Checking SPP tokens.dat [Not Found] [%tokenstore%\]"
|
call :dk_color %Red% "Checking SPP tokens.dat [Not Found] [%tokenstore%\]"
|
||||||
)
|
)
|
||||||
@@ -3589,19 +3609,22 @@ call :dk_color %Gray% "Checking SkipRearm [Default 0 Value
|
|||||||
|
|
||||||
if %winbuild% GEQ 9200 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" (
|
if %winbuild% GEQ 9200 if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" (
|
||||||
%psc% "Get-WmiObject -Query 'SELECT Description FROM SoftwareLicensingProduct WHERE PartialProductKey IS NOT NULL AND LicenseDependsOn IS NULL' | Select-Object -Property Description" %nul2% | findstr /i "KMS_" %nul1% || (
|
%psc% "Get-WmiObject -Query 'SELECT Description FROM SoftwareLicensingProduct WHERE PartialProductKey IS NOT NULL AND LicenseDependsOn IS NULL' | Select-Object -Property Description" %nul2% | findstr /i "KMS_" %nul1% || (
|
||||||
for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' -TaskPath '\Microsoft\Windows\SoftwareProtectionPlatform\').State" %nul6%') do (set taskinfo=%%a)
|
for /f "delims=" %%a in ('%psc% "$s=New-Object -ComObject 'Schedule.Service'; $s.Connect(); $state=$s.GetFolder('\Microsoft\Windows\SoftwareProtectionPlatform').GetTask('SvcRestartTask').State; @{0='Unknown';1='Disabled';2='Queued';3='Ready';4='Running'}[$state]" %nul6%') do (set taskinfo=%%a)
|
||||||
|
|
||||||
echo !taskinfo! | find /i "Ready" %nul% || (
|
echo !taskinfo! | find /i "Ready" %nul% || (
|
||||||
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul%
|
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul%
|
||||||
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed
|
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed
|
||||||
if "!taskinfo!"=="" set "taskinfo=Not Found"
|
if "!taskinfo!"=="" set "taskinfo=Not Found"
|
||||||
|
|
||||||
call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, system might deactivate later]"
|
call :dk_color %Gray% "Checking SvcRestartTask Status [!taskinfo!. System might deactivate later.]"
|
||||||
if not defined showfix (
|
if not defined showfix (
|
||||||
echo:
|
echo:
|
||||||
|
echo "!taskinfo!" | findstr /i "Removed Not Found" %nul1% && (
|
||||||
|
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||||
|
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||||
|
) || (
|
||||||
call :dk_color %Blue% "Reboot your machine using the restart option and run the script again."
|
call :dk_color %Blue% "Reboot your machine using the restart option and run the script again."
|
||||||
set fixes=%fixes% %mas%troubleshoot
|
)
|
||||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
|
||||||
echo:
|
echo:
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@@ -3931,7 +3954,7 @@ using System.Xml.Linq;
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Common.cs
|
// LibTSforge/Common.cs
|
||||||
namespace LibTSforge
|
namespace LibTSforge
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
@@ -4173,7 +4196,7 @@ namespace LibTSforge
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// SPP/PKeyConfig.cs
|
// LibTSforge/SPP/PKeyConfig.cs
|
||||||
namespace LibTSforge.SPP
|
namespace LibTSforge.SPP
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
@@ -4199,7 +4222,7 @@ namespace LibTSforge.SPP
|
|||||||
|
|
||||||
public bool Contains(int n)
|
public bool Contains(int n)
|
||||||
{
|
{
|
||||||
return Start <= n && End <= n;
|
return Start <= n && n <= End;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4329,10 +4352,19 @@ namespace LibTSforge.SPP
|
|||||||
string refActIdStr = configNode.SelectSingleNode("./p:ActConfigId", nsmgr).InnerText;
|
string refActIdStr = configNode.SelectSingleNode("./p:ActConfigId", nsmgr).InnerText;
|
||||||
Guid refActId = new Guid(refActIdStr);
|
Guid refActId = new Guid(refActIdStr);
|
||||||
int group = int.Parse(configNode.SelectSingleNode("./p:RefGroupId", nsmgr).InnerText);
|
int group = int.Parse(configNode.SelectSingleNode("./p:RefGroupId", nsmgr).InnerText);
|
||||||
List<KeyRange> keyRanges = ranges[refActIdStr];
|
List<KeyRange> keyRanges;
|
||||||
|
ranges.TryGetValue(refActIdStr, out keyRanges);
|
||||||
|
|
||||||
|
if (keyRanges == null)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (keyRanges.Count > 0 && !Products.ContainsKey(refActId))
|
if (keyRanges.Count > 0 && !Products.ContainsKey(refActId))
|
||||||
{
|
{
|
||||||
|
PKeyAlgorithm algorithm;
|
||||||
|
algorithms.TryGetValue(group, out algorithm);
|
||||||
|
|
||||||
ProductConfig productConfig = new ProductConfig
|
ProductConfig productConfig = new ProductConfig
|
||||||
{
|
{
|
||||||
GroupId = group,
|
GroupId = group,
|
||||||
@@ -4340,7 +4372,7 @@ namespace LibTSforge.SPP
|
|||||||
Description = configNode.SelectSingleNode("./p:ProductDescription", nsmgr).InnerText,
|
Description = configNode.SelectSingleNode("./p:ProductDescription", nsmgr).InnerText,
|
||||||
Channel = configNode.SelectSingleNode("./p:ProductKeyType", nsmgr).InnerText,
|
Channel = configNode.SelectSingleNode("./p:ProductKeyType", nsmgr).InnerText,
|
||||||
Randomized = configNode.SelectSingleNode("./p:ProductKeyType", nsmgr).InnerText.ToLower() == "true",
|
Randomized = configNode.SelectSingleNode("./p:ProductKeyType", nsmgr).InnerText.ToLower() == "true",
|
||||||
Algorithm = algorithms[group],
|
Algorithm = algorithm,
|
||||||
Ranges = keyRanges,
|
Ranges = keyRanges,
|
||||||
ActivationId = refActId
|
ActivationId = refActId
|
||||||
};
|
};
|
||||||
@@ -4390,7 +4422,7 @@ namespace LibTSforge.SPP
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// SPP/ProductKey.cs
|
// LibTSforge/SPP/ProductKey.cs
|
||||||
namespace LibTSforge.SPP
|
namespace LibTSforge.SPP
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
@@ -4706,7 +4738,7 @@ namespace LibTSforge.SPP
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// SPP/SLAPI.cs
|
// LibTSforge/SPP/SLAPI.cs
|
||||||
namespace LibTSforge.SPP
|
namespace LibTSforge.SPP
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
@@ -5119,7 +5151,7 @@ namespace LibTSforge.SPP
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// SPP/SPPUtils.cs
|
// LibTSforge/SPP/SPPUtils.cs
|
||||||
namespace LibTSforge.SPP
|
namespace LibTSforge.SPP
|
||||||
{
|
{
|
||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
@@ -5456,7 +5488,7 @@ namespace LibTSforge.SPP
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// SPP/SPSys.cs
|
// LibTSforge/SPP/SPSys.cs
|
||||||
namespace LibTSforge.SPP
|
namespace LibTSforge.SPP
|
||||||
{
|
{
|
||||||
using Microsoft.Win32.SafeHandles;
|
using Microsoft.Win32.SafeHandles;
|
||||||
@@ -5503,7 +5535,7 @@ namespace LibTSforge.SPP
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Crypto/CryptoUtils.cs
|
// LibTSforge/Crypto/CryptoUtils.cs
|
||||||
namespace LibTSforge.Crypto
|
namespace LibTSforge.Crypto
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
@@ -5638,7 +5670,7 @@ namespace LibTSforge.Crypto
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Crypto/Keys.cs
|
// LibTSforge/Crypto/Keys.cs
|
||||||
namespace LibTSforge.Crypto
|
namespace LibTSforge.Crypto
|
||||||
{
|
{
|
||||||
public static class Keys
|
public static class Keys
|
||||||
@@ -5728,7 +5760,7 @@ namespace LibTSforge.Crypto
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Crypto/PhysStoreCrypto.cs
|
// LibTSforge/Crypto/PhysStoreCrypto.cs
|
||||||
namespace LibTSforge.Crypto
|
namespace LibTSforge.Crypto
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
@@ -5813,7 +5845,7 @@ namespace LibTSforge.Crypto
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Modifiers/GenPKeyInstall.cs
|
// LibTSforge/Modifiers/GenPKeyInstall.cs
|
||||||
namespace LibTSforge.Modifiers
|
namespace LibTSforge.Modifiers
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
@@ -6024,7 +6056,7 @@ namespace LibTSforge.Modifiers
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Modifiers/GracePeriodReset.cs
|
// LibTSforge/Modifiers/GracePeriodReset.cs
|
||||||
namespace LibTSforge.Modifiers
|
namespace LibTSforge.Modifiers
|
||||||
{
|
{
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -6057,7 +6089,7 @@ namespace LibTSforge.Modifiers
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Modifiers/KeyChangeLockDelete.cs
|
// LibTSforge/Modifiers/KeyChangeLockDelete.cs
|
||||||
namespace LibTSforge.Modifiers
|
namespace LibTSforge.Modifiers
|
||||||
{
|
{
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -6097,7 +6129,7 @@ namespace LibTSforge.Modifiers
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Modifiers/KMSHostCharge.cs
|
// LibTSforge/Modifiers/KMSHostCharge.cs
|
||||||
namespace LibTSforge.Modifiers
|
namespace LibTSforge.Modifiers
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
@@ -6258,7 +6290,7 @@ namespace LibTSforge.Modifiers
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Modifiers/RearmReset.cs
|
// LibTSforge/Modifiers/RearmReset.cs
|
||||||
namespace LibTSforge.Modifiers
|
namespace LibTSforge.Modifiers
|
||||||
{
|
{
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -6314,7 +6346,7 @@ namespace LibTSforge.Modifiers
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Modifiers/SetIIDParams.cs
|
// LibTSforge/Modifiers/SetIIDParams.cs
|
||||||
namespace LibTSforge.Modifiers
|
namespace LibTSforge.Modifiers
|
||||||
{
|
{
|
||||||
using PhysicalStore;
|
using PhysicalStore;
|
||||||
@@ -6383,7 +6415,7 @@ namespace LibTSforge.Modifiers
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Modifiers/TamperedFlagsDelete.cs
|
// LibTSforge/Modifiers/TamperedFlagsDelete.cs
|
||||||
namespace LibTSforge.Modifiers
|
namespace LibTSforge.Modifiers
|
||||||
{
|
{
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -6433,7 +6465,7 @@ namespace LibTSforge.Modifiers
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Modifiers/UniqueIdDelete.cs
|
// LibTSforge/Modifiers/UniqueIdDelete.cs
|
||||||
namespace LibTSforge.Modifiers
|
namespace LibTSforge.Modifiers
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
@@ -6492,7 +6524,7 @@ namespace LibTSforge.Modifiers
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Activators/KMS4K.cs
|
// LibTSforge/Activators/KMS4K.cs
|
||||||
namespace LibTSforge.Activators
|
namespace LibTSforge.Activators
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
@@ -6703,7 +6735,7 @@ namespace LibTSforge.Activators
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Activators/ZeroCID.cs
|
// LibTSforge/Activators/ZeroCID.cs
|
||||||
namespace LibTSforge.Activators
|
namespace LibTSforge.Activators
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
@@ -6892,7 +6924,7 @@ namespace LibTSforge.Activators
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// TokenStore/Common.cs
|
// LibTSforge/TokenStore/Common.cs
|
||||||
namespace LibTSforge.TokenStore
|
namespace LibTSforge.TokenStore
|
||||||
{
|
{
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -6962,7 +6994,7 @@ namespace LibTSforge.TokenStore
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// TokenStore/ITokenStore.cs
|
// LibTSforge/TokenStore/ITokenStore.cs
|
||||||
namespace LibTSforge.TokenStore
|
namespace LibTSforge.TokenStore
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
@@ -6982,7 +7014,7 @@ namespace LibTSforge.TokenStore
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// TokenStore/TokenStoreModern.cs
|
// LibTSforge/TokenStore/TokenStoreModern.cs
|
||||||
namespace LibTSforge.TokenStore
|
namespace LibTSforge.TokenStore
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
@@ -7268,7 +7300,7 @@ namespace LibTSforge.TokenStore
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// PhysicalStore/Common.cs
|
// LibTSforge/PhysicalStore/Common.cs
|
||||||
namespace LibTSforge.PhysicalStore
|
namespace LibTSforge.PhysicalStore
|
||||||
{
|
{
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
@@ -7299,7 +7331,7 @@ namespace LibTSforge.PhysicalStore
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// PhysicalStore/IPhysicalStore.cs
|
// LibTSforge/PhysicalStore/IPhysicalStore.cs
|
||||||
namespace LibTSforge.PhysicalStore
|
namespace LibTSforge.PhysicalStore
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
@@ -7394,7 +7426,7 @@ namespace LibTSforge.PhysicalStore
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// PhysicalStore/PhysicalStoreModern.cs
|
// LibTSforge/PhysicalStore/PhysicalStoreModern.cs
|
||||||
namespace LibTSforge.PhysicalStore
|
namespace LibTSforge.PhysicalStore
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
@@ -7812,7 +7844,7 @@ namespace LibTSforge.PhysicalStore
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// PhysicalStore/PhysicalStoreVista.cs
|
// LibTSforge/PhysicalStore/PhysicalStoreVista.cs
|
||||||
namespace LibTSforge.PhysicalStore
|
namespace LibTSforge.PhysicalStore
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
@@ -8171,7 +8203,7 @@ namespace LibTSforge.PhysicalStore
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// PhysicalStore/PhysicalStoreWin7.cs
|
// LibTSforge/PhysicalStore/PhysicalStoreWin7.cs
|
||||||
namespace LibTSforge.PhysicalStore
|
namespace LibTSforge.PhysicalStore
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
@@ -8548,7 +8580,7 @@ namespace LibTSforge.PhysicalStore
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// PhysicalStore/VariableBag.cs
|
// LibTSforge/PhysicalStore/VariableBag.cs
|
||||||
namespace LibTSforge.PhysicalStore
|
namespace LibTSforge.PhysicalStore
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
@@ -8827,6 +8859,7 @@ else {
|
|||||||
if ($env:_debug -eq '0') {
|
if ($env:_debug -eq '0') {
|
||||||
[LibTSforge.Logger]::HideOutput = $true
|
[LibTSforge.Logger]::HideOutput = $true
|
||||||
}
|
}
|
||||||
|
[void][LibTSforge.Utils]::Wow64EnableWow64FsRedirection($false)
|
||||||
$ver = [LibTSforge.Utils]::DetectVersion()
|
$ver = [LibTSforge.Utils]::DetectVersion()
|
||||||
$prod = [LibTSforge.SPP.SPPUtils]::DetectCurrentKey()
|
$prod = [LibTSforge.SPP.SPPUtils]::DetectCurrentKey()
|
||||||
$tsactids = @($args)
|
$tsactids = @($args)
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
@set masver=3.4
|
@set masver=3.7
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
::============================================================================
|
::============================================================================
|
||||||
::
|
::
|
||||||
:: Homepage: mass<>grave<.>dev
|
:: Homepage: mass()grave(dot)dev
|
||||||
:: Email: mas.help@outlook.com
|
:: Email: mas.help@outlook.com
|
||||||
::
|
::
|
||||||
::============================================================================
|
::============================================================================
|
||||||
@@ -37,6 +37,7 @@ set "_cmdf=%~f0"
|
|||||||
for %%# in (%*) do (
|
for %%# in (%*) do (
|
||||||
if /i "%%#"=="re1" set re1=1
|
if /i "%%#"=="re1" set re1=1
|
||||||
if /i "%%#"=="re2" set re2=1
|
if /i "%%#"=="re2" set re2=1
|
||||||
|
if /i "%%#"=="-qedit" (set re1=1&set re2=1)
|
||||||
)
|
)
|
||||||
|
|
||||||
:: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows
|
:: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows
|
||||||
@@ -1547,7 +1548,7 @@ if ($appIdsList.Count -gt 0) {
|
|||||||
set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe
|
set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe
|
||||||
set psc=%ps% -nop -c
|
set psc=%ps% -nop -c
|
||||||
set winbuild=1
|
set winbuild=1
|
||||||
for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G
|
for /f "tokens=2 delims=[]" %%G in ('ver') do for /f "tokens=2,3,4 delims=. " %%H in ("%%~G") do set "winbuild=%%J"
|
||||||
|
|
||||||
set _slexe=sppsvc.exe& set _slser=sppsvc
|
set _slexe=sppsvc.exe& set _slser=sppsvc
|
||||||
if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc)
|
if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc)
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
@set masver=3.4
|
@set masver=3.7
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
::============================================================================
|
::============================================================================
|
||||||
::
|
::
|
||||||
:: Homepage: mass<>grave<.>dev
|
:: Homepage: mass()grave(dot)dev
|
||||||
:: Email: mas.help@outlook.com
|
:: Email: mas.help@outlook.com
|
||||||
::
|
::
|
||||||
::============================================================================
|
::============================================================================
|
||||||
@@ -42,6 +42,7 @@ set "_cmdf=%~f0"
|
|||||||
for %%# in (%*) do (
|
for %%# in (%*) do (
|
||||||
if /i "%%#"=="re1" set re1=1
|
if /i "%%#"=="re1" set re1=1
|
||||||
if /i "%%#"=="re2" set re2=1
|
if /i "%%#"=="re2" set re2=1
|
||||||
|
if /i "%%#"=="-qedit" (set re1=1&set re2=1)
|
||||||
)
|
)
|
||||||
|
|
||||||
:: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows
|
:: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows
|
||||||
@@ -870,7 +871,7 @@ exit /b
|
|||||||
set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe
|
set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe
|
||||||
set psc=%ps% -nop -c
|
set psc=%ps% -nop -c
|
||||||
set winbuild=1
|
set winbuild=1
|
||||||
for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G
|
for /f "tokens=2 delims=[]" %%G in ('ver') do for /f "tokens=2,3,4 delims=. " %%H in ("%%~G") do set "winbuild=%%J"
|
||||||
|
|
||||||
set _slexe=sppsvc.exe& set _slser=sppsvc
|
set _slexe=sppsvc.exe& set _slser=sppsvc
|
||||||
if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc)
|
if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc)
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
@set masver=3.4
|
@set masver=3.7
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
::============================================================================
|
::============================================================================
|
||||||
::
|
::
|
||||||
:: Homepage: mass<>grave<.>dev
|
:: Homepage: mass()grave(dot)dev
|
||||||
:: Email: mas.help@outlook.com
|
:: Email: mas.help@outlook.com
|
||||||
::
|
::
|
||||||
::============================================================================
|
::============================================================================
|
||||||
@@ -37,6 +37,7 @@ set "_cmdf=%~f0"
|
|||||||
for %%# in (%*) do (
|
for %%# in (%*) do (
|
||||||
if /i "%%#"=="re1" set re1=1
|
if /i "%%#"=="re1" set re1=1
|
||||||
if /i "%%#"=="re2" set re2=1
|
if /i "%%#"=="re2" set re2=1
|
||||||
|
if /i "%%#"=="-qedit" (set re1=1&set re2=1)
|
||||||
)
|
)
|
||||||
|
|
||||||
:: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows
|
:: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows
|
||||||
@@ -795,7 +796,7 @@ exit /b
|
|||||||
set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe
|
set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe
|
||||||
set psc=%ps% -nop -c
|
set psc=%ps% -nop -c
|
||||||
set winbuild=1
|
set winbuild=1
|
||||||
for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G
|
for /f "tokens=2 delims=[]" %%G in ('ver') do for /f "tokens=2,3,4 delims=. " %%H in ("%%~G") do set "winbuild=%%J"
|
||||||
|
|
||||||
set _slexe=sppsvc.exe& set _slser=sppsvc
|
set _slexe=sppsvc.exe& set _slser=sppsvc
|
||||||
if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc)
|
if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc)
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
@set masver=3.4
|
@set masver=3.7
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
::============================================================================
|
::============================================================================
|
||||||
::
|
::
|
||||||
:: Homepage: mass<>grave<.>dev
|
:: Homepage: mass()grave(dot)dev
|
||||||
:: Email: mas.help@outlook.com
|
:: Email: mas.help@outlook.com
|
||||||
::
|
::
|
||||||
::============================================================================
|
::============================================================================
|
||||||
@@ -37,6 +37,7 @@ set "_cmdf=%~f0"
|
|||||||
for %%# in (%*) do (
|
for %%# in (%*) do (
|
||||||
if /i "%%#"=="re1" set re1=1
|
if /i "%%#"=="re1" set re1=1
|
||||||
if /i "%%#"=="re2" set re2=1
|
if /i "%%#"=="re2" set re2=1
|
||||||
|
if /i "%%#"=="-qedit" (set re1=1&set re2=1)
|
||||||
)
|
)
|
||||||
|
|
||||||
:: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows
|
:: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows
|
||||||
@@ -1655,7 +1656,7 @@ exit /b
|
|||||||
set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe
|
set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe
|
||||||
set psc=%ps% -nop -c
|
set psc=%ps% -nop -c
|
||||||
set winbuild=1
|
set winbuild=1
|
||||||
for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G
|
for /f "tokens=2 delims=[]" %%G in ('ver') do for /f "tokens=2,3,4 delims=. " %%H in ("%%~G") do set "winbuild=%%J"
|
||||||
|
|
||||||
set _slexe=sppsvc.exe& set _slser=sppsvc
|
set _slexe=sppsvc.exe& set _slser=sppsvc
|
||||||
if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc)
|
if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc)
|
||||||
|
|||||||
57
README.md
57
README.md
@@ -6,25 +6,42 @@
|
|||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
## How to Activate Windows / Office?
|
## How to Activate Windows / Office / Extended Updates (ESU)?
|
||||||
|
|
||||||
### Method 1 - PowerShell (Windows 8 and later) ❤️
|
### Method 1 - PowerShell ❤️
|
||||||
|
|
||||||
1. **Open PowerShell**
|
1. **Open PowerShell**
|
||||||
To do that, press the Windows key + X, then select PowerShell or Terminal.
|
Click the **Start Menu**, type `PowerShell`, then open it.
|
||||||
|
|
||||||
2. **Copy and paste the code below, then press enter.**
|
2. **Copy and paste the code below, then press enter.**
|
||||||
```
|
- For **Windows 8, 10, 11**: 📌
|
||||||
irm https://get.activated.win | iex
|
```
|
||||||
```
|
irm https://get.activated.win | iex
|
||||||
Alternatively, you can use the following (this will be deprecated in the future):
|
```
|
||||||
```
|
- For **Windows 7** and later:
|
||||||
irm https://massgrave.dev/get | iex
|
```
|
||||||
```
|
iex ((New-Object Net.WebClient).DownloadString('https://get.activated.win'))
|
||||||
|
```
|
||||||
|
|
||||||
3. You will see the activation options. Choose the activation options highlighted in green.
|
<details>
|
||||||
|
|
||||||
4. That's all
|
<summary>Script not launching❓Click here for info.</summary>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- If the above is blocked (by ISP/DNS), try this (needs **updated Windows 10 or 11**):
|
||||||
|
```
|
||||||
|
iex (curl.exe -s --doh-url https://1.1.1.1/dns-query https://get.activated.win | Out-String)
|
||||||
|
```
|
||||||
|
- If that fails or you have an older Windows, use the below-listed Method 2.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
3. The activation menu will appear. **Choose the green-highlighted options** to activate Windows or Office.
|
||||||
|
|
||||||
|
4. **Done!**
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -47,16 +64,14 @@ or
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- To activate additional products such as **Office for macOS, Visual Studio, RDS CALs, and Windows XP**, check [here](https://massgrave.dev/unsupported_products_activation).
|
> [!TIP]
|
||||||
- To run the scripts in unattended mode, check [here](https://massgrave.dev/command_line_switches).
|
> - Some ISPs/DNS block access to our domains. You can bypass this by enabling [DNS-over-HTTPS (DoH)](https://developers.cloudflare.com/1.1.1.1/encryption/dns-over-https/encrypted-dns-browsers/) in your browser.
|
||||||
|
> - **Having trouble**❓Visit our [troubleshooting page](https://massgrave.dev/troubleshoot) or raise an issue on [GitHub](https://github.com/massgravel/Microsoft-Activation-Scripts/issues).
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### Not working ❓
|
- To activate additional products such as **Office for macOS, Visual Studio, RDS CALs, and Windows XP**, check [here](https://massgrave.dev/unsupported_products_activation).
|
||||||
|
- To run the scripts in unattended mode, check [here](https://massgrave.dev/command_line_switches).
|
||||||
- If you are **unable to launch MAS** using the PowerShell method, please refer to **Method 2** listed above.
|
|
||||||
- If MAS is launched and the script shows any errors, check for any troubleshooting steps mentioned in blue color and try to follow those.
|
|
||||||
- If you have any issues, please feel free to reach out to us [here](https://massgrave.dev/troubleshoot).
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -69,8 +84,8 @@ or
|
|||||||
---
|
---
|
||||||
|
|
||||||
```
|
```
|
||||||
Latest Version: 3.4
|
Latest Version: 3.7
|
||||||
Release date: 3-June-2025
|
Release date: 11-Sep-2025
|
||||||
```
|
```
|
||||||
|
|
||||||
### [Troubleshooting / Help](https://massgrave.dev/troubleshoot)
|
### [Troubleshooting / Help](https://massgrave.dev/troubleshoot)
|
||||||
|
|||||||
Reference in New Issue
Block a user