mirror of
https://github.com/massgravel/Microsoft-Activation-Scripts.git
synced 2026-05-02 04:18:38 +00:00
Compare commits
43 Commits
5f5a51322d
...
2.7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b1b5299c47 | ||
|
|
652092e985 | ||
|
|
b06c83622a | ||
|
|
ce669809bf | ||
|
|
0afb09cbd1 | ||
|
|
5d8a463475 | ||
|
|
7044f37b44 | ||
|
|
08443039aa | ||
|
|
fd8b81411c | ||
|
|
213bc50b49 | ||
|
|
00e81be52f | ||
|
|
2443e1e471 | ||
|
|
ec31fef9b9 | ||
|
|
84f5516632 | ||
|
|
f9f386a896 | ||
|
|
8e3b4135f5 | ||
|
|
bacb32f4a1 | ||
|
|
86c86c179a | ||
|
|
445a74ccea | ||
|
|
69e6c9bf71 | ||
|
|
0ced0f5d8e | ||
|
|
19be25c029 | ||
|
|
d372b62280 | ||
|
|
9e5062e7cc | ||
|
|
ed3dace78f | ||
|
|
1f50e4ba98 | ||
|
|
af7d204c96 | ||
|
|
0d26ba046e | ||
|
|
3fd1666926 | ||
|
|
bf814304c6 | ||
|
|
1dfd3f6626 | ||
|
|
79bc7b0242 | ||
|
|
ae48118ddb | ||
|
|
b983bd41da | ||
|
|
d55b9fa78c | ||
|
|
fb113c7c24 | ||
|
|
9efc3e49b9 | ||
|
|
a62c3ac36d | ||
|
|
73eabbff59 | ||
|
|
bc5efae19d | ||
|
|
deb74ab9b8 | ||
|
|
d08ed1bd38 | ||
|
|
35e044ddc8 |
7
.gitattributes
vendored
7
.gitattributes
vendored
@@ -1,3 +1,4 @@
|
||||
# MAS export-ignore
|
||||
# LICENSE export-ignore
|
||||
# README.md export-ignore
|
||||
MAS export-ignore
|
||||
LICENSE export-ignore
|
||||
README.md export-ignore
|
||||
.gitattributes export-ignore
|
||||
|
||||
1
LICENSE
1
LICENSE
@@ -672,4 +672,3 @@ may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
|
||||
|
||||
10255
MAS/All-In-One-Version-KL/MAS_AIO.cmd
Normal file
10255
MAS/All-In-One-Version-KL/MAS_AIO.cmd
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
@set masver=2.6
|
||||
@set masver=2.7
|
||||
@echo off
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ set "_debug=0"
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Set Environment variables, it helps if they are misconfigured in the system
|
||||
:: Set environment variables, it helps if they are misconfigured in the system
|
||||
|
||||
setlocal EnableExtensions
|
||||
setlocal DisableDelayedExpansion
|
||||
@@ -160,22 +160,22 @@ call :dk_setvar
|
||||
if %winbuild% LSS 10240 (
|
||||
%eline%
|
||||
echo Unsupported OS version detected [%winbuild%].
|
||||
echo HWID Activation is supported only for Windows 10/11.
|
||||
echo HWID Activation is only supported on Windows 10/11.
|
||||
echo:
|
||||
call :dk_color %Blue% "Use Online KMS Activation option."
|
||||
call :dk_color %Blue% "Use Online KMS activation option."
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-Server*Edition~*.mum" (
|
||||
%eline%
|
||||
echo HWID Activation is not supported for Windows Server.
|
||||
call :dk_color %Blue% "Use KMS38 or Online KMS Activation option."
|
||||
echo HWID Activation is not supported on Windows Server.
|
||||
call :dk_color %Blue% "Use KMS38 or Online KMS activation option."
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Fix special characters limitation in path name
|
||||
:: Fix special character limitations in path name
|
||||
|
||||
set "_work=%~dp0"
|
||||
if "%_work:~-1%"=="\" set "_work=%_work:~0,-1%"
|
||||
@@ -195,8 +195,8 @@ setlocal EnableDelayedExpansion
|
||||
echo "!_batf!" | find /i "!_ttemp!" %nul1% && (
|
||||
if /i not "!_work!"=="!_ttemp!" (
|
||||
%eline%
|
||||
echo Script is launched from the temp folder,
|
||||
echo Most likely you are running the script directly from the archive file.
|
||||
echo The script was launched from the temp folder.
|
||||
echo You are most likely running the script directly from the archive file.
|
||||
echo:
|
||||
echo Extract the archive file and launch the script from the extracted folder.
|
||||
goto dk_done
|
||||
@@ -237,7 +237,7 @@ goto dk_done
|
||||
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b
|
||||
%eline%
|
||||
echo This script needs admin rights.
|
||||
echo To do so, right click on this script and select 'Run as administrator'.
|
||||
echo Right click on this script and select 'Run as administrator'.
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
@@ -290,20 +290,20 @@ set -=
|
||||
set old=
|
||||
|
||||
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 updatecheck.mass%-%grave.dev') do (
|
||||
if not [%%#]==[] (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.69.%masver%" %nul1% || set old=1))
|
||||
if not "%%#"=="" (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.69.%masver%" %nul1% || set old=1))
|
||||
)
|
||||
|
||||
if defined old (
|
||||
echo ________________________________________________
|
||||
%eline%
|
||||
echo Version %masver% of MAS is outdated.
|
||||
echo Your version of MAS [%masver%] is outdated.
|
||||
echo ________________________________________________
|
||||
echo:
|
||||
if not %_unattended%==1 (
|
||||
echo [1] Get Latest MAS
|
||||
echo [0] Continue Anyway
|
||||
echo:
|
||||
call :dk_color %_Green% "Enter a menu option in the Keyboard [1,0] :"
|
||||
call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :"
|
||||
choice /C:10 /N
|
||||
if !errorlevel!==2 rem
|
||||
if !errorlevel!==1 (start ht%-%tps://github.com/mass%-%gravel/Microsoft-Acti%-%vation-Scripts & start %mas% & exit /b)
|
||||
@@ -329,7 +329,7 @@ ClipUp.exe
|
||||
) do (
|
||||
if not exist %SysPath%\%%# (
|
||||
%eline%
|
||||
echo [%SysPath%\%%#] file is missing. Aborting...
|
||||
echo [%SysPath%\%%#] file is missing, aborting...
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
@@ -356,12 +356,12 @@ if defined _perm (
|
||||
cls
|
||||
echo ___________________________________________________________________________________________
|
||||
echo:
|
||||
call :dk_color2 %_White% " " %Green% "Checking: %winos% is Permanently Activated."
|
||||
call :dk_color2 %_White% " " %Green% "%winos% is already permanently activated."
|
||||
call :dk_color2 %_White% " " %Gray% "Activation is not required."
|
||||
echo ___________________________________________________________________________________________
|
||||
if %_unattended%==1 goto dk_done
|
||||
echo:
|
||||
choice /C:10 /N /M "> [1] Activate [0] %_exitmsg% : "
|
||||
choice /C:10 /N /M "> [1] Activate Anyway [0] %_exitmsg% : "
|
||||
if errorlevel 2 exit /b
|
||||
)
|
||||
cls
|
||||
@@ -375,7 +375,7 @@ reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul2
|
||||
%eline%
|
||||
echo [%winos% ^| %winbuild%]
|
||||
echo:
|
||||
echo Evaluation Editions cannot be activated outside of evaluation period.
|
||||
echo Evaluation editions cannot be activated outside of their evaluation period.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%evaluation_editions
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%evaluation_editions"
|
||||
@@ -395,7 +395,7 @@ call :dk_showosinfo
|
||||
|
||||
set _int=
|
||||
for %%a in (l.root-servers.net resolver1.opendns.com download.windowsupdate.com google.com) do if not defined _int (
|
||||
for /f "delims=[] tokens=2" %%# in ('ping -n 1 %%a') do (if not [%%#]==[] set _int=1)
|
||||
for /f "delims=[] tokens=2" %%# in ('ping -n 1 %%a') do (if not "%%#"=="" set _int=1)
|
||||
)
|
||||
|
||||
if not defined _int (
|
||||
@@ -408,7 +408,7 @@ echo Checking Internet Connection [Connected%ping_f%]
|
||||
) else (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking Internet Connection [Not Connected]"
|
||||
call :dk_color %Blue% "Internet is required for HWID Activation."
|
||||
call :dk_color %Blue% "Internet is required for HWID activation."
|
||||
)
|
||||
|
||||
::========================================================================================================================================
|
||||
@@ -457,13 +457,13 @@ if not defined key (
|
||||
%eline%
|
||||
echo [%winos% ^| %winbuild% ^| SKU:%osSKU%]
|
||||
if not defined skunotfound (
|
||||
echo This product does not support HWID Activation.
|
||||
echo Try KMS38 Activation option.
|
||||
echo Make sure you are using updated version of the script.
|
||||
echo This product does not support HWID activation.
|
||||
echo Make sure you are using the latest version of the script.
|
||||
echo If you are, then try KMS38 activation option.
|
||||
set fixes=%fixes% %mas%
|
||||
echo %mas%
|
||||
) else (
|
||||
echo Required License files not found in %SysPath%\spp\tokens\skus\
|
||||
echo Required license files not found in %SysPath%\spp\tokens\skus\
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
)
|
||||
@@ -479,12 +479,12 @@ if defined notworking set error=1
|
||||
|
||||
echo:
|
||||
if defined changekey (
|
||||
call :dk_color %Blue% "[%altedition%] Edition product key will be used to enable HWID activation."
|
||||
call :dk_color %Blue% "[%altedition%] edition product key will be used to enable HWID activation."
|
||||
echo:
|
||||
)
|
||||
|
||||
if defined winsub (
|
||||
call :dk_color %Blue% "Windows Subscription [SKU ID-%slcSKU%] found. Script will activate base edition [SKU ID-%regSKU%]."
|
||||
call :dk_color %Blue% "Windows Subscription [SKU ID-%slcSKU%] detected. Script will activate base edition [SKU ID-%regSKU%]."
|
||||
echo:
|
||||
)
|
||||
|
||||
@@ -526,7 +526,7 @@ call :hwiddata ticket
|
||||
copy /y /b "%tdir%\GenuineTicket" "%tdir%\GenuineTicket.xml" %nul%
|
||||
|
||||
if not exist "%tdir%\GenuineTicket.xml" (
|
||||
call :dk_color %Red% "Generating GenuineTicket.xml [Failed, aborting the process]"
|
||||
call :dk_color %Red% "Generating GenuineTicket.xml [Failed, aborting...]"
|
||||
echo [%encoded%]
|
||||
if exist "%tdir%\Genuine*" del /f /q "%tdir%\Genuine*" %nul%
|
||||
goto :dl_final
|
||||
@@ -544,7 +544,7 @@ set "_xmlexist=if exist "%tdir%\GenuineTicket.xml""
|
||||
%_xmlexist% (
|
||||
set error=1
|
||||
if exist "%tdir%\*.xml" del /f /q "%tdir%\*.xml" %nul%
|
||||
call :dk_color %Red% "Installing GenuineTicket.xml [Failed With ClipSVC Service Restart, Wait...]"
|
||||
call :dk_color %Red% "Installing GenuineTicket.xml [Failed with ClipSVC service restart, wait...]"
|
||||
)
|
||||
)
|
||||
|
||||
@@ -604,7 +604,7 @@ reg delete "%_ident%" /f %nul%
|
||||
reg query "%_ident%" %nul% && (
|
||||
echo:
|
||||
set error=1
|
||||
call :dk_color %Red% "Deleting an IdentityCRL Registry [Failed] [%_ident%]"
|
||||
call :dk_color %Red% "Deleting IdentityCRL Registry [Failed] [%_ident%]"
|
||||
)
|
||||
for %%# in (wlidsvc LicenseManager sppsvc) do (%psc% "Start-Job { Restart-Service %%# } | Wait-Job -Timeout 10 | Out-Null")
|
||||
call :dk_refresh
|
||||
@@ -639,7 +639,7 @@ if not defined resfail (
|
||||
if defined resfail (
|
||||
set error=1
|
||||
echo:
|
||||
call :dk_color %Red% "Checking Licensing Servers [Failed To Connect]"
|
||||
call :dk_color %Red% "Checking Licensing Servers [Failed to Connect]"
|
||||
set fixes=%fixes% %mas%licensing-servers-issue
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%licensing-servers-issue"
|
||||
)
|
||||
@@ -702,8 +702,8 @@ call :dk_color %Green% "%winos% is permanently activated with a digital license.
|
||||
) else (
|
||||
call :dk_color %Red% "Activation Failed %error_code%"
|
||||
if defined notworking (
|
||||
call :dk_color %Blue% "At the time of writing this, HWID Activation was not supported for this product."
|
||||
call :dk_color %Blue% "Use KMS38 Activation option."
|
||||
call :dk_color %Blue% "At the time of writing, HWID Activation is not supported for this product."
|
||||
call :dk_color %Blue% "Use KMS38 activation option instead."
|
||||
) else (
|
||||
if not defined error call :dk_color %Blue% "%_fixmsg%"
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
@@ -992,7 +992,7 @@ function ReinstallLicenses() {
|
||||
|
||||
set _wmic=0
|
||||
for %%# in (wmic.exe) do @if not "%%~$PATH:#"=="" (
|
||||
wmic path Win32_ComputerSystem get CreationClassName /value %nul2% | find /i "computersystem" %nul1% && set _wmic=1
|
||||
cmd /c "wmic path Win32_ComputerSystem get CreationClassName /value" %nul2% | find /i "computersystem" %nul1% && set _wmic=1
|
||||
)
|
||||
exit /b
|
||||
|
||||
@@ -1072,7 +1072,7 @@ set pupfound=%pupfound1%%pupfound2%
|
||||
set hcount=0
|
||||
for %%# in (avira.com kaspersky.com virustotal.com mcafee.com) do (
|
||||
find /i "%%#" %SysPath%\drivers\etc\hosts %nul% && set /a hcount+=1)
|
||||
if %hcount%==4 set "results=[AV URLs are blocked in hosts]"
|
||||
if %hcount%==4 set "results=[Antivirus URLs are blocked in hosts]"
|
||||
|
||||
set wucount=0
|
||||
for %%# in (wuauserv) do (
|
||||
@@ -1081,7 +1081,7 @@ for %%G in (DependOnService Description DisplayName ErrorControl ImagePath Objec
|
||||
reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1 & set /a wucount+=1)
|
||||
)
|
||||
)
|
||||
if %wucount% GEQ 1 set "results=%results%[WU registry is corrupt]"
|
||||
if %wucount% GEQ 1 set "results=%results%[Windows Update registry is corrupt]"
|
||||
|
||||
sc start sppsvc %nul%
|
||||
echo "%errorlevel%" | findstr "577 225" %nul% && (
|
||||
@@ -1092,7 +1092,8 @@ if not exist %SysPath%\sppsvc.exe if not exist %SysPath%\alg.exe (set "results=%
|
||||
|
||||
if not "%results%%pupfound%"=="" (
|
||||
if defined pupfound call :dk_color %Gray% "Checking PUP Activators [Found%pupfound%]"
|
||||
if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection %results%"
|
||||
if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection..."
|
||||
if defined results call :dk_color %Red% "%results%"
|
||||
set fixes=%fixes% %mas%remove_mal%w%ware
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%remove_mal%w%ware"
|
||||
echo:
|
||||
@@ -1111,7 +1112,7 @@ call :dk_chkmal
|
||||
sc query Null %nul% || (
|
||||
set error=1
|
||||
set showfix=1
|
||||
call :dk_color %Red% "Checking Sandboxing [Found. Script may not work properly.]"
|
||||
call :dk_color %Red% "Checking Sandboxing [Found, script may not work properly.]"
|
||||
call :dk_color %Blue% "If you are using any third-party antivirus, check if it is blocking the script."
|
||||
echo:
|
||||
)
|
||||
@@ -1202,7 +1203,7 @@ if defined serv_e (
|
||||
set error=1
|
||||
call :dk_color %Red% "Starting Services [Failed] [%serv_e%]"
|
||||
echo %serv_e% | findstr /i "ClipSVC-1058 sppsvc-1058" %nul% && (
|
||||
call :dk_color %Blue% "Restart the system to fix this error."
|
||||
call :dk_color %Blue% "Reboot your machine using the restart option to fix this error."
|
||||
set showfix=1
|
||||
)
|
||||
)
|
||||
@@ -1242,7 +1243,7 @@ for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':w
|
||||
echo "%wpainfo%" | find /i "Error Found" %nul% && (
|
||||
set error=1
|
||||
set wpaerror=1
|
||||
call :dk_color %Red% "Checking WPA Registry Error [%wpainfo%]"
|
||||
call :dk_color %Red% "Checking WPA Registry Errors [%wpainfo%]"
|
||||
) || (
|
||||
echo Checking WPA Registry Count [%wpainfo%]
|
||||
)
|
||||
@@ -1281,7 +1282,7 @@ call :dk_color %Red% "Checking License Files [Not Found] [%osed
|
||||
|
||||
if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*-%osedition%-*.mum" (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking Package File [Not Found] [%osedition%]"
|
||||
call :dk_color %Red% "Checking Package Files [Not Found] [%osedition%]"
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1352,17 +1353,23 @@ echo Checking Eval WLMS Service [Found]
|
||||
|
||||
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking HKU\S-1-5-20 Reg [Not Found]"
|
||||
call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]"
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
)
|
||||
|
||||
|
||||
for %%# in (SppEx%w%tComObj.exe sppsvc.exe) do (
|
||||
for %%# in (SppEx%w%tComObj.exe sppsvc.exe sppsvc.exe\PerfOptions) do (
|
||||
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" %nul% && (if defined _sppint (set "_sppint=!_sppint!, %%#") else (set "_sppint=%%#"))
|
||||
)
|
||||
if defined _sppint (
|
||||
echo Checking SPP Interference In IFEO [%_sppint%]
|
||||
echo %_sppint% | find /i "PerfOptions" %nul% && (
|
||||
call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System might deactivate later]"
|
||||
if not defined showfix call :dk_color %Blue% "%_fixmsg%"
|
||||
set showfix=1
|
||||
) || (
|
||||
echo Checking SPP In IFEO [%_sppint%]
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -1377,7 +1384,7 @@ set error=1
|
||||
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Plugins\Objects\msft:rm/algorithm/hwid/4.0" /f ba02fed39662 /d %nul% || (
|
||||
call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found]"
|
||||
set fixes=%fixes% %mas%issues_due_to_gaming_spoofers
|
||||
call :dk_color2 %Blue% "Possibly Caused By Gaming Spoofers. Help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
|
||||
call :dk_color2 %Blue% "Most likely caused by HWID spoofers. Help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
|
||||
set error=1
|
||||
set showfix=1
|
||||
)
|
||||
@@ -1407,9 +1414,9 @@ set "d=!d! $AclObject.SetSecurityDescriptorSddlForm($sddl);"
|
||||
set "d=!d! Set-Acl -Path %tokenstore% -AclObject $AclObject;"
|
||||
%psc% "!d!" %nul%
|
||||
if exist "%tokenstore%\" (
|
||||
call :dk_color %Gray% "Checking SPP Token Folder [Not Found. Created Now] [%tokenstore%\]"
|
||||
call :dk_color %Gray% "Checking SPP Token Folder [Not Found, Created Now] [%tokenstore%\]"
|
||||
) else (
|
||||
call :dk_color %Red% "Checking SPP Token Folder [Not Found. Failed To Create] [%tokenstore%\]"
|
||||
call :dk_color %Red% "Checking SPP Token Folder [Not Found, Failed to Create] [%tokenstore%\]"
|
||||
set error=1
|
||||
set showfix=1
|
||||
)
|
||||
@@ -1443,7 +1450,7 @@ for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' -
|
||||
echo !taskinfo! | find /i "Ready" %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
|
||||
call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!]"
|
||||
call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, System might deactivate later]"
|
||||
)
|
||||
)
|
||||
|
||||
@@ -1458,7 +1465,13 @@ for %%# in (
|
||||
"HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform+SetValue"
|
||||
) do for /f "tokens=1,2 delims=+" %%A in (%%#) do if not defined permerror (
|
||||
%psc% "$acl = (Get-Acl '%%A' | fl | Out-String); if (-not ($acl -match 'NT SERVICE\\sppsvc Allow %%B') -or ($acl -match 'NT SERVICE\\sppsvc Deny')) {Exit 2}" %nul%
|
||||
if !errorlevel!==2 set permerror=Error_Found
|
||||
if !errorlevel!==2 (
|
||||
if "%%A"=="%tokenstore%" (
|
||||
set "permerror=Error Found In Token Folder"
|
||||
) else (
|
||||
set "permerror=Error Found In SPP Registries"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
REM https://learn.microsoft.com/office/troubleshoot/activation/license-issue-when-start-office-application
|
||||
@@ -1521,7 +1534,7 @@ if ($osVersion.Build -ge $minBuildNumber) {
|
||||
}
|
||||
for ($i=1; $i -le $count; $i++) {
|
||||
if (-not $subkeyHashTable.ContainsKey("$i")) {
|
||||
Write-Output "Total Keys $count. Error Found- $i key does not exist"
|
||||
Write-Output "Total Keys $count. Error Found - $i key does not exist."
|
||||
$wpaKey.Close()
|
||||
exit
|
||||
}
|
||||
@@ -1532,7 +1545,7 @@ $wpaKey.GetSubKeyNames() | ForEach-Object {
|
||||
if ($PSVersionTable.PSVersion.Major -lt 3) {
|
||||
cmd /c "reg query "HKLM\SYSTEM\WPA\$_" /ve /t REG_BINARY >nul 2>&1"
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Total Keys $count. Error Found- Binary Data is corrupt"
|
||||
Write-Host "Total Keys $count. Error Found - Binary Data is corrupt."
|
||||
$wpaKey.Close()
|
||||
exit
|
||||
}
|
||||
@@ -1540,7 +1553,7 @@ $wpaKey.GetSubKeyNames() | ForEach-Object {
|
||||
$subkey = $wpaKey.OpenSubKey($_)
|
||||
$p = $subkey.GetValueNames()
|
||||
if (($p | Where-Object { $subkey.GetValueKind($_) -eq [Microsoft.Win32.RegistryValueKind]::Binary }).Count -eq 0) {
|
||||
Write-Host "Total Keys $count. Error Found- Binary Data is corrupt"
|
||||
Write-Host "Total Keys $count. Error Found - Binary Data is corrupt."
|
||||
$wpaKey.Close()
|
||||
exit
|
||||
}
|
||||
@@ -1579,13 +1592,13 @@ echo:
|
||||
if %_unattended%==1 timeout /t 2 & exit /b
|
||||
|
||||
if defined fixes (
|
||||
call :dk_color2 %Blue% "Press [1] To Open Troubleshoot Page " %Gray% " Press [0] To Ignore"
|
||||
call :dk_color2 %Blue% "Press [1] to Open Troubleshoot Page " %Gray% " Press [0] to Ignore"
|
||||
choice /C:10 /N
|
||||
if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#))
|
||||
)
|
||||
|
||||
if defined terminal (
|
||||
call :dk_color %_Yellow% "Press 0 key to %_exitmsg%..."
|
||||
call :dk_color %_Yellow% "Press [0] key to %_exitmsg%..."
|
||||
choice /c 0 /n
|
||||
) else (
|
||||
call :dk_color %_Yellow% "Press any key to %_exitmsg%..."
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@set masver=2.6
|
||||
@set masver=2.7
|
||||
@echo off
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ set "_debug=0"
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Set Environment variables, it helps if they are misconfigured in the system
|
||||
:: Set environment variables, it helps if they are misconfigured in the system
|
||||
|
||||
setlocal EnableExtensions
|
||||
setlocal DisableDelayedExpansion
|
||||
@@ -166,19 +166,19 @@ set "specific_kms=SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectio
|
||||
if %winbuild% LSS 14393 (
|
||||
%eline%
|
||||
echo Unsupported OS version detected [%winbuild%].
|
||||
echo KMS38 Activation is supported for Windows 10/11/Server, build 14393 and later.
|
||||
echo KMS38 activation is only supported on Windows 10/11/Server, build 14393 and later.
|
||||
echo:
|
||||
if %winbuild% LSS 10240 (
|
||||
call :dk_color %Blue% "Use Online KMS Activation option."
|
||||
call :dk_color %Blue% "Use Online KMS activation option."
|
||||
) else (
|
||||
call :dk_color %Blue% "Use HWID Activation option."
|
||||
call :dk_color %Blue% "Use HWID activation option."
|
||||
)
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Fix special characters limitation in path name
|
||||
:: Fix special character limitations in path name
|
||||
|
||||
set "_work=%~dp0"
|
||||
if "%_work:~-1%"=="\" set "_work=%_work:~0,-1%"
|
||||
@@ -198,8 +198,8 @@ setlocal EnableDelayedExpansion
|
||||
echo "!_batf!" | find /i "!_ttemp!" %nul1% && (
|
||||
if /i not "!_work!"=="!_ttemp!" (
|
||||
%eline%
|
||||
echo Script is launched from the temp folder,
|
||||
echo Most likely you are running the script directly from the archive file.
|
||||
echo The script was launched from the temp folder.
|
||||
echo You are most likely running the script directly from the archive file.
|
||||
echo:
|
||||
echo Extract the archive file and launch the script from the extracted folder.
|
||||
goto dk_done
|
||||
@@ -240,7 +240,7 @@ goto dk_done
|
||||
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b
|
||||
%eline%
|
||||
echo This script needs admin rights.
|
||||
echo To do so, right click on this script and select 'Run as administrator'.
|
||||
echo Right click on this script and select 'Run as administrator'.
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
@@ -293,20 +293,20 @@ set -=
|
||||
set old=
|
||||
|
||||
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 updatecheck.mass%-%grave.dev') do (
|
||||
if not [%%#]==[] (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.69.%masver%" %nul1% || set old=1))
|
||||
if not "%%#"=="" (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.69.%masver%" %nul1% || set old=1))
|
||||
)
|
||||
|
||||
if defined old (
|
||||
echo ________________________________________________
|
||||
%eline%
|
||||
echo Version %masver% of MAS is outdated.
|
||||
echo Your version of MAS [%masver%] is outdated.
|
||||
echo ________________________________________________
|
||||
echo:
|
||||
if not %_unattended%==1 (
|
||||
echo [1] Get Latest MAS
|
||||
echo [0] Continue Anyway
|
||||
echo:
|
||||
call :dk_color %_Green% "Enter a menu option in the Keyboard [1,0] :"
|
||||
call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :"
|
||||
choice /C:10 /N
|
||||
if !errorlevel!==2 rem
|
||||
if !errorlevel!==1 (start ht%-%tps://github.com/mass%-%gravel/Microsoft-Acti%-%vation-Scripts & start %mas% & exit /b)
|
||||
@@ -329,7 +329,7 @@ echo:
|
||||
echo:
|
||||
echo:
|
||||
echo:
|
||||
echo ____________________________________________________________
|
||||
echo: ______________________________________________________
|
||||
echo:
|
||||
echo [1] KMS38 Activation
|
||||
echo ____________________________________________
|
||||
@@ -337,9 +337,9 @@ echo:
|
||||
echo [2] Remove KM38 Protection
|
||||
echo:
|
||||
echo [0] %_exitmsg%
|
||||
echo ____________________________________________________________
|
||||
echo: ______________________________________________________
|
||||
echo:
|
||||
call :dk_color2 %_White% " " %_Green% "Enter a menu option in the Keyboard [1,2,0]"
|
||||
call :dk_color2 %_White% " " %_Green% "Choose a menu option using your keyboard [1,2,0]"
|
||||
choice /C:120 /N
|
||||
set _el=!errorlevel!
|
||||
if !_el!==3 exit /b
|
||||
@@ -369,7 +369,7 @@ if not exist %SysPath%\ClipUp.exe if not defined a_cor (set _fmiss=%_fmiss%ClipU
|
||||
|
||||
if defined _fmiss (
|
||||
%eline%
|
||||
echo [%_fmiss%] file is missing. Aborting...
|
||||
echo [%_fmiss%] file is missing, aborting...
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
@@ -395,12 +395,12 @@ if defined _perm (
|
||||
cls
|
||||
echo ___________________________________________________________________________________________
|
||||
echo:
|
||||
call :dk_color2 %_White% " " %Green% "Checking: %winos% is Permanently Activated."
|
||||
call :dk_color2 %_White% " " %Green% "%winos% is already permanently activated."
|
||||
call :dk_color2 %_White% " " %Gray% "Activation is not required."
|
||||
echo ___________________________________________________________________________________________
|
||||
if %_unattended%==1 goto dk_done
|
||||
echo:
|
||||
choice /C:10 /N /M "> [1] Activate [0] %_exitmsg% : "
|
||||
choice /C:10 /N /M "> [1] Activate Anyway [0] %_exitmsg% : "
|
||||
if errorlevel 2 exit /b
|
||||
)
|
||||
cls
|
||||
@@ -425,7 +425,7 @@ echo Server Evaluation cannot be activated. Convert it to full Server OS.
|
||||
echo:
|
||||
call :dk_color %Blue% "Go Back to main menu and use [Change Edition] option."
|
||||
) else (
|
||||
echo Evaluation Editions cannot be activated outside of evaluation period.
|
||||
echo Evaluation editions cannot be activated outside of their evaluation period.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%evaluation_editions
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%evaluation_editions"
|
||||
@@ -441,11 +441,22 @@ goto dk_done
|
||||
if defined a_cor (
|
||||
if not exist "!_work!\clipup.exe" (
|
||||
%eline%
|
||||
echo clipup.exe doesn't exist in Server Cor/Acor [No GUI] version.
|
||||
echo It's required for KMS38 Activation.
|
||||
echo Check below page on how to activate it.
|
||||
set fixes=%fixes% %mas%kms38
|
||||
echo %mas%kms38
|
||||
echo clipup.exe doesn't exist in Server Cor/Acor [No GUI] versions.
|
||||
echo The file is required for KMS38 activation.
|
||||
echo Check the below page for instructions on how to activate it.
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%kms38"
|
||||
goto dk_done
|
||||
)
|
||||
)
|
||||
|
||||
:: Check file signature
|
||||
|
||||
if defined a_cor (
|
||||
%psc% "if (-not (Get-AuthenticodeSignature -FilePath '!_work!\clipup.exe').IsOSBinary) {Exit 3}" %nul%
|
||||
if !errorlevel!==3 (
|
||||
%eline%
|
||||
echo Valid digital signature not found in clipup.exe file.
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
)
|
||||
)
|
||||
@@ -496,24 +507,24 @@ set /a UBR=0
|
||||
if %osSKU%==191 if defined altkey if defined altedition (
|
||||
for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v UBR %nul6%') do if not errorlevel 1 set /a UBR=%%b
|
||||
if %winbuild% LSS 22598 if !UBR! LSS 2788 (
|
||||
call :dk_color %Blue% "Windows must to be updated to build 19044.2788 or higher for IotEnterpriseS KMS38 activation."
|
||||
call :dk_color %Blue% "Windows must be updated to build 19044.2788 or higher for IotEnterpriseS KMS38 activation."
|
||||
)
|
||||
)
|
||||
|
||||
if not defined key if defined notfoundaltactID (
|
||||
call :dk_color %Red% "Checking Alternate Edition For KMS38 [%altedition% Activation ID Not Found]"
|
||||
call :dk_color %Red% "Checking Alternate Edition for KMS38 [%altedition% Activation ID Not Found]"
|
||||
)
|
||||
|
||||
if not defined key if not defined _gvlk (
|
||||
%eline%
|
||||
echo [%winos% ^| %winbuild% ^| SKU:%osSKU%]
|
||||
if not defined skunotfound (
|
||||
echo This product does not support KMS38 Activation.
|
||||
echo Make sure you are using updated version of the script.
|
||||
echo This product does not support KMS38 activation.
|
||||
echo Make sure you are using the latest version of the script.
|
||||
set fixes=%fixes% %mas%
|
||||
echo %mas%
|
||||
) else (
|
||||
echo Required License files not found in %SysPath%\spp\tokens\skus\
|
||||
echo Required license files were not found in %SysPath%\spp\tokens\skus\
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
)
|
||||
@@ -527,12 +538,12 @@ goto dk_done
|
||||
|
||||
echo:
|
||||
if defined changekey (
|
||||
call :dk_color %Blue% "[%altedition%] Edition product key will be used to enable KMS38 activation."
|
||||
call :dk_color %Blue% "[%altedition%] edition product key will be used to enable KMS38 activation."
|
||||
echo:
|
||||
)
|
||||
|
||||
if defined winsub (
|
||||
call :dk_color %Blue% "Windows Subscription [SKU ID-%slcSKU%] found. Script will activate base edition [SKU ID-%regSKU%]."
|
||||
call :dk_color %Blue% "Windows Subscription edition [SKU ID-%slcSKU%] found. Script will activate the base edition [SKU ID-%regSKU%]."
|
||||
echo:
|
||||
)
|
||||
|
||||
@@ -629,7 +640,7 @@ set "sessionId=TwBTAE0AYQBqAG8AcgBWAGUAcgBzAGkAbwBuAD0ANQA7AE8AUwBNAGkAbgBvAHIAV
|
||||
copy /y /b "%tdir%\GenuineTicket" "%tdir%\GenuineTicket.xml" %nul%
|
||||
|
||||
if not exist "%tdir%\GenuineTicket.xml" (
|
||||
call :dk_color %Red% "Generating GenuineTicket.xml [Failed, aborting the process]"
|
||||
call :dk_color %Red% "Generating GenuineTicket.xml [Failed, aborting...]"
|
||||
if exist "%tdir%\Genuine*" del /f /q "%tdir%\Genuine*" %nul%
|
||||
goto :k_final
|
||||
) else (
|
||||
@@ -656,7 +667,7 @@ call :dk_color %Gray% "Stopping sppsvc Service [Failed]"
|
||||
%_xmlexist% (
|
||||
set error=1
|
||||
if exist "%tdir%\*.xml" del /f /q "%tdir%\*.xml" %nul%
|
||||
call :dk_color %Red% "Installing GenuineTicket.xml [Failed With ClipSVC Service Restart, Wait...]"
|
||||
call :dk_color %Red% "Installing GenuineTicket.xml [Failed with ClipSVC service restart, wait...]"
|
||||
)
|
||||
)
|
||||
|
||||
@@ -732,16 +743,16 @@ call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
|
||||
:k_final
|
||||
|
||||
:: Remove the added Specific KMS Host (Local Host) if activation is not completed
|
||||
:: Remove the specific KMS host (LocalHost) added by the script if activation is not completed
|
||||
|
||||
echo:
|
||||
if not defined _k38 (
|
||||
%nul% reg delete "HKLM\%specific_kms%" /f
|
||||
%nul% reg delete "HKU\S-1-5-20\%specific_kms%" /f
|
||||
%nul% reg query "HKLM\%specific_kms%" && (
|
||||
call :dk_color %Red% "Removing The Added Specific KMS Host [Failed]"
|
||||
call :dk_color %Red% "Removing the Added Specific KMS Host [Failed]"
|
||||
) || (
|
||||
echo Removing The Added Specific KMS Host [Successful]
|
||||
echo Removing the Added Specific KMS Host [Successful]
|
||||
)
|
||||
)
|
||||
|
||||
@@ -751,9 +762,9 @@ if defined _k38 (
|
||||
%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':regdel\:.*';& ([ScriptBlock]::Create($f[1])) -protect"
|
||||
%nul% reg delete "HKLM\%specific_kms%" /f
|
||||
%nul% reg query "HKLM\%specific_kms%" && (
|
||||
echo Protect KMS38 From KMS [Successful] [Locked A Registry Key]
|
||||
echo Protect KMS38 From KMS [Successful] [Locked a Registry Key]
|
||||
) || (
|
||||
call :dk_color %Red% "Protect KMS38 From KMS [Failed To Lock A Registry Key]"
|
||||
call :dk_color %Red% "Protect KMS38 From KMS [Failed to Lock a Registry Key]"
|
||||
)
|
||||
)
|
||||
|
||||
@@ -763,9 +774,9 @@ if defined a_cor if exist "%_clipup%" del /f /q "%_clipup%" %nul%
|
||||
|
||||
if defined a_cor (
|
||||
if exist "%_clipup%" (
|
||||
call :dk_color %Red% "Deleting copied clipup.exe file [Failed]"
|
||||
call :dk_color %Red% "Deleting Copied clipup.exe File [Failed]"
|
||||
) else (
|
||||
echo Deleting copied clipup.exe file [Successful]
|
||||
echo Deleting Copied clipup.exe File [Successful]
|
||||
)
|
||||
)
|
||||
|
||||
@@ -1090,7 +1101,7 @@ function ReinstallLicenses() {
|
||||
|
||||
set _wmic=0
|
||||
for %%# in (wmic.exe) do @if not "%%~$PATH:#"=="" (
|
||||
wmic path Win32_ComputerSystem get CreationClassName /value %nul2% | find /i "computersystem" %nul1% && set _wmic=1
|
||||
cmd /c "wmic path Win32_ComputerSystem get CreationClassName /value" %nul2% | find /i "computersystem" %nul1% && set _wmic=1
|
||||
)
|
||||
exit /b
|
||||
|
||||
@@ -1190,7 +1201,7 @@ for %%# in (pkeyhelper.dll) do @if "%%~$PATH:#"=="" exit /b
|
||||
for %%# in (Volume:GVLK) do (
|
||||
call :k_pkey %osSKU% '%%#'
|
||||
if defined pkey call :k_pkeychannel !pkey!
|
||||
if /i [!pkeychannel!]==[%%#] (
|
||||
if /i "!pkeychannel!"=="%%#" (
|
||||
set key=!pkey!
|
||||
exit /b
|
||||
)
|
||||
@@ -1215,7 +1226,7 @@ set pupfound=%pupfound1%%pupfound2%
|
||||
set hcount=0
|
||||
for %%# in (avira.com kaspersky.com virustotal.com mcafee.com) do (
|
||||
find /i "%%#" %SysPath%\drivers\etc\hosts %nul% && set /a hcount+=1)
|
||||
if %hcount%==4 set "results=[AV URLs are blocked in hosts]"
|
||||
if %hcount%==4 set "results=[Antivirus URLs are blocked in hosts]"
|
||||
|
||||
set wucount=0
|
||||
for %%# in (wuauserv) do (
|
||||
@@ -1224,7 +1235,7 @@ for %%G in (DependOnService Description DisplayName ErrorControl ImagePath Objec
|
||||
reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1 & set /a wucount+=1)
|
||||
)
|
||||
)
|
||||
if %wucount% GEQ 1 set "results=%results%[WU registry is corrupt]"
|
||||
if %wucount% GEQ 1 set "results=%results%[Windows Update registry is corrupt]"
|
||||
|
||||
sc start sppsvc %nul%
|
||||
echo "%errorlevel%" | findstr "577 225" %nul% && (
|
||||
@@ -1235,7 +1246,8 @@ if not exist %SysPath%\sppsvc.exe if not exist %SysPath%\alg.exe (set "results=%
|
||||
|
||||
if not "%results%%pupfound%"=="" (
|
||||
if defined pupfound call :dk_color %Gray% "Checking PUP Activators [Found%pupfound%]"
|
||||
if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection %results%"
|
||||
if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection..."
|
||||
if defined results call :dk_color %Red% "%results%"
|
||||
set fixes=%fixes% %mas%remove_mal%w%ware
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%remove_mal%w%ware"
|
||||
echo:
|
||||
@@ -1254,7 +1266,7 @@ call :dk_chkmal
|
||||
sc query Null %nul% || (
|
||||
set error=1
|
||||
set showfix=1
|
||||
call :dk_color %Red% "Checking Sandboxing [Found. Script may not work properly.]"
|
||||
call :dk_color %Red% "Checking Sandboxing [Found, script may not work properly.]"
|
||||
call :dk_color %Blue% "If you are using any third-party antivirus, check if it is blocking the script."
|
||||
echo:
|
||||
)
|
||||
@@ -1345,7 +1357,7 @@ if defined serv_e (
|
||||
set error=1
|
||||
call :dk_color %Red% "Starting Services [Failed] [%serv_e%]"
|
||||
echo %serv_e% | findstr /i "ClipSVC-1058 sppsvc-1058" %nul% && (
|
||||
call :dk_color %Blue% "Restart the system to fix this error."
|
||||
call :dk_color %Blue% "Reboot your machine using the restart option to fix this error."
|
||||
set showfix=1
|
||||
)
|
||||
)
|
||||
@@ -1385,7 +1397,7 @@ for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':w
|
||||
echo "%wpainfo%" | find /i "Error Found" %nul% && (
|
||||
set error=1
|
||||
set wpaerror=1
|
||||
call :dk_color %Red% "Checking WPA Registry Error [%wpainfo%]"
|
||||
call :dk_color %Red% "Checking WPA Registry Errors [%wpainfo%]"
|
||||
) || (
|
||||
echo Checking WPA Registry Count [%wpainfo%]
|
||||
)
|
||||
@@ -1424,7 +1436,7 @@ call :dk_color %Red% "Checking License Files [Not Found] [%osed
|
||||
|
||||
if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*-%osedition%-*.mum" (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking Package File [Not Found] [%osedition%]"
|
||||
call :dk_color %Red% "Checking Package Files [Not Found] [%osedition%]"
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1495,17 +1507,23 @@ echo Checking Eval WLMS Service [Found]
|
||||
|
||||
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking HKU\S-1-5-20 Reg [Not Found]"
|
||||
call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]"
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
)
|
||||
|
||||
|
||||
for %%# in (SppEx%w%tComObj.exe sppsvc.exe) do (
|
||||
for %%# in (SppEx%w%tComObj.exe sppsvc.exe sppsvc.exe\PerfOptions) do (
|
||||
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" %nul% && (if defined _sppint (set "_sppint=!_sppint!, %%#") else (set "_sppint=%%#"))
|
||||
)
|
||||
if defined _sppint (
|
||||
echo Checking SPP Interference In IFEO [%_sppint%]
|
||||
echo %_sppint% | find /i "PerfOptions" %nul% && (
|
||||
call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System might deactivate later]"
|
||||
if not defined showfix call :dk_color %Blue% "%_fixmsg%"
|
||||
set showfix=1
|
||||
) || (
|
||||
echo Checking SPP In IFEO [%_sppint%]
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -1520,7 +1538,7 @@ set error=1
|
||||
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Plugins\Objects\msft:rm/algorithm/hwid/4.0" /f ba02fed39662 /d %nul% || (
|
||||
call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found]"
|
||||
set fixes=%fixes% %mas%issues_due_to_gaming_spoofers
|
||||
call :dk_color2 %Blue% "Possibly Caused By Gaming Spoofers. Help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
|
||||
call :dk_color2 %Blue% "Most likely caused by HWID spoofers. Help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
|
||||
set error=1
|
||||
set showfix=1
|
||||
)
|
||||
@@ -1550,9 +1568,9 @@ set "d=!d! $AclObject.SetSecurityDescriptorSddlForm($sddl);"
|
||||
set "d=!d! Set-Acl -Path %tokenstore% -AclObject $AclObject;"
|
||||
%psc% "!d!" %nul%
|
||||
if exist "%tokenstore%\" (
|
||||
call :dk_color %Gray% "Checking SPP Token Folder [Not Found. Created Now] [%tokenstore%\]"
|
||||
call :dk_color %Gray% "Checking SPP Token Folder [Not Found, Created Now] [%tokenstore%\]"
|
||||
) else (
|
||||
call :dk_color %Red% "Checking SPP Token Folder [Not Found. Failed To Create] [%tokenstore%\]"
|
||||
call :dk_color %Red% "Checking SPP Token Folder [Not Found, Failed to Create] [%tokenstore%\]"
|
||||
set error=1
|
||||
set showfix=1
|
||||
)
|
||||
@@ -1586,7 +1604,7 @@ for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' -
|
||||
echo !taskinfo! | find /i "Ready" %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
|
||||
call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!]"
|
||||
call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, System might deactivate later]"
|
||||
)
|
||||
)
|
||||
|
||||
@@ -1601,7 +1619,13 @@ for %%# in (
|
||||
"HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform+SetValue"
|
||||
) do for /f "tokens=1,2 delims=+" %%A in (%%#) do if not defined permerror (
|
||||
%psc% "$acl = (Get-Acl '%%A' | fl | Out-String); if (-not ($acl -match 'NT SERVICE\\sppsvc Allow %%B') -or ($acl -match 'NT SERVICE\\sppsvc Deny')) {Exit 2}" %nul%
|
||||
if !errorlevel!==2 set permerror=Error_Found
|
||||
if !errorlevel!==2 (
|
||||
if "%%A"=="%tokenstore%" (
|
||||
set "permerror=Error Found In Token Folder"
|
||||
) else (
|
||||
set "permerror=Error Found In SPP Registries"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
REM https://learn.microsoft.com/office/troubleshoot/activation/license-issue-when-start-office-application
|
||||
@@ -1664,7 +1688,7 @@ if ($osVersion.Build -ge $minBuildNumber) {
|
||||
}
|
||||
for ($i=1; $i -le $count; $i++) {
|
||||
if (-not $subkeyHashTable.ContainsKey("$i")) {
|
||||
Write-Output "Total Keys $count. Error Found- $i key does not exist"
|
||||
Write-Output "Total Keys $count. Error Found - $i key does not exist."
|
||||
$wpaKey.Close()
|
||||
exit
|
||||
}
|
||||
@@ -1675,7 +1699,7 @@ $wpaKey.GetSubKeyNames() | ForEach-Object {
|
||||
if ($PSVersionTable.PSVersion.Major -lt 3) {
|
||||
cmd /c "reg query "HKLM\SYSTEM\WPA\$_" /ve /t REG_BINARY >nul 2>&1"
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Total Keys $count. Error Found- Binary Data is corrupt"
|
||||
Write-Host "Total Keys $count. Error Found - Binary Data is corrupt."
|
||||
$wpaKey.Close()
|
||||
exit
|
||||
}
|
||||
@@ -1683,7 +1707,7 @@ $wpaKey.GetSubKeyNames() | ForEach-Object {
|
||||
$subkey = $wpaKey.OpenSubKey($_)
|
||||
$p = $subkey.GetValueNames()
|
||||
if (($p | Where-Object { $subkey.GetValueKind($_) -eq [Microsoft.Win32.RegistryValueKind]::Binary }).Count -eq 0) {
|
||||
Write-Host "Total Keys $count. Error Found- Binary Data is corrupt"
|
||||
Write-Host "Total Keys $count. Error Found - Binary Data is corrupt."
|
||||
$wpaKey.Close()
|
||||
exit
|
||||
}
|
||||
@@ -1722,13 +1746,13 @@ echo:
|
||||
if %_unattended%==1 timeout /t 2 & exit /b
|
||||
|
||||
if defined fixes (
|
||||
call :dk_color2 %Blue% "Press [1] To Open Troubleshoot Page " %Gray% " Press [0] To Ignore"
|
||||
call :dk_color2 %Blue% "Press [1] to Open Troubleshoot Page " %Gray% " Press [0] to Ignore"
|
||||
choice /C:10 /N
|
||||
if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#))
|
||||
)
|
||||
|
||||
if defined terminal (
|
||||
call :dk_color %_Yellow% "Press 0 key to %_exitmsg%..."
|
||||
call :dk_color %_Yellow% "Press [0] key to %_exitmsg%..."
|
||||
choice /c 0 /n
|
||||
) else (
|
||||
call :dk_color %_Yellow% "Press any key to %_exitmsg%..."
|
||||
@@ -1805,36 +1829,6 @@ a99cc1f0-7719-4306-9645-294102fbff95_FDNH6-VW9RW-BXPJ7-4XTYG-23%f%9TB_168_Server
|
||||
3dbf341b-5f6c-4fa7-b936-699dce9e263f_VP34G-4NPPG-79JTQ-864T4-R3%f%MQX_168_ServerAzureCor_RS1
|
||||
c2e946d1-cfa2-4523-8c87-30bc696ee584_XGN3F-F394H-FD2MY-PP6FD-8M%f%CRC_407_ServerTurbine_Ge
|
||||
19b5e0fb-4431-46bc-bac1-2f1873e4ae73_NTBV8-9K7Q8-V27C6-M2BTV-KH%f%MXV_407_ServerTurbine_RS5
|
||||
:: Old Preview editions from build 14393 - Generated keys
|
||||
43f2ab05-7c87-4d56-b27c-44d0f9a3dabd_JDTNC-PP77T-T9H2W-G4J2J-VH%f%7MW___4_Enterprise
|
||||
d3872724-5c08-4b1b-91f2-fc9eafed4990_3NMDC-G7C3W-68RGP-CQK9H-B7%f%QK9___7_ServerStandard
|
||||
ba947c44-d19d-4786-b6ae-22770bc94c54_T8N4T-C6P4F-W48KM-CYJT9-KP%f%69Y___8_ServerDatacenter
|
||||
e5676f13-9b66-4a1f-8b0c-43490e236202_RN84D-7HCWY-FTCBK-J3GHK-RM%f%YVT__17_ServerWeb
|
||||
6ae51eeb-c268-4a21-9aae-df74c38b586d_RN3QB-GT6D7-YB3VH-F3RPB-3G%f%P42__27_EnterpriseN
|
||||
ff808201-fec6-4fd4-ae16-abbddade5706_CC6JP-VN67C-8KCJ4-4V48V-HX%f%M9B__48_Professional
|
||||
34260150-69ac-49a3-8a0d-4a403ab55763_TNYKV-X79V3-CPD6X-Y2MRW-D9%f%M9H__49_ProfessionalN
|
||||
9cc2564c-292e-4d8a-b9f9-1f5007d9409a_82CNJ-W82TW-BY23W-BVJ6W-W4%f%2Y2__86_EmbeddedIndustryA
|
||||
c35a9336-fb02-48db-8f4d-245c17f03667_NXTJV-CRQYQ-W77JR-GG84R-HQ%f%VHX__89_EmbeddedIndustry
|
||||
4daf1e3e-6be9-4848-8f5a-a18a0d2895e1_7MNJY-B88MV-WQKVP-BQ6DK-6C%f%M4G__91_EmbeddedIndustryE
|
||||
b554b49f-4d57-4f08-955e-87886f514d49_4QC36-NW3YH-D2Y9D-RJPC7-VV%f%BDF__97_CoreARM
|
||||
4dfd543d-caa6-4f69-a95f-5ddfe2b89567_KG3N2-VRJ6F-P36TD-6MMCF-PP%f%QX7__98_CoreN
|
||||
5fe40dd6-cf1f-4cf2-8729-92121ac2e997_XFNM6-P9FYP-MRF6P-MM6V2-27%f%KDP__99_CoreCountrySpecific
|
||||
2cc171ef-db48-4adc-af09-7c574b37f139_N47PH-2Y8Q8-DGMMV-3PGD8-WB%f%6Q2_100_CoreSingleLanguage
|
||||
903663f7-d2ab-49c9-8942-14aa9e0a9c72_VWCNX-7FKBD-FHJYG-XBR4B-88%f%GQH_101_Core
|
||||
cc17e18a-fa93-43d6-9179-72950a1e931a_FDF9N-KGHKC-R9G6Y-W2TGC-9Q%f%CCB_103_ProfessionalWMC
|
||||
c436def1-0dcc-4849-9a59-8b6142eb70f3_2FNVD-CPYC6-WXD8M-T64BF-84%f%3GJ_111_CoreConnected
|
||||
fd5ae385-f5cf-4b53-b1fa-1af6fff7c0d8_HJN63-7Q4G4-VDW7X-TRMW8-GV%f%H3Q_112_ProfessionalStudent
|
||||
86f72c8d-8363-4188-b574-1a53cb374711_JGRP6-TNJWX-KQWHJ-6D3FJ-RX%f%73B_113_CoreConnectedN
|
||||
687f6358-6a21-453a-a712-3b3b57123827_3K4DY-NVP2W-H8DGV-42K3B-2P%f%PK9_114_ProfessionalStudentN
|
||||
5b120df4-ea3f-4e82-b0c0-6568f719730e_2N382-D6PKK-QTX4D-2JJYK-M9%f%73H_115_CoreConnectedSingleLanguage
|
||||
a8651bfb-7fe0-40df-b156-87337ecd5acc_RPM6J-N62DM-DC6XH-2JXMG-23%f%66R_116_CoreConnectedCountrySpecific
|
||||
5b2add49-b8f4-42e0-a77c-adad4efeeeb1_NT3V6-XMBK7-Q66MF-VMKR4-FC%f%26C_119_PPIPro
|
||||
af43f7f0-3b1e-4266-a123-1fdb53f4323b_BNJR8-P8QHP-VQ4QY-MVPQP-8X%f%C37_121_Education
|
||||
075aca1f-05d7-42e5-a3ce-e349e7be7078_RFNBP-FDD7Q-6FHYQ-9M9Y7-MB%f%JH3_122_EducationN
|
||||
2cf5af84-abab-4ff0-83f8-f040fb2576eb_NVYRQ-D2F32-6HGXW-DKGWM-R6%f%Y8H_125_EnterpriseS
|
||||
11a37f09-fb7f-4002-bd84-f3ae71d11e90_NMBY8-V3CV7-BX6K6-2922Y-43%f%MCH_126_EnterpriseSN
|
||||
aa234c15-ee34-4e5f-adb5-73afafb77143_DNJYG-CM8W6-4W3TX-VCK66-FV%f%WCC_127_ProfessionalS
|
||||
9f6a1bc9-5278-4991-88c9-7301c87a75ea_XB9DG-NPJ72-XRH69-7DF3Q-G8%f%3R4_128_ProfessionalSN
|
||||
) do (
|
||||
for /f "tokens=1-5 delims=_" %%A in ("%%#") do if %osSKU%==%%C (
|
||||
if %1==key if not defined key echo "!allapps!" | find /i "%%A" %nul1% && set key=%%B
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@set masver=2.6
|
||||
@set masver=2.7
|
||||
@echo off
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ set "_debug=0"
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Set Environment variables, it helps if they are misconfigured in the system
|
||||
:: Set environment variables, it helps if they are misconfigured in the system
|
||||
|
||||
setlocal EnableExtensions
|
||||
setlocal DisableDelayedExpansion
|
||||
@@ -160,15 +160,15 @@ call :dk_setvar
|
||||
if %winbuild% LSS 9200 (
|
||||
%eline%
|
||||
echo Unsupported OS version detected [%winbuild%].
|
||||
echo Ohook Activation is supported on Windows 8 and later and their server equivalent.
|
||||
echo Ohook Activation is supported only on Windows 8/10/11 and their server equivalents.
|
||||
echo:
|
||||
call :dk_color %Blue% "Use Online KMS Activation option."
|
||||
call :dk_color %Blue% "Use Online KMS activation option instead."
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Fix special characters limitation in path name
|
||||
:: Fix special character limitations in path name
|
||||
|
||||
set "_work=%~dp0"
|
||||
if "%_work:~-1%"=="\" set "_work=%_work:~0,-1%"
|
||||
@@ -188,8 +188,8 @@ setlocal EnableDelayedExpansion
|
||||
echo "!_batf!" | find /i "!_ttemp!" %nul1% && (
|
||||
if /i not "!_work!"=="!_ttemp!" (
|
||||
%eline%
|
||||
echo Script is launched from the temp folder,
|
||||
echo Most likely you are running the script directly from the archive file.
|
||||
echo The script was launched from the temp folder.
|
||||
echo You are most likely running the script directly from the archive file.
|
||||
echo:
|
||||
echo Extract the archive file and launch the script from the extracted folder.
|
||||
goto dk_done
|
||||
@@ -230,7 +230,7 @@ goto dk_done
|
||||
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b
|
||||
%eline%
|
||||
echo This script needs admin rights.
|
||||
echo To do so, right click on this script and select 'Run as administrator'.
|
||||
echo Right click on this script and select 'Run as administrator'.
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
@@ -283,20 +283,20 @@ set -=
|
||||
set old=
|
||||
|
||||
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 updatecheck.mass%-%grave.dev') do (
|
||||
if not [%%#]==[] (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.69.%masver%" %nul1% || set old=1))
|
||||
if not "%%#"=="" (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.69.%masver%" %nul1% || set old=1))
|
||||
)
|
||||
|
||||
if defined old (
|
||||
echo ________________________________________________
|
||||
%eline%
|
||||
echo Version %masver% of MAS is outdated.
|
||||
echo Your version of MAS [%masver%] is outdated.
|
||||
echo ________________________________________________
|
||||
echo:
|
||||
if not %_unattended%==1 (
|
||||
echo [1] Get Latest MAS
|
||||
echo [0] Continue Anyway
|
||||
echo:
|
||||
call :dk_color %_Green% "Enter a menu option in the Keyboard [1,0] :"
|
||||
call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :"
|
||||
choice /C:10 /N
|
||||
if !errorlevel!==2 rem
|
||||
if !errorlevel!==1 (start ht%-%tps://github.com/mass%-%gravel/Microsoft-Acti%-%vation-Scripts & start %mas% & exit /b)
|
||||
@@ -332,7 +332,7 @@ echo:
|
||||
echo [0] %_exitmsg%
|
||||
echo ____________________________________________________________
|
||||
echo:
|
||||
call :dk_color2 %_White% " " %_Green% "Enter a menu option in the Keyboard [1,2,3,0]"
|
||||
call :dk_color2 %_White% " " %_Green% "Choose a menu option using your keyboard [1,2,3,0]"
|
||||
choice /C:1230 /N
|
||||
set _el=!errorlevel!
|
||||
if !_el!==4 exit /b
|
||||
@@ -360,7 +360,7 @@ call :dk_chkmal
|
||||
|
||||
if not exist %SysPath%\sppsvc.exe (
|
||||
%eline%
|
||||
echo [%SysPath%\sppsvc.exe] file is missing. Aborting...
|
||||
echo [%SysPath%\sppsvc.exe] file is missing, aborting...
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
@@ -456,10 +456,10 @@ call :dk_color %Red% "Checking Installed Office [Not Found]"
|
||||
|
||||
if defined ohub (
|
||||
echo:
|
||||
echo You have only Office dashboard app installed, you need to install full Office version.
|
||||
echo You only have the Office dashboard app installed, you need to install the full version of Office.
|
||||
)
|
||||
echo:
|
||||
call :dk_color %Blue% "Download and install Office from below URL and try again."
|
||||
call :dk_color %Blue% "Download and install Office from the below URL and then try again."
|
||||
echo:
|
||||
set fixes=%fixes% %mas%genuine-installation-media
|
||||
call :dk_color %_Yellow% "%mas%genuine-installation-media"
|
||||
@@ -471,7 +471,7 @@ if not "%o16c2r%%o15c2r%%o16msi%%o15msi%"=="1" set multioffice=1
|
||||
if not "%o14msi%%o14c2r%%o16uwp%"=="" set multioffice=1
|
||||
|
||||
if defined multioffice (
|
||||
call :dk_color %Gray% "Checking Multiple Office Install [Found. Recommended to install one version only]"
|
||||
call :dk_color %Gray% "Checking Multiple Office Install [Found, its recommended to install only one version]"
|
||||
)
|
||||
|
||||
::========================================================================================================================================
|
||||
@@ -520,11 +520,11 @@ echo "!_oIds!" | find /i " %%a " %nul1% || (set "_oIds= !_oIds! %%a ")
|
||||
set "_oLPath=%_oRoot%\Licenses"
|
||||
set "_oIntegrator=%_oRoot%\integration\integrator.exe"
|
||||
|
||||
if [%_oArch%]==[x64] (set "_hookPath=%_oRoot%\vfs\System" & set "_hook=sppc64.dll")
|
||||
if [%_oArch%]==[x86] (set "_hookPath=%_oRoot%\vfs\SystemX86" & set "_hook=sppc32.dll")
|
||||
if not [%osarch%]==[x86] (
|
||||
if [%_oArch%]==[x64] set "_sppcPath=%SystemRoot%\System32\sppc.dll"
|
||||
if [%_oArch%]==[x86] set "_sppcPath=%SystemRoot%\SysWOW64\sppc.dll"
|
||||
if "%_oArch%"=="x64" (set "_hookPath=%_oRoot%\vfs\System" & set "_hook=sppc64.dll")
|
||||
if "%_oArch%"=="x86" (set "_hookPath=%_oRoot%\vfs\SystemX86" & set "_hook=sppc32.dll")
|
||||
if not "%osarch%"=="x86" (
|
||||
if "%_oArch%"=="x64" set "_sppcPath=%SystemRoot%\System32\sppc.dll"
|
||||
if "%_oArch%"=="x86" set "_sppcPath=%SystemRoot%\SysWOW64\sppc.dll"
|
||||
) else (
|
||||
set "_sppcPath=%SystemRoot%\System32\sppc.dll"
|
||||
)
|
||||
@@ -570,11 +570,11 @@ set _o16c2rIds=%_oIds%
|
||||
set "_oLPath=%_oRoot%\Licenses16"
|
||||
set "_oIntegrator=%_oRoot%\integration\integrator.exe"
|
||||
|
||||
if [%_oArch%]==[x64] (set "_hookPath=%_oRoot%\vfs\System" & set "_hook=sppc64.dll")
|
||||
if [%_oArch%]==[x86] (set "_hookPath=%_oRoot%\vfs\SystemX86" & set "_hook=sppc32.dll")
|
||||
if not [%osarch%]==[x86] (
|
||||
if [%_oArch%]==[x64] set "_sppcPath=%SystemRoot%\System32\sppc.dll"
|
||||
if [%_oArch%]==[x86] set "_sppcPath=%SystemRoot%\SysWOW64\sppc.dll"
|
||||
if "%_oArch%"=="x64" (set "_hookPath=%_oRoot%\vfs\System" & set "_hook=sppc64.dll")
|
||||
if "%_oArch%"=="x86" (set "_hookPath=%_oRoot%\vfs\SystemX86" & set "_hook=sppc32.dll")
|
||||
if not "%osarch%"=="x86" (
|
||||
if "%_oArch%"=="x64" set "_sppcPath=%SystemRoot%\System32\sppc.dll"
|
||||
if "%_oArch%"=="x86" set "_sppcPath=%SystemRoot%\SysWOW64\sppc.dll"
|
||||
) else (
|
||||
set "_sppcPath=%SystemRoot%\System32\sppc.dll"
|
||||
)
|
||||
@@ -613,13 +613,13 @@ call :dk_color %Gray% "Checking Old Office With Sub License [Found. Update Of
|
||||
set "kmskey=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\0ff1ce15-a989-479d-af46-f275c6370663"
|
||||
echo "%_oIds%" | find /i "Volume" %nul1% && (
|
||||
if %winbuild% GEQ 9200 (
|
||||
if not [%osarch%]==[x86] (
|
||||
if not "%osarch%"=="x86" (
|
||||
reg delete "%kmskey%" /f /reg:32 %nul%
|
||||
reg add "%kmskey%" /f /v KeyManagementServiceName /t REG_SZ /d "10.0.0.10" /reg:32 %nul%
|
||||
)
|
||||
reg delete "%kmskey%" /f %nul%
|
||||
reg add "%kmskey%" /f /v KeyManagementServiceName /t REG_SZ /d "10.0.0.10" %nul%
|
||||
echo Adding a Reg To Prevent Banner [Successful]
|
||||
echo Adding a Registry to Prevent Banner [Successful]
|
||||
)
|
||||
)
|
||||
|
||||
@@ -667,7 +667,7 @@ call :oh_reset
|
||||
call :oh_getpath
|
||||
|
||||
echo:
|
||||
echo Uninstalling Ohook Activation...
|
||||
echo Uninstalling Ohook activation...
|
||||
echo:
|
||||
|
||||
if defined o16c2r_reg (for /f "skip=2 tokens=2*" %%a in ('"reg query %o16c2r_reg% /v InstallPath" %nul6%') do (set "_16CHook=%%b\root\vfs"))
|
||||
@@ -698,7 +698,7 @@ if exist "%%~A\Microsoft %%~G\root\vfs\%%#\sppc*dll" (set _present=1& del /s /f
|
||||
|
||||
reg query HKCU\Software\Microsoft\Office\16.0\Common\Licensing\Resiliency %nul% && (
|
||||
echo:
|
||||
echo Deleting - Registry keys to skip license check from all ^& future new useraccounts
|
||||
echo Deleting - Registry keys for skipping license check
|
||||
|
||||
reg load HKU\DEF_TEMP %SystemDrive%\Users\Default\NTUSER.DAT %nul%
|
||||
reg query HKU\DEF_TEMP\Software\Microsoft\Office\16.0\Common\Licensing\Resiliency %nul% && reg delete HKU\DEF_TEMP\Software\Microsoft\Office\16.0\Common\Licensing\Resiliency /f
|
||||
@@ -723,7 +723,7 @@ reg unload HKU\%%# %nul%
|
||||
set "kmskey=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\0ff1ce15-a989-479d-af46-f275c6370663"
|
||||
reg query "%kmskey%" %nul% && (
|
||||
echo:
|
||||
echo Deleting - Registry keys to prevent non-genuine banner
|
||||
echo Deleting - Registry keys for preventing non-genuine banner
|
||||
reg delete "%kmskey%" /f
|
||||
)
|
||||
|
||||
@@ -735,16 +735,16 @@ echo ___________________________________________________________________________
|
||||
echo:
|
||||
|
||||
if not defined _present (
|
||||
echo Ohook Activation is not installed.
|
||||
echo Ohook activation is not installed.
|
||||
) else (
|
||||
if defined _unerror (
|
||||
call :dk_color %Red% "Failed to uninstall Ohook activation."
|
||||
call :oh_checkapps
|
||||
if defined checknames (
|
||||
call :dk_color %Blue% "Close [!checknames!] and try again."
|
||||
call :dk_color %Blue% "If its still not resolved then restart system and try again."
|
||||
call :dk_color %Blue% "If it is still not fixed, reboot your machine using the restart option and try again."
|
||||
) else (
|
||||
call :dk_color %Blue% "Restart system and try again."
|
||||
call :dk_color %Blue% "Reboot your machine using the restart option and try again."
|
||||
)
|
||||
) else (
|
||||
call :dk_color %Green% "Successfully uninstalled Ohook activation."
|
||||
@@ -919,11 +919,11 @@ if not exist "%_hookPath%\sppc.dll" (if not defined ierror set ierror=Copy)
|
||||
|
||||
echo:
|
||||
if not defined ierror (
|
||||
echo Symlinking System's sppc.dll To ["%_hookPath%\sppcs.dll"] [Successful]
|
||||
echo Symlinking System's sppc.dll to ["%_hookPath%\sppcs.dll"] [Successful]
|
||||
if defined exhook (
|
||||
echo Copying Custom %_hook% To ["%_hookPath%\sppc.dll"] [Successful]
|
||||
echo Copying Custom %_hook% to ["%_hookPath%\sppc.dll"] [Successful]
|
||||
) else (
|
||||
echo Extracting Custom %_hook% To ["%_hookPath%\sppc.dll"] [Successful]
|
||||
echo Extracting Custom %_hook% to ["%_hookPath%\sppc.dll"] [Successful]
|
||||
)
|
||||
) else (
|
||||
set error=1
|
||||
@@ -932,9 +932,9 @@ echo:
|
||||
call :oh_checkapps
|
||||
if defined checknames (
|
||||
call :dk_color %Blue% "Close [!checknames!] and try again."
|
||||
call :dk_color %Blue% "If its still not resolved then restart system and try again."
|
||||
call :dk_color %Blue% "If it is still not fixed, reboot your machine using the restart option and try again."
|
||||
) else (
|
||||
if /i not "%ierror%"=="Copy" call :dk_color %Blue% "Restart system and try again."
|
||||
if /i not "%ierror%"=="Copy" call :dk_color %Blue% "Reboot your machine using the restart option and try again."
|
||||
if /i "%ierror%"=="Copy" call :dk_color %Blue% "If you are using any third-party antivirus, check if it is blocking the script."
|
||||
)
|
||||
echo:
|
||||
@@ -976,13 +976,13 @@ set _prod=%%#!_preview!
|
||||
|
||||
call :ohookdata getinfo !_prod!
|
||||
|
||||
if not [!key!]==[] (
|
||||
if not "!key!"=="" (
|
||||
echo "!allapps!" | find /i "!_actid!" %nul1% || call :oh_installlic
|
||||
call :dk_inskey "[!key!] [!_prod!] [!_lic!]"
|
||||
) else (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking Product In Script [Office %oVer%.0 !_prod! not found in script]"
|
||||
call :dk_color %Blue% "Make sure you are using Latest MAS script."
|
||||
call :dk_color %Blue% "Make sure you are using the latest version of MAS."
|
||||
set fixes=%fixes% %mas%
|
||||
call :dk_color %_Yellow% "%mas%"
|
||||
)
|
||||
@@ -996,7 +996,7 @@ if defined winserver if defined _config (
|
||||
echo %_oIds% | find /i "Retail" %nul1% && (
|
||||
set scaIsNeeded=1
|
||||
reg add %_config% /v SharedComputerLicensing /t REG_SZ /d "1" /f %nul1%
|
||||
echo Adding SharedComputerLicensing Reg [Successful] [Needed On Server With Retail Office]"
|
||||
echo Adding SharedComputerLicensing Reg [Successful] [Needed on Server With Retail Office]"
|
||||
)
|
||||
)
|
||||
|
||||
@@ -1017,14 +1017,14 @@ for /f "skip=2 tokens=2*" %%a in ('"reg query %2\Common\ProductVersion /v LastPr
|
||||
if "%_oRoot:~-1%"=="\" set "_oRoot=%_oRoot:~0,-1%"
|
||||
|
||||
echo "%2" | find /i "Wow6432Node" %nul1% && set _oArch=x86
|
||||
if not [%osarch%]==[x86] if not defined _oArch set _oArch=x64
|
||||
if [%osarch%]==[x86] set _oArch=x86
|
||||
if not "%osarch%"=="x86" if not defined _oArch set _oArch=x64
|
||||
if "%osarch%"=="x86" set _oArch=x86
|
||||
|
||||
if [%_oArch%]==[x64] (set "_hookPath=%_oRoot%" & set "_hook=sppc64.dll")
|
||||
if [%_oArch%]==[x86] (set "_hookPath=%_oRoot%" & set "_hook=sppc32.dll")
|
||||
if not [%osarch%]==[x86] (
|
||||
if [%_oArch%]==[x64] set "_sppcPath=%SystemRoot%\System32\sppc.dll"
|
||||
if [%_oArch%]==[x86] set "_sppcPath=%SystemRoot%\SysWOW64\sppc.dll"
|
||||
if "%_oArch%"=="x64" (set "_hookPath=%_oRoot%" & set "_hook=sppc64.dll")
|
||||
if "%_oArch%"=="x86" (set "_hookPath=%_oRoot%" & set "_hook=sppc32.dll")
|
||||
if not "%osarch%"=="x86" (
|
||||
if "%_oArch%"=="x64" set "_sppcPath=%SystemRoot%\System32\sppc.dll"
|
||||
if "%_oArch%"=="x86" set "_sppcPath=%SystemRoot%\SysWOW64\sppc.dll"
|
||||
) else (
|
||||
set "_sppcPath=%SystemRoot%\System32\sppc.dll"
|
||||
)
|
||||
@@ -1043,13 +1043,13 @@ echo Activating Office... [MSI ^| %_version% ^| %_oArch%]
|
||||
|
||||
if not defined _oBranding (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking BRANDING.XML [Not Found. Aborting activation...]"
|
||||
call :dk_color %Red% "Checking BRANDING.XML [Not Found, aborting activation...]"
|
||||
exit /b
|
||||
)
|
||||
|
||||
if not defined _oIds (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking Installed Products [Product IDs not found. Aborting activation...]"
|
||||
call :dk_color %Red% "Checking Installed Products [Product IDs not found, aborting activation...]"
|
||||
exit /b
|
||||
)
|
||||
|
||||
@@ -1187,8 +1187,10 @@ reg delete "HKLM\SOFTWARE\Microsoft\Office\%%#.0\Common\OEM" /f /reg:32 %nul%
|
||||
)
|
||||
|
||||
reg delete "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Policies\0ff1ce15-a989-479d-af46-f275c6370663" /f %nul%
|
||||
reg delete "HKU\S-1-5-20\Software\Microsoft\OfficeSoftwareProtectionPlatform\Policies\0ff1ce15-a989-479d-af46-f275c6370663" /f %nul%
|
||||
reg delete "HKU\S-1-5-20\Software\Microsoft\OfficeSoftwareProtectionPlatform\Policies\59a52881-a989-479d-af46-f275c6370663" /f %nul%
|
||||
|
||||
echo Clearing Office License Blocks [Successfully Cleared From All %counter% Useraccounts]
|
||||
echo Clearing Office License Blocks [Successfully cleared from all %counter% user accounts]
|
||||
|
||||
::==========================
|
||||
|
||||
@@ -1206,7 +1208,7 @@ for %%# in (%_sidlist%) do (
|
||||
reg delete HKU\%%#\Software\Microsoft\Office\16.0\Common\Licensing\Resiliency /f %nul%
|
||||
reg add HKU\%%#\Software\Microsoft\Office\16.0\Common\Licensing\Resiliency /v "TimeOfLastHeartbeatFailure" /t REG_SZ /d "2040-01-01T00:00:00Z" /f %nul%
|
||||
)
|
||||
echo Adding Reg Keys To Skip License Check [Successfully Added To All %counter% ^& Future New Useraccounts]
|
||||
echo Adding Reg Keys to Skip License Check [Successfully added to all %counter% ^& future new user accounts]
|
||||
)
|
||||
|
||||
::==========================
|
||||
@@ -1220,14 +1222,14 @@ reg query HKU\%%# %nul% && set failedtounload=1
|
||||
|
||||
if defined failedtoload (
|
||||
set error=1
|
||||
call :dk_color %Red% "Loading Unloaded accounts Registry [Failed For Some Useraccounts]"
|
||||
call :dk_color %Blue% "Restart the system and try again."
|
||||
call :dk_color %Red% "Loading Unloaded Accounts Registry [Failed for some user accounts]"
|
||||
call :dk_color %Blue% "Reboot your machine using the restart option and try again."
|
||||
)
|
||||
|
||||
if defined failedtounload (
|
||||
set error=1
|
||||
call :dk_color %Red% "Unloading loaded accounts Registry [Failed For Some Useraccounts]"
|
||||
call :dk_color %Blue% "Restart the system and try again."
|
||||
call :dk_color %Red% "Unloading Loaded Account Registries [Failed for some user accounts]"
|
||||
call :dk_color %Blue% "Reboot your machine using the restart option and try again."
|
||||
)
|
||||
|
||||
exit /b
|
||||
@@ -1458,7 +1460,7 @@ function ReinstallLicenses() {
|
||||
|
||||
set _wmic=0
|
||||
for %%# in (wmic.exe) do @if not "%%~$PATH:#"=="" (
|
||||
wmic path Win32_ComputerSystem get CreationClassName /value %nul2% | find /i "computersystem" %nul1% && set _wmic=1
|
||||
cmd /c "wmic path Win32_ComputerSystem get CreationClassName /value" %nul2% | find /i "computersystem" %nul1% && set _wmic=1
|
||||
)
|
||||
exit /b
|
||||
|
||||
@@ -1522,7 +1524,7 @@ set pupfound=%pupfound1%%pupfound2%
|
||||
set hcount=0
|
||||
for %%# in (avira.com kaspersky.com virustotal.com mcafee.com) do (
|
||||
find /i "%%#" %SysPath%\drivers\etc\hosts %nul% && set /a hcount+=1)
|
||||
if %hcount%==4 set "results=[AV URLs are blocked in hosts]"
|
||||
if %hcount%==4 set "results=[Antivirus URLs are blocked in hosts]"
|
||||
|
||||
set wucount=0
|
||||
for %%# in (wuauserv) do (
|
||||
@@ -1531,7 +1533,7 @@ for %%G in (DependOnService Description DisplayName ErrorControl ImagePath Objec
|
||||
reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1 & set /a wucount+=1)
|
||||
)
|
||||
)
|
||||
if %wucount% GEQ 1 set "results=%results%[WU registry is corrupt]"
|
||||
if %wucount% GEQ 1 set "results=%results%[Windows Update registry is corrupt]"
|
||||
|
||||
sc start sppsvc %nul%
|
||||
echo "%errorlevel%" | findstr "577 225" %nul% && (
|
||||
@@ -1542,7 +1544,8 @@ if not exist %SysPath%\sppsvc.exe if not exist %SysPath%\alg.exe (set "results=%
|
||||
|
||||
if not "%results%%pupfound%"=="" (
|
||||
if defined pupfound call :dk_color %Gray% "Checking PUP Activators [Found%pupfound%]"
|
||||
if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection %results%"
|
||||
if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection..."
|
||||
if defined results call :dk_color %Red% "%results%"
|
||||
set fixes=%fixes% %mas%remove_mal%w%ware
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%remove_mal%w%ware"
|
||||
echo:
|
||||
@@ -1561,7 +1564,7 @@ call :dk_chkmal
|
||||
sc query Null %nul% || (
|
||||
set error=1
|
||||
set showfix=1
|
||||
call :dk_color %Red% "Checking Sandboxing [Found. Script may not work properly.]"
|
||||
call :dk_color %Red% "Checking Sandboxing [Found, script may not work properly.]"
|
||||
call :dk_color %Blue% "If you are using any third-party antivirus, check if it is blocking the script."
|
||||
echo:
|
||||
)
|
||||
@@ -1652,7 +1655,7 @@ if defined serv_e (
|
||||
set error=1
|
||||
call :dk_color %Red% "Starting Services [Failed] [%serv_e%]"
|
||||
echo %serv_e% | findstr /i "ClipSVC-1058 sppsvc-1058" %nul% && (
|
||||
call :dk_color %Blue% "Restart the system to fix this error."
|
||||
call :dk_color %Blue% "Reboot your machine using the restart option to fix this error."
|
||||
set showfix=1
|
||||
)
|
||||
)
|
||||
@@ -1692,7 +1695,7 @@ for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':w
|
||||
echo "%wpainfo%" | find /i "Error Found" %nul% && (
|
||||
set error=1
|
||||
set wpaerror=1
|
||||
call :dk_color %Red% "Checking WPA Registry Error [%wpainfo%]"
|
||||
call :dk_color %Red% "Checking WPA Registry Errors [%wpainfo%]"
|
||||
) || (
|
||||
echo Checking WPA Registry Count [%wpainfo%]
|
||||
)
|
||||
@@ -1731,7 +1734,7 @@ call :dk_color %Red% "Checking License Files [Not Found] [%osed
|
||||
|
||||
if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*-%osedition%-*.mum" (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking Package File [Not Found] [%osedition%]"
|
||||
call :dk_color %Red% "Checking Package Files [Not Found] [%osedition%]"
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1802,17 +1805,23 @@ echo Checking Eval WLMS Service [Found]
|
||||
|
||||
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking HKU\S-1-5-20 Reg [Not Found]"
|
||||
call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]"
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
)
|
||||
|
||||
|
||||
for %%# in (SppEx%w%tComObj.exe sppsvc.exe) do (
|
||||
for %%# in (SppEx%w%tComObj.exe sppsvc.exe sppsvc.exe\PerfOptions) do (
|
||||
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" %nul% && (if defined _sppint (set "_sppint=!_sppint!, %%#") else (set "_sppint=%%#"))
|
||||
)
|
||||
if defined _sppint (
|
||||
echo Checking SPP Interference In IFEO [%_sppint%]
|
||||
echo %_sppint% | find /i "PerfOptions" %nul% && (
|
||||
call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System might deactivate later]"
|
||||
if not defined showfix call :dk_color %Blue% "%_fixmsg%"
|
||||
set showfix=1
|
||||
) || (
|
||||
echo Checking SPP In IFEO [%_sppint%]
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -1827,7 +1836,7 @@ set error=1
|
||||
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Plugins\Objects\msft:rm/algorithm/hwid/4.0" /f ba02fed39662 /d %nul% || (
|
||||
call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found]"
|
||||
set fixes=%fixes% %mas%issues_due_to_gaming_spoofers
|
||||
call :dk_color2 %Blue% "Possibly Caused By Gaming Spoofers. Help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
|
||||
call :dk_color2 %Blue% "Most likely caused by HWID spoofers. Help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
|
||||
set error=1
|
||||
set showfix=1
|
||||
)
|
||||
@@ -1857,9 +1866,9 @@ set "d=!d! $AclObject.SetSecurityDescriptorSddlForm($sddl);"
|
||||
set "d=!d! Set-Acl -Path %tokenstore% -AclObject $AclObject;"
|
||||
%psc% "!d!" %nul%
|
||||
if exist "%tokenstore%\" (
|
||||
call :dk_color %Gray% "Checking SPP Token Folder [Not Found. Created Now] [%tokenstore%\]"
|
||||
call :dk_color %Gray% "Checking SPP Token Folder [Not Found, Created Now] [%tokenstore%\]"
|
||||
) else (
|
||||
call :dk_color %Red% "Checking SPP Token Folder [Not Found. Failed To Create] [%tokenstore%\]"
|
||||
call :dk_color %Red% "Checking SPP Token Folder [Not Found, Failed to Create] [%tokenstore%\]"
|
||||
set error=1
|
||||
set showfix=1
|
||||
)
|
||||
@@ -1893,7 +1902,7 @@ for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' -
|
||||
echo !taskinfo! | find /i "Ready" %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
|
||||
call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!]"
|
||||
call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, System might deactivate later]"
|
||||
)
|
||||
)
|
||||
|
||||
@@ -1908,7 +1917,13 @@ for %%# in (
|
||||
"HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform+SetValue"
|
||||
) do for /f "tokens=1,2 delims=+" %%A in (%%#) do if not defined permerror (
|
||||
%psc% "$acl = (Get-Acl '%%A' | fl | Out-String); if (-not ($acl -match 'NT SERVICE\\sppsvc Allow %%B') -or ($acl -match 'NT SERVICE\\sppsvc Deny')) {Exit 2}" %nul%
|
||||
if !errorlevel!==2 set permerror=Error_Found
|
||||
if !errorlevel!==2 (
|
||||
if "%%A"=="%tokenstore%" (
|
||||
set "permerror=Error Found In Token Folder"
|
||||
) else (
|
||||
set "permerror=Error Found In SPP Registries"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
REM https://learn.microsoft.com/office/troubleshoot/activation/license-issue-when-start-office-application
|
||||
@@ -1971,7 +1986,7 @@ if ($osVersion.Build -ge $minBuildNumber) {
|
||||
}
|
||||
for ($i=1; $i -le $count; $i++) {
|
||||
if (-not $subkeyHashTable.ContainsKey("$i")) {
|
||||
Write-Output "Total Keys $count. Error Found- $i key does not exist"
|
||||
Write-Output "Total Keys $count. Error Found - $i key does not exist."
|
||||
$wpaKey.Close()
|
||||
exit
|
||||
}
|
||||
@@ -1982,7 +1997,7 @@ $wpaKey.GetSubKeyNames() | ForEach-Object {
|
||||
if ($PSVersionTable.PSVersion.Major -lt 3) {
|
||||
cmd /c "reg query "HKLM\SYSTEM\WPA\$_" /ve /t REG_BINARY >nul 2>&1"
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Total Keys $count. Error Found- Binary Data is corrupt"
|
||||
Write-Host "Total Keys $count. Error Found - Binary Data is corrupt."
|
||||
$wpaKey.Close()
|
||||
exit
|
||||
}
|
||||
@@ -1990,7 +2005,7 @@ $wpaKey.GetSubKeyNames() | ForEach-Object {
|
||||
$subkey = $wpaKey.OpenSubKey($_)
|
||||
$p = $subkey.GetValueNames()
|
||||
if (($p | Where-Object { $subkey.GetValueKind($_) -eq [Microsoft.Win32.RegistryValueKind]::Binary }).Count -eq 0) {
|
||||
Write-Host "Total Keys $count. Error Found- Binary Data is corrupt"
|
||||
Write-Host "Total Keys $count. Error Found - Binary Data is corrupt."
|
||||
$wpaKey.Close()
|
||||
exit
|
||||
}
|
||||
@@ -2029,13 +2044,13 @@ echo:
|
||||
if %_unattended%==1 timeout /t 2 & exit /b
|
||||
|
||||
if defined fixes (
|
||||
call :dk_color2 %Blue% "Press [1] To Open Troubleshoot Page " %Gray% " Press [0] To Ignore"
|
||||
call :dk_color2 %Blue% "Press [1] to Open Troubleshoot Page " %Gray% " Press [0] to Ignore"
|
||||
choice /C:10 /N
|
||||
if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#))
|
||||
)
|
||||
|
||||
if defined terminal (
|
||||
call :dk_color %_Yellow% "Press 0 key to %_exitmsg%..."
|
||||
call :dk_color %_Yellow% "Press [0] key to %_exitmsg%..."
|
||||
choice /c 0 /n
|
||||
) else (
|
||||
call :dk_color %_Yellow% "Press any key to %_exitmsg%..."
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@set masver=2.6
|
||||
@set masver=2.7
|
||||
@echo off
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ set "_debug=0"
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Set Environment variables, it helps if they are misconfigured in the system
|
||||
:: Set environment variables, it helps if they are misconfigured in the system
|
||||
|
||||
setlocal EnableExtensions
|
||||
setlocal DisableDelayedExpansion
|
||||
@@ -191,13 +191,13 @@ call :dk_setvar
|
||||
if %winbuild% LSS 7600 (
|
||||
%nceline%
|
||||
echo Unsupported OS version detected [%winbuild%].
|
||||
echo Project is supported for Windows 7/8/8.1/10/11 and their Server equivalent.
|
||||
echo MAS only supports Windows 7/8/8.1/10/11 and their Server equivalents.
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Fix special characters limitation in path name
|
||||
:: Fix special character limitations in path name
|
||||
|
||||
set "_work=%~dp0"
|
||||
if "%_work:~-1%"=="\" set "_work=%_work:~0,-1%"
|
||||
@@ -217,8 +217,8 @@ setlocal EnableDelayedExpansion
|
||||
echo "!_batf!" | find /i "!_ttemp!" %nul1% && (
|
||||
if /i not "!_work!"=="!_ttemp!" (
|
||||
%eline%
|
||||
echo Script is launched from the temp folder,
|
||||
echo Most likely you are running the script directly from the archive file.
|
||||
echo The script was launched from the temp folder.
|
||||
echo You are most likely running the script directly from the archive file.
|
||||
echo:
|
||||
echo Extract the archive file and launch the script from the extracted folder.
|
||||
goto dk_done
|
||||
@@ -259,7 +259,7 @@ goto dk_done
|
||||
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b
|
||||
%eline%
|
||||
echo This script needs admin rights.
|
||||
echo To do so, right click on this script and select 'Run as administrator'.
|
||||
echo Right click on this script and select 'Run as administrator'.
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
@@ -312,20 +312,20 @@ set -=
|
||||
set old=
|
||||
|
||||
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 updatecheck.mass%-%grave.dev') do (
|
||||
if not [%%#]==[] (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.69.%masver%" %nul1% || set old=1))
|
||||
if not "%%#"=="" (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.69.%masver%" %nul1% || set old=1))
|
||||
)
|
||||
|
||||
if defined old (
|
||||
echo ________________________________________________
|
||||
%eline%
|
||||
echo Version %masver% of MAS is outdated.
|
||||
echo Your version of MAS [%masver%] is outdated.
|
||||
echo ________________________________________________
|
||||
echo:
|
||||
if not %_unattended%==1 (
|
||||
echo [1] Get Latest MAS
|
||||
echo [0] Continue Anyway
|
||||
echo:
|
||||
call :dk_color %_Green% "Enter a menu option in the Keyboard [1,0] :"
|
||||
call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :"
|
||||
choice /C:10 /N
|
||||
if !errorlevel!==2 rem
|
||||
if !errorlevel!==1 (start ht%-%tps://github.com/mass%-%gravel/Microsoft-Acti%-%vation-Scripts & start %mas% & exit /b)
|
||||
@@ -385,7 +385,7 @@ echo [9] Download Office
|
||||
echo [0] %_exitmsg%
|
||||
echo ______________________________________________________________
|
||||
echo:
|
||||
call :dk_color2 %_White% " " %_Green% "Enter a menu option in the Keyboard [1,2,3,4,5,6,7,8,9,0]"
|
||||
call :dk_color2 %_White% " " %_Green% "Choose a menu option using your keyboard [1,2,3,4,5,6,7,8,9,0]"
|
||||
choice /C:1234567890 /N
|
||||
set _el=!errorlevel!
|
||||
|
||||
@@ -420,7 +420,7 @@ call :dk_chkmal
|
||||
|
||||
if not exist %SysPath%\sppsvc.exe (
|
||||
%eline%
|
||||
echo [%SysPath%\sppsvc.exe] file is missing. Aborting...
|
||||
echo [%SysPath%\sppsvc.exe] file is missing, aborting...
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
@@ -452,7 +452,7 @@ call :dk_showosinfo
|
||||
|
||||
set _int=
|
||||
for %%a in (l.root-servers.net resolver1.opendns.com download.windowsupdate.com google.com) do if not defined _int (
|
||||
for /f "delims=[] tokens=2" %%# in ('ping -n 1 %%a') do (if not [%%#]==[] set _int=1)
|
||||
for /f "delims=[] tokens=2" %%# in ('ping -n 1 %%a') do (if not "%%#"=="" set _int=1)
|
||||
)
|
||||
|
||||
if not defined _int (
|
||||
@@ -508,7 +508,7 @@ if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-Server*EvalCorEditio
|
||||
|
||||
if defined _eval (
|
||||
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul2% | find /i "Eval" %nul1% && (
|
||||
call :dk_color %Red% "Checking Eval Edition [Evaluation Editions cannot be activated outside of evaluation period.]"
|
||||
call :dk_color %Red% "Checking Evaluation Edition [Evaluation editions cannot be activated outside of evaluation period.]"
|
||||
|
||||
if defined _evalserv (
|
||||
call :dk_color %Blue% "Go back to main menu and use [Change Edition] option."
|
||||
@@ -546,7 +546,7 @@ set /a UBR=0
|
||||
if %osSKU%==191 if defined altkey if defined altedition (
|
||||
for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v UBR %nul6%') do if not errorlevel 1 set /a UBR=%%b
|
||||
if %winbuild% LSS 22598 if !UBR! LSS 2788 (
|
||||
call :dk_color %Blue% "Windows must to be updated to build 19044.2788 or higher for IotEnterpriseS %KS% activation."
|
||||
call :dk_color %Blue% "Windows must be updated to build 19044.2788 or higher for IotEnterpriseS %KS% activation."
|
||||
)
|
||||
)
|
||||
|
||||
@@ -557,11 +557,11 @@ call :dk_color %Red% "Checking Alternate Edition For %KS% [%altedition% Act
|
||||
if not defined key if not defined _gvlk (
|
||||
echo [%winos% ^| %winbuild% ^| SKU:%osSKU%]
|
||||
if not defined skunotfound (
|
||||
echo This product does not support %KS% Activation.
|
||||
echo This product does not support %KS% activation.
|
||||
set fixes=%fixes% %mas%unsupported_products_activation
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%unsupported_products_activation"
|
||||
) else (
|
||||
echo Required License files not found in %SysPath%\spp\tokens\skus\
|
||||
echo Required license files not found in %SysPath%\spp\tokens\skus\
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
)
|
||||
@@ -574,7 +574,7 @@ goto :ks_office
|
||||
:: Install key
|
||||
|
||||
if defined changekey (
|
||||
call :dk_color %Blue% "[%altedition%] Edition product key will be used to enable %KS% activation."
|
||||
call :dk_color %Blue% "[%altedition%] edition product key will be used to enable %KS% activation."
|
||||
echo:
|
||||
)
|
||||
|
||||
@@ -1079,7 +1079,7 @@ set _prod=!_altoffid!
|
||||
call :ks_osppready
|
||||
)
|
||||
|
||||
if not [!key!]==[] (
|
||||
if not "!key!"=="" (
|
||||
echo "!allapps!" | find /i "!_actid!" %nul1% || call :oh_installlic
|
||||
call :dk_inskey "[!key!] [!_prod!]"
|
||||
) else (
|
||||
@@ -1119,8 +1119,8 @@ for /f "skip=2 tokens=2*" %%a in ('"reg query %2\Common\ProductVersion /v LastPr
|
||||
if "%_oRoot:~-1%"=="\" set "_oRoot=%_oRoot:~0,-1%"
|
||||
|
||||
echo "%2" | find /i "Wow6432Node" %nul1% && set _oArch=x86
|
||||
if not [%osarch%]==[x86] if not defined _oArch set _oArch=x64
|
||||
if [%osarch%]==[x86] set _oArch=x86
|
||||
if not "%osarch%"=="x86" if not defined _oArch set _oArch=x64
|
||||
if "%osarch%"=="x86" set _oArch=x86
|
||||
|
||||
set "_common=%CommonProgramFiles%"
|
||||
if defined PROCESSOR_ARCHITEW6432 set "_common=%CommonProgramW6432%"
|
||||
@@ -1288,8 +1288,10 @@ reg delete "HKLM\SOFTWARE\Microsoft\Office\%%#.0\Common\OEM" /f /reg:32 %nul%
|
||||
)
|
||||
|
||||
reg delete "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Policies\0ff1ce15-a989-479d-af46-f275c6370663" /f %nul%
|
||||
reg delete "HKU\S-1-5-20\Software\Microsoft\OfficeSoftwareProtectionPlatform\Policies\0ff1ce15-a989-479d-af46-f275c6370663" /f %nul%
|
||||
reg delete "HKU\S-1-5-20\Software\Microsoft\OfficeSoftwareProtectionPlatform\Policies\59a52881-a989-479d-af46-f275c6370663" /f %nul%
|
||||
|
||||
echo Clearing Office License Blocks [Successfully Cleared From All %counter% Useraccounts]
|
||||
echo Clearing Office License Blocks [Successfully cleared from all %counter% user accounts]
|
||||
|
||||
::==========================
|
||||
|
||||
@@ -1307,7 +1309,7 @@ for %%# in (%_sidlist%) do (
|
||||
reg delete HKU\%%#\Software\Microsoft\Office\16.0\Common\Licensing\Resiliency /f %nul%
|
||||
reg add HKU\%%#\Software\Microsoft\Office\16.0\Common\Licensing\Resiliency /v "TimeOfLastHeartbeatFailure" /t REG_SZ /d "2040-01-01T00:00:00Z" /f %nul%
|
||||
)
|
||||
echo Adding Reg Keys To Skip License Check [Successfully Added To All %counter% ^& Future New Useraccounts]
|
||||
echo Adding Reg Keys to Skip License Check [Successfully added to all %counter% ^& future new user accounts]
|
||||
)
|
||||
|
||||
::==========================
|
||||
@@ -1321,14 +1323,14 @@ reg query HKU\%%# %nul% && set failedtounload=1
|
||||
|
||||
if defined failedtoload (
|
||||
set error=1
|
||||
call :dk_color %Red% "Loading Unloaded accounts Registry [Failed For Some Useraccounts]"
|
||||
call :dk_color %Blue% "Restart the system and try again."
|
||||
call :dk_color %Red% "Loading Unloaded Accounts Registry [Failed for some user accounts]"
|
||||
call :dk_color %Blue% "Reboot your machine using the restart option and try again."
|
||||
)
|
||||
|
||||
if defined failedtounload (
|
||||
set error=1
|
||||
call :dk_color %Red% "Unloading loaded accounts Registry [Failed For Some Useraccounts]"
|
||||
call :dk_color %Blue% "Restart the system and try again."
|
||||
call :dk_color %Red% "Unloading Loaded Account Registries [Failed for some user accounts]"
|
||||
call :dk_color %Blue% "Reboot your machine using the restart option and try again."
|
||||
)
|
||||
|
||||
exit /b
|
||||
@@ -1540,7 +1542,7 @@ set t_name=Run Once Task
|
||||
|
||||
set _wmic=0
|
||||
for %%# in (wmic.exe) do @if not "%%~$PATH:#"=="" (
|
||||
wmic path Win32_ComputerSystem get CreationClassName /value 2>nul | find /i "computersystem" 1>nul && set _wmic=1
|
||||
cmd /c "wmic path Win32_ComputerSystem get CreationClassName /value" 2>nul | find /i "computersystem" 1>nul && set _wmic=1
|
||||
)
|
||||
|
||||
setlocal EnableDelayedExpansion
|
||||
@@ -1565,12 +1567,12 @@ call :_tasksetserv
|
||||
|
||||
for %%a in (%srvlist%) do (
|
||||
for /f "delims=[] tokens=2" %%# in ('ping -n 1 %%a') do (
|
||||
if not [%%#]==[] goto _taskIntConnected
|
||||
if not "%%#"=="" goto _taskIntConnected
|
||||
)
|
||||
)
|
||||
|
||||
nslookup dns.msftncsi.com 2>nul | find "131.107.255.255" 1>nul
|
||||
if [%errorlevel%]==[0] goto _taskIntConnected
|
||||
if "%errorlevel%"=="0" goto _taskIntConnected
|
||||
|
||||
if %loop%==%max_loop% (
|
||||
set _tserror=1
|
||||
@@ -1681,14 +1683,14 @@ set /a act_attempt=0
|
||||
|
||||
if %act_attempt% GTR 4 exit /b
|
||||
|
||||
if not [%act_ok%]==[1] (
|
||||
if not "%act_ok%"=="1" (
|
||||
if not defined _server call :_taskgetserv
|
||||
call :_taskregserv
|
||||
)
|
||||
|
||||
if not !server_num! GTR %max_servers% (
|
||||
|
||||
if [%1]==[act_win] if %_kms38% EQU 1 (
|
||||
if "%1"=="act_win" if %_kms38% EQU 1 (
|
||||
set act_ok=1
|
||||
exit /b
|
||||
)
|
||||
@@ -1702,7 +1704,7 @@ if !errorcode! EQU 0 (
|
||||
set act_ok=1
|
||||
exit /b
|
||||
)
|
||||
if [%1]==[act_win] if !errorcode! EQU -1073418187 if %winbuild% LSS 9200 (
|
||||
if "%1"=="act_win" if !errorcode! EQU -1073418187 if %winbuild% LSS 9200 (
|
||||
set act_ok=1
|
||||
exit /b
|
||||
)
|
||||
@@ -1717,9 +1719,9 @@ exit /b
|
||||
|
||||
:_actinfo
|
||||
|
||||
if [%1]==[act_win] if not defined t_name (set prodname=%winos%)
|
||||
if "%1"=="act_win" if not defined t_name (set prodname=%winos%)
|
||||
|
||||
if [%1]==[act_win] if %_kms38% EQU 1 (
|
||||
if "%1"=="act_win" if %_kms38% EQU 1 (
|
||||
if defined t_name (
|
||||
echo %prodname% is already activated with KMS38.
|
||||
) else (
|
||||
@@ -1739,7 +1741,7 @@ set _tserror=1
|
||||
exit /b
|
||||
)
|
||||
|
||||
if %errorcode% EQU -1073418187 if [%1]==[act_win] if %winbuild% LSS 9200 (
|
||||
if %errorcode% EQU -1073418187 if "%1"=="act_win" if %winbuild% LSS 9200 (
|
||||
if defined t_name (
|
||||
echo %prodname% cannot be KMS-activated on this computer due to unqualified OEM BIOS [0xC004F035].
|
||||
) else (
|
||||
@@ -1784,9 +1786,9 @@ exit /b
|
||||
)
|
||||
|
||||
set _actpass=1
|
||||
if %gpr% EQU 43200 if [%1]==[act_win] if %winbuild% GEQ 9200 set _actpass=0
|
||||
if %gpr% EQU 43200 if "%1"=="act_win" if %winbuild% GEQ 9200 set _actpass=0
|
||||
if %gpr% EQU 64800 set _actpass=0
|
||||
if %gpr% GTR 259200 if [%1]==[act_win] call :_taskchkEnterpriseG _actpass
|
||||
if %gpr% GTR 259200 if "%1"=="act_win" call :_taskchkEnterpriseG _actpass
|
||||
if %gpr% EQU 259200 set _actpass=0
|
||||
|
||||
if %errorcode% EQU 0 if %_actpass% EQU 0 (
|
||||
@@ -1990,8 +1992,8 @@ set !server%rand%!=1
|
||||
|
||||
set /a server_num+=1
|
||||
(for /f "delims=[] tokens=2" %%a in ('ping -4 -n 1 %KMS_IP% 2^>nul') do set "KMS_IP=%%a"
|
||||
if [%KMS_IP%]==[!KMS_IP!] for /f "delims=[] tokens=2" %%# in ('pathping -4 -h 1 -n -p 1 -q 1 -w 1 %KMS_IP% 2^>nul') do set "KMS_IP=%%#"
|
||||
if not [%KMS_IP%]==[!KMS_IP!] exit /b
|
||||
if "%KMS_IP%"=="!KMS_IP!" for /f "delims=[] tokens=2" %%# in ('pathping -4 -h 1 -n -p 1 -q 1 -w 1 %KMS_IP% 2^>nul') do set "KMS_IP=%%#"
|
||||
if not "%KMS_IP%"=="!KMS_IP!" exit /b
|
||||
goto :_taskgetserv
|
||||
)
|
||||
::Ver:2.7
|
||||
@@ -2446,7 +2448,7 @@ function ReinstallLicenses() {
|
||||
|
||||
set _wmic=0
|
||||
for %%# in (wmic.exe) do @if not "%%~$PATH:#"=="" (
|
||||
wmic path Win32_ComputerSystem get CreationClassName /value %nul2% | find /i "computersystem" %nul1% && set _wmic=1
|
||||
cmd /c "wmic path Win32_ComputerSystem get CreationClassName /value" %nul2% | find /i "computersystem" %nul1% && set _wmic=1
|
||||
)
|
||||
exit /b
|
||||
|
||||
@@ -2546,7 +2548,7 @@ for %%# in (pkeyhelper.dll) do @if "%%~$PATH:#"=="" exit /b
|
||||
for %%# in (Volume:GVLK) do (
|
||||
call :k_pkey %osSKU% '%%#'
|
||||
if defined pkey call :k_pkeychannel !pkey!
|
||||
if /i [!pkeychannel!]==[%%#] (
|
||||
if /i "!pkeychannel!"=="%%#" (
|
||||
set key=!pkey!
|
||||
exit /b
|
||||
)
|
||||
@@ -2571,7 +2573,7 @@ set pupfound=%pupfound1%%pupfound2%
|
||||
set hcount=0
|
||||
for %%# in (avira.com kaspersky.com virustotal.com mcafee.com) do (
|
||||
find /i "%%#" %SysPath%\drivers\etc\hosts %nul% && set /a hcount+=1)
|
||||
if %hcount%==4 set "results=[AV URLs are blocked in hosts]"
|
||||
if %hcount%==4 set "results=[Antivirus URLs are blocked in hosts]"
|
||||
|
||||
set wucount=0
|
||||
for %%# in (wuauserv) do (
|
||||
@@ -2580,7 +2582,7 @@ for %%G in (DependOnService Description DisplayName ErrorControl ImagePath Objec
|
||||
reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1 & set /a wucount+=1)
|
||||
)
|
||||
)
|
||||
if %wucount% GEQ 1 set "results=%results%[WU registry is corrupt]"
|
||||
if %wucount% GEQ 1 set "results=%results%[Windows Update registry is corrupt]"
|
||||
|
||||
sc start sppsvc %nul%
|
||||
echo "%errorlevel%" | findstr "577 225" %nul% && (
|
||||
@@ -2591,7 +2593,8 @@ if not exist %SysPath%\sppsvc.exe if not exist %SysPath%\alg.exe (set "results=%
|
||||
|
||||
if not "%results%%pupfound%"=="" (
|
||||
if defined pupfound call :dk_color %Gray% "Checking PUP Activators [Found%pupfound%]"
|
||||
if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection %results%"
|
||||
if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection..."
|
||||
if defined results call :dk_color %Red% "%results%"
|
||||
set fixes=%fixes% %mas%remove_mal%w%ware
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%remove_mal%w%ware"
|
||||
echo:
|
||||
@@ -2610,7 +2613,7 @@ call :dk_chkmal
|
||||
sc query Null %nul% || (
|
||||
set error=1
|
||||
set showfix=1
|
||||
call :dk_color %Red% "Checking Sandboxing [Found. Script may not work properly.]"
|
||||
call :dk_color %Red% "Checking Sandboxing [Found, script may not work properly.]"
|
||||
call :dk_color %Blue% "If you are using any third-party antivirus, check if it is blocking the script."
|
||||
echo:
|
||||
)
|
||||
@@ -2701,7 +2704,7 @@ if defined serv_e (
|
||||
set error=1
|
||||
call :dk_color %Red% "Starting Services [Failed] [%serv_e%]"
|
||||
echo %serv_e% | findstr /i "ClipSVC-1058 sppsvc-1058" %nul% && (
|
||||
call :dk_color %Blue% "Restart the system to fix this error."
|
||||
call :dk_color %Blue% "Reboot your machine using the restart option to fix this error."
|
||||
set showfix=1
|
||||
)
|
||||
)
|
||||
@@ -2741,7 +2744,7 @@ for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':w
|
||||
echo "%wpainfo%" | find /i "Error Found" %nul% && (
|
||||
set error=1
|
||||
set wpaerror=1
|
||||
call :dk_color %Red% "Checking WPA Registry Error [%wpainfo%]"
|
||||
call :dk_color %Red% "Checking WPA Registry Errors [%wpainfo%]"
|
||||
) || (
|
||||
echo Checking WPA Registry Count [%wpainfo%]
|
||||
)
|
||||
@@ -2780,7 +2783,7 @@ call :dk_color %Red% "Checking License Files [Not Found] [%osed
|
||||
|
||||
if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*-%osedition%-*.mum" (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking Package File [Not Found] [%osedition%]"
|
||||
call :dk_color %Red% "Checking Package Files [Not Found] [%osedition%]"
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2851,17 +2854,23 @@ echo Checking Eval WLMS Service [Found]
|
||||
|
||||
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking HKU\S-1-5-20 Reg [Not Found]"
|
||||
call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]"
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
)
|
||||
|
||||
|
||||
for %%# in (SppEx%w%tComObj.exe sppsvc.exe) do (
|
||||
for %%# in (SppEx%w%tComObj.exe sppsvc.exe sppsvc.exe\PerfOptions) do (
|
||||
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" %nul% && (if defined _sppint (set "_sppint=!_sppint!, %%#") else (set "_sppint=%%#"))
|
||||
)
|
||||
if defined _sppint (
|
||||
echo Checking SPP Interference In IFEO [%_sppint%]
|
||||
echo %_sppint% | find /i "PerfOptions" %nul% && (
|
||||
call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System might deactivate later]"
|
||||
if not defined showfix call :dk_color %Blue% "%_fixmsg%"
|
||||
set showfix=1
|
||||
) || (
|
||||
echo Checking SPP In IFEO [%_sppint%]
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -2876,7 +2885,7 @@ set error=1
|
||||
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Plugins\Objects\msft:rm/algorithm/hwid/4.0" /f ba02fed39662 /d %nul% || (
|
||||
call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found]"
|
||||
set fixes=%fixes% %mas%issues_due_to_gaming_spoofers
|
||||
call :dk_color2 %Blue% "Possibly Caused By Gaming Spoofers. Help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
|
||||
call :dk_color2 %Blue% "Most likely caused by HWID spoofers. Help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
|
||||
set error=1
|
||||
set showfix=1
|
||||
)
|
||||
@@ -2906,9 +2915,9 @@ set "d=!d! $AclObject.SetSecurityDescriptorSddlForm($sddl);"
|
||||
set "d=!d! Set-Acl -Path %tokenstore% -AclObject $AclObject;"
|
||||
%psc% "!d!" %nul%
|
||||
if exist "%tokenstore%\" (
|
||||
call :dk_color %Gray% "Checking SPP Token Folder [Not Found. Created Now] [%tokenstore%\]"
|
||||
call :dk_color %Gray% "Checking SPP Token Folder [Not Found, Created Now] [%tokenstore%\]"
|
||||
) else (
|
||||
call :dk_color %Red% "Checking SPP Token Folder [Not Found. Failed To Create] [%tokenstore%\]"
|
||||
call :dk_color %Red% "Checking SPP Token Folder [Not Found, Failed to Create] [%tokenstore%\]"
|
||||
set error=1
|
||||
set showfix=1
|
||||
)
|
||||
@@ -2942,7 +2951,7 @@ for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' -
|
||||
echo !taskinfo! | find /i "Ready" %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
|
||||
call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!]"
|
||||
call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, System might deactivate later]"
|
||||
)
|
||||
)
|
||||
|
||||
@@ -2957,7 +2966,13 @@ for %%# in (
|
||||
"HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform+SetValue"
|
||||
) do for /f "tokens=1,2 delims=+" %%A in (%%#) do if not defined permerror (
|
||||
%psc% "$acl = (Get-Acl '%%A' | fl | Out-String); if (-not ($acl -match 'NT SERVICE\\sppsvc Allow %%B') -or ($acl -match 'NT SERVICE\\sppsvc Deny')) {Exit 2}" %nul%
|
||||
if !errorlevel!==2 set permerror=Error_Found
|
||||
if !errorlevel!==2 (
|
||||
if "%%A"=="%tokenstore%" (
|
||||
set "permerror=Error Found In Token Folder"
|
||||
) else (
|
||||
set "permerror=Error Found In SPP Registries"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
REM https://learn.microsoft.com/office/troubleshoot/activation/license-issue-when-start-office-application
|
||||
@@ -3020,7 +3035,7 @@ if ($osVersion.Build -ge $minBuildNumber) {
|
||||
}
|
||||
for ($i=1; $i -le $count; $i++) {
|
||||
if (-not $subkeyHashTable.ContainsKey("$i")) {
|
||||
Write-Output "Total Keys $count. Error Found- $i key does not exist"
|
||||
Write-Output "Total Keys $count. Error Found - $i key does not exist."
|
||||
$wpaKey.Close()
|
||||
exit
|
||||
}
|
||||
@@ -3031,7 +3046,7 @@ $wpaKey.GetSubKeyNames() | ForEach-Object {
|
||||
if ($PSVersionTable.PSVersion.Major -lt 3) {
|
||||
cmd /c "reg query "HKLM\SYSTEM\WPA\$_" /ve /t REG_BINARY >nul 2>&1"
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Total Keys $count. Error Found- Binary Data is corrupt"
|
||||
Write-Host "Total Keys $count. Error Found - Binary Data is corrupt."
|
||||
$wpaKey.Close()
|
||||
exit
|
||||
}
|
||||
@@ -3039,7 +3054,7 @@ $wpaKey.GetSubKeyNames() | ForEach-Object {
|
||||
$subkey = $wpaKey.OpenSubKey($_)
|
||||
$p = $subkey.GetValueNames()
|
||||
if (($p | Where-Object { $subkey.GetValueKind($_) -eq [Microsoft.Win32.RegistryValueKind]::Binary }).Count -eq 0) {
|
||||
Write-Host "Total Keys $count. Error Found- Binary Data is corrupt"
|
||||
Write-Host "Total Keys $count. Error Found - Binary Data is corrupt."
|
||||
$wpaKey.Close()
|
||||
exit
|
||||
}
|
||||
@@ -3078,13 +3093,13 @@ echo:
|
||||
if %_unattended%==1 timeout /t 2 & exit /b
|
||||
|
||||
if defined fixes (
|
||||
call :dk_color2 %Blue% "Press [1] To Open Troubleshoot Page " %Gray% " Press [0] To Ignore"
|
||||
call :dk_color2 %Blue% "Press [1] to Open Troubleshoot Page " %Gray% " Press [0] to Ignore"
|
||||
choice /C:10 /N
|
||||
if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#))
|
||||
)
|
||||
|
||||
if defined terminal (
|
||||
call :dk_color %_Yellow% "Press 0 key to %_exitmsg%..."
|
||||
call :dk_color %_Yellow% "Press [0] key to %_exitmsg%..."
|
||||
choice /c 0 /n
|
||||
) else (
|
||||
call :dk_color %_Yellow% "Press any key to %_exitmsg%..."
|
||||
@@ -3362,80 +3377,6 @@ a78b8bd9-8017-4df5-b86a-09f756affa7c_6TPJF-RBVHG-WBW2R-86QPH-6R%f%TM4__17_Server
|
||||
cda18cf3-c196-46ad-b289-60c072869994_TT8MH-CG224-D3D7Q-498W2-9Q%f%CTX__18_ServerHPC
|
||||
a78b8bd9-8017-4df5-b86a-09f756affa7c_6TPJF-RBVHG-WBW2R-86QPH-6R%f%TM4__29_ServerWebCore
|
||||
f772515c-0e87-48d5-a676-e6962c3e1195_736RG-XDKJK-V34PF-BHK87-J6%f%X3K__56_ServerEmbeddedSolution
|
||||
:: Old Preview editions - Generated keys
|
||||
43f2ab05-7c87-4d56-b27c-44d0f9a3dabd_JDTNC-PP77T-T9H2W-G4J2J-VH%f%7MW___4_Enterprise
|
||||
cde952c7-2f96-4d9d-8f2b-2d349f64fc51_VHF9H-NXBBB-63VJD-4V8GJ-2R%f%YK8___4_Enterprise
|
||||
2a4403df-877f-4046-8271-db6fb6ec54c8_N896F-VG44B-HF8HC-XW23F-MW%f%8YB___4_Enterprise
|
||||
d3872724-5c08-4b1b-91f2-fc9eafed4990_3NMDC-G7C3W-68RGP-CQK9H-B7%f%QK9___7_ServerStandard
|
||||
ba947c44-d19d-4786-b6ae-22770bc94c54_T8N4T-C6P4F-W48KM-CYJT9-KP%f%69Y___8_ServerDatacenter
|
||||
8a409d61-30fe-4903-bdbc-1fb28603ba3a_NBBBB-BBBBB-BBBBB-BPTW9-H4%f%83R__10_ServerEnterprise
|
||||
e5676f13-9b66-4a1f-8b0c-43490e236202_RN84D-7HCWY-FTCBK-J3GHK-RM%f%YVT__17_ServerWeb
|
||||
2412bea9-b6e0-441e-8dc2-a13720b42de9_2FNVD-CPYC6-WXD8M-VJKXF-GX%f%TCB__18_ServerHPC
|
||||
6ae51eeb-c268-4a21-9aae-df74c38b586d_RN3QB-GT6D7-YB3VH-F3RPB-3G%f%P42__27_EnterpriseN
|
||||
c23947f3-3f2e-401f-a38c-f38fe0ecb0bd_NKX82-GPWWM-C2KPY-VG78C-FF%f%9R9__27_EnterpriseN
|
||||
ff808201-fec6-4fd4-ae16-abbddade5706_CC6JP-VN67C-8KCJ4-4V48V-HX%f%M9B__48_Professional
|
||||
a4383e6b-dada-423d-a43d-f25678429676_Q8MK8-DNHMX-2XWHV-X66TM-CD%f%G33__48_Professional
|
||||
34260150-69ac-49a3-8a0d-4a403ab55763_TNYKV-X79V3-CPD6X-Y2MRW-D9%f%M9H__49_ProfessionalN
|
||||
64192251-81b0-4898-ac63-913cc3edf919_9CYB3-NFMRW-YFDG6-XRQFD-J4%f%YPJ__49_ProfessionalN
|
||||
2b9c337f-7a1d-4271-90a3-c6855a2b8a1c_992NC-RYK89-M9XBG-4DCB3-GF%f%XVK__74_Prerelease
|
||||
bfa6b683-56be-47b8-a22e-461b27b9cf11_2WFGX-YXN3B-BT46K-4DPYX-T8%f%W2J__76_ServerMultiPointStandard
|
||||
bc20fb5b-4097-484f-84d2-55b18dac95eb_CQN7Q-KH97X-TH9G4-JRGWM-R6%f%T86__77_ServerMultiPointPremium
|
||||
631ead72-a8ab-4df8-bbdf-372029989bdd_N92MW-K723D-FCBCQ-CGPPQ-3M%f%9VR__81_PrereleaseARM
|
||||
9cc2564c-292e-4d8a-b9f9-1f5007d9409a_82CNJ-W82TW-BY23W-BVJ6W-W4%f%2Y2__86_EmbeddedIndustryA
|
||||
c35a9336-fb02-48db-8f4d-245c17f03667_NXTJV-CRQYQ-W77JR-GG84R-HQ%f%VHX__89_EmbeddedIndustry
|
||||
4daf1e3e-6be9-4848-8f5a-a18a0d2895e1_7MNJY-B88MV-WQKVP-BQ6DK-6C%f%M4G__91_EmbeddedIndustryE
|
||||
c8cca3ca-bea8-4f6f-87e0-4d050ce8f0a9_RNPX3-4GPFM-2DHXB-8WD8P-4R%f%DQX__91_EmbeddedIndustryE
|
||||
5ca3e488-dbae-4fae-8282-a98fbcd21126_HM9NW-WY98Q-XDF7H-3QV6B-X4%f%QFF__91_EmbeddedIndustryE
|
||||
b554b49f-4d57-4f08-955e-87886f514d49_4QC36-NW3YH-D2Y9D-RJPC7-VV%f%BDF__97_CoreARM
|
||||
3a9a9414-24bf-4836-866d-ba13a298efb0_4K89N-FMV8W-B3F9T-HKF64-DJ%f%X27__97_CoreARM
|
||||
4dfd543d-caa6-4f69-a95f-5ddfe2b89567_KG3N2-VRJ6F-P36TD-6MMCF-PP%f%QX7__98_CoreN
|
||||
c6e3410d-e48d-41eb-8ca9-848397f46d02_3TGHP-NHXHM-2PMXX-8KR9M-G2%f%782__98_CoreN
|
||||
5fe40dd6-cf1f-4cf2-8729-92121ac2e997_XFNM6-P9FYP-MRF6P-MM6V2-27%f%KDP__99_CoreCountrySpecific
|
||||
c7a8a09a-571c-4ea8-babc-0cbe4d48a89d_H76BG-QBNM2-QRWJY-67W73-BG%f%7CQ__99_CoreCountrySpecific
|
||||
2cc171ef-db48-4adc-af09-7c574b37f139_N47PH-2Y8Q8-DGMMV-3PGD8-WB%f%6Q2_100_CoreSingleLanguage
|
||||
b148c3f4-6248-4d2f-8c6d-31cce7ae95c3_N9722-BV9H6-WTJTT-FPB93-97%f%3PR_100_CoreSingleLanguage
|
||||
903663f7-d2ab-49c9-8942-14aa9e0a9c72_VWCNX-7FKBD-FHJYG-XBR4B-88%f%GQH_101_Core
|
||||
6496e59d-89dc-49eb-a353-09ceb9404845_HRNH7-WFBYW-BV7M2-XCT6H-X7%f%3PT_101_Core
|
||||
cc17e18a-fa93-43d6-9179-72950a1e931a_FDF9N-KGHKC-R9G6Y-W2TGC-9Q%f%CCB_103_ProfessionalWMC
|
||||
cf59a07b-1a2a-4be0-bfe0-423b5823e663_FDF9N-KGHKC-R9G6Y-W2TGC-9P%f%787_103_ProfessionalWMC
|
||||
827a0032-dced-4609-ab6e-16b9d8a40280_CC92N-X2Y7W-H4H32-QHV2X-3R%f%TT9_111_CoreConnected
|
||||
c436def1-0dcc-4849-9a59-8b6142eb70f3_2FNVD-CPYC6-WXD8M-T64BF-84%f%3GJ_111_CoreConnected
|
||||
49066601-00dc-4d2c-83a8-4343a7b990d1_CF9DD-6CNW2-BJWJQ-CVCFX-Y7%f%WMR_112_ProfessionalStudent
|
||||
fd5ae385-f5cf-4b53-b1fa-1af6fff7c0d8_HJN63-7Q4G4-VDW7X-TRMW8-GV%f%H3Q_112_ProfessionalStudent
|
||||
f18bbe32-16dc-48d4-a27b-5f3966f82513_KJ3DB-VNXVJ-GJG94-RX4RF-K4%f%TVG_113_CoreConnectedN
|
||||
86f72c8d-8363-4188-b574-1a53cb374711_JGRP6-TNJWX-KQWHJ-6D3FJ-RX%f%73B_113_CoreConnectedN
|
||||
bd64ebf7-d5ec-44c5-ba00-6813441c8c87_4K89N-FMV8W-B3F9T-HKF64-DJ%f%34M_114_ProfessionalStudentN
|
||||
687f6358-6a21-453a-a712-3b3b57123827_3K4DY-NVP2W-H8DGV-42K3B-2P%f%PK9_114_ProfessionalStudentN
|
||||
964a60f6-1505-4ddb-af03-6a9ce6997d3b_NKX82-GPWWM-C2KPY-T4PKC-7C%f%FYJ_115_CoreConnectedSingleLanguage
|
||||
5b120df4-ea3f-4e82-b0c0-6568f719730e_2N382-D6PKK-QTX4D-2JJYK-M9%f%73H_115_CoreConnectedSingleLanguage
|
||||
b5fe5eaa-14cc-4075-84ae-57c0206d1133_BJMNR-F3WG7-H8W83-27XXK-P3%f%8MC_116_CoreConnectedCountrySpecific
|
||||
a8651bfb-7fe0-40df-b156-87337ecd5acc_RPM6J-N62DM-DC6XH-2JXMG-23%f%66R_116_CoreConnectedCountrySpecific
|
||||
5b2add49-b8f4-42e0-a77c-adad4efeeeb1_NT3V6-XMBK7-Q66MF-VMKR4-FC%f%26C_119_PPIPro
|
||||
af43f7f0-3b1e-4266-a123-1fdb53f4323b_BNJR8-P8QHP-VQ4QY-MVPQP-8X%f%C37_121_Education
|
||||
e8ced63e-420d-4ab6-8723-aaf165efb5eb_QBQ3Q-2NC74-MKH8F-DTQ34-QG%f%M3G_121_Education
|
||||
075aca1f-05d7-42e5-a3ce-e349e7be7078_RFNBP-FDD7Q-6FHYQ-9M9Y7-MB%f%JH3_122_EducationN
|
||||
3885bca5-11c1-4d4e-9395-df38f7f09a0e_7MFGN-34DMC-J8FCR-P4DKH-KH%f%J8F_122_EducationN
|
||||
b995b62c-eae2-40aa-afb9-111889a84ef4_DW99Y-H7NT6-6B29D-8JQ8F-R3%f%K6T_124_ServerHI
|
||||
2cf5af84-abab-4ff0-83f8-f040fb2576eb_NVYRQ-D2F32-6HGXW-DKGWM-R6%f%Y8H_125_EnterpriseS
|
||||
75d003b0-dc66-42c0-b3a1-308a3f35741a_FQ32Q-MN6JD-FPVJ9-HJD4W-PK%f%CWY_125_EnterpriseS
|
||||
11a37f09-fb7f-4002-bd84-f3ae71d11e90_NMBY8-V3CV7-BX6K6-2922Y-43%f%MCH_126_EnterpriseSN
|
||||
4e4d5504-e7b1-419c-913d-3c80c15294fc_KGR4C-FWN4D-33RTK-XB6Q8-K2%f%FPT_126_EnterpriseSN
|
||||
b15187db-11c6-4f13-91ca-8121cebf5b88_JBDKF-6NCD6-49K3G-2TV79-BK%f%PB4_127_ProfessionalS
|
||||
aa234c15-ee34-4e5f-adb5-73afafb77143_DNJYG-CM8W6-4W3TX-VCK66-FV%f%WCC_127_ProfessionalS
|
||||
6cdbc9fb-63f5-431b-a5c0-c6f19ae26a9b_2NWVW-QGF4T-9CPMB-WYDQ9-7X%f%PB8_128_ProfessionalSN
|
||||
9f6a1bc9-5278-4991-88c9-7301c87a75ea_XB9DG-NPJ72-XRH69-7DF3Q-G8%f%3R4_128_ProfessionalSN
|
||||
:: Missing keys for old preview editions
|
||||
:: 38fbe2ac-465a-4ef7-b9d8-72044f2792b6 4 Enterprise
|
||||
:: ea77973e-4930-4fa1-a899-02dfaeada1db 4 Enterprise
|
||||
:: 92374131-ed4c-4d1b-846a-32f43c3eb90d 7 ServerStandard
|
||||
:: cc64c548-1867-4777-a1cc-0022691bc2a0 8 ServerDatacenter
|
||||
:: 9dce1f29-bb10-4be0-8027-35b953dd46d5 10 ServerEnterprise
|
||||
:: bf9eda2f-74cc-4ba3-8967-cde30f18c230 15 ServerEnterpriseIA64
|
||||
:: 4f4cfa6c-76d8-49f5-9c41-0a57f8af1bbc 17 ServerWeb
|
||||
:: 8372b47d-5221-41d8-88d0-3f924e50623e 18 ServerHPC
|
||||
:: e4ecef68-4372-4740-98e8-6c157cd301c2 27 EnterpriseN
|
||||
:: 957ec1e8-97cd-42a8-a091-01a30cf779da 48 Professional
|
||||
:: 0ff4e536-a746-4018-b107-e81dd0b6d33a 49 ProfessionalN
|
||||
::========================================================================================================================================
|
||||
:: Office 2010
|
||||
8ce7e872-188c-4b98-9d90-f8f90b7aad02_V7Y44-9T38C-R2VJK-666HK-T7%f%DDX__14_AccessVL
|
||||
|
||||
1339
MAS/Separate-Files-Version/Change_Office_Edition.cmd
Normal file
1339
MAS/Separate-Files-Version/Change_Office_Edition.cmd
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
@set masver=2.6
|
||||
@set masver=2.7
|
||||
@echo off
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ set _stg=0
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Set Environment variables, it helps if they are misconfigured in the system
|
||||
:: Set environment variables, it helps if they are misconfigured in the system
|
||||
|
||||
setlocal EnableExtensions
|
||||
setlocal DisableDelayedExpansion
|
||||
@@ -127,13 +127,13 @@ set "line=echo _________________________________________________________________
|
||||
if %winbuild% LSS 7600 (
|
||||
%nceline%
|
||||
echo Unsupported OS version detected [%winbuild%].
|
||||
echo Project is supported only for Windows 7/8/8.1/10/11 and their Server equivalent.
|
||||
echo Project is supported only for Windows 7/8/8.1/10/11 and their Server equivalents.
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Fix special characters limitation in path name
|
||||
:: Fix special character limitations in path name
|
||||
|
||||
set "_work=%~dp0"
|
||||
if "%_work:~-1%"=="\" set "_work=%_work:~0,-1%"
|
||||
@@ -153,8 +153,8 @@ setlocal EnableDelayedExpansion
|
||||
echo "!_batf!" | find /i "!_ttemp!" %nul1% && (
|
||||
if /i not "!_work!"=="!_ttemp!" (
|
||||
%eline%
|
||||
echo Script is launched from the temp folder,
|
||||
echo Most likely you are running the script directly from the archive file.
|
||||
echo The script was launched from the temp folder.
|
||||
echo You are most likely running the script directly from the archive file.
|
||||
echo:
|
||||
echo Extract the archive file and launch the script from the extracted folder.
|
||||
goto dk_done
|
||||
@@ -195,7 +195,7 @@ goto dk_done
|
||||
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b
|
||||
%eline%
|
||||
echo This script needs admin rights.
|
||||
echo To do so, right click on this script and select 'Run as administrator'.
|
||||
echo Right click on this script and select 'Run as administrator'.
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
@@ -248,20 +248,20 @@ set -=
|
||||
set old=
|
||||
|
||||
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 updatecheck.mass%-%grave.dev') do (
|
||||
if not [%%#]==[] (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.69.%masver%" %nul1% || set old=1))
|
||||
if not "%%#"=="" (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.69.%masver%" %nul1% || set old=1))
|
||||
)
|
||||
|
||||
if defined old (
|
||||
echo ________________________________________________
|
||||
%eline%
|
||||
echo Version %masver% of MAS is outdated.
|
||||
echo Your version of MAS [%masver%] is outdated.
|
||||
echo ________________________________________________
|
||||
echo:
|
||||
if not %_unattended%==1 (
|
||||
echo [1] Get Latest MAS
|
||||
echo [0] Continue Anyway
|
||||
echo:
|
||||
call :dk_color %_Green% "Enter a menu option in the Keyboard [1,0] :"
|
||||
call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :"
|
||||
choice /C:10 /N
|
||||
if !errorlevel!==2 rem
|
||||
if !errorlevel!==1 (start ht%-%tps://github.com/mass%-%gravel/Microsoft-Acti%-%vation-Scripts & start %mas% & exit /b)
|
||||
@@ -280,7 +280,7 @@ if not defined desktop for /f "delims=" %%a in ('%psc% "& {write-host $([Environ
|
||||
|
||||
if not defined desktop (
|
||||
%eline%
|
||||
echo Desktop location was not detected, aborting...
|
||||
echo Unable to detect Desktop location, aborting...
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
@@ -302,7 +302,7 @@ dism.exe
|
||||
) do (
|
||||
if not exist %SysPath%\%%# (
|
||||
%eline%
|
||||
echo [%SysPath%\%%#] file is missing. Aborting...
|
||||
echo [%SysPath%\%%#] file is missing, aborting...
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
@@ -335,7 +335,7 @@ if defined UBR (set "fullbuild=%%G.!UBR!") else (set "fullbuild=%%G.%%H")
|
||||
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
||||
if not defined apps (
|
||||
%eline%
|
||||
echo Either key is not insalled or failed to get installed key activation ID. Aborting...
|
||||
echo Either key is not insalled or script failed to get installed key's activation ID. Aborting...
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
@@ -356,7 +356,7 @@ if %_wmic% EQU 0 set "chkedi=for /f "tokens=2 delims==" %%a in ('%psc% "(([WMISE
|
||||
|
||||
if %osedition%==0 (
|
||||
%eline%
|
||||
echo Failed to detect OS Edition. Aborting...
|
||||
echo Failed to detect OS edition, aborting...
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
@@ -376,7 +376,7 @@ for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Get Target editions list
|
||||
:: Get target editions list
|
||||
|
||||
set _target=
|
||||
set _dtarget=
|
||||
@@ -403,9 +403,9 @@ call :dk_color %Red% "==== Note ===="
|
||||
echo:
|
||||
echo [EditionID:%osedition% ^| %fullbuild%]
|
||||
echo:
|
||||
echo Changing this edition to any other may not remove "%osedition%" specific features.
|
||||
echo Changing this edition may not remove "%osedition%"-specific features.
|
||||
echo:
|
||||
call :dk_color %_Yellow% "Press 7 key to continue..."
|
||||
call :dk_color %_Yellow% "Press [7] to continue anyway..."
|
||||
choice /c 7 /n
|
||||
cls
|
||||
)
|
||||
@@ -424,7 +424,7 @@ if not defined _ntarget (
|
||||
%line%
|
||||
echo:
|
||||
if defined dismnotworking call :dk_color %Red% "DISM.exe is not working."
|
||||
call :dk_color %Gray% "Target Edition not found."
|
||||
call :dk_color %Gray% "Target editions not found."
|
||||
echo Current Edition [%osedition% ^| %winbuild%] can not be changed to any other Edition.
|
||||
%line%
|
||||
goto dk_done
|
||||
@@ -443,7 +443,7 @@ set targetedition=
|
||||
|
||||
%line%
|
||||
echo:
|
||||
call :dk_color %Gray% "You can change the Edition [%osedition%] [%fullbuild%] to one of the following."
|
||||
call :dk_color %Gray% "You can change the edition [%osedition%] [%fullbuild%] to one of the following."
|
||||
%showeditionerror%
|
||||
if defined dismnotworking (
|
||||
call :dk_color %_Yellow% "Note - DISM.exe is not working."
|
||||
@@ -462,7 +462,7 @@ set targetedition!counter!=%%A
|
||||
echo:
|
||||
echo [0] %_exitmsg%
|
||||
echo:
|
||||
call :dk_color %_Green% "Enter option number in keyboard, and press "Enter":"
|
||||
call :dk_color %_Green% "Enter an option number using your keyboard and press Enter to confirm:"
|
||||
set /p inpt=
|
||||
if "%inpt%"=="" goto cedmenu2
|
||||
if "%inpt%"=="0" exit /b
|
||||
@@ -483,12 +483,12 @@ echo:
|
||||
call :dk_color %Red% "==== Note ===="
|
||||
echo:
|
||||
echo Once the edition is changed to "%targetedition%",
|
||||
echo system may not be able to properly change edition to any other later.
|
||||
echo the system may not be able to properly change edition later.
|
||||
echo:
|
||||
echo [1] Continue
|
||||
echo [1] Continue Anyway
|
||||
echo [0] Go Back
|
||||
echo:
|
||||
call :dk_color %_Green% "Enter a menu option in the Keyboard [1,0] :"
|
||||
call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :"
|
||||
choice /C:10 /N
|
||||
if !errorlevel!==2 goto cedmenu2
|
||||
if !errorlevel!==1 rem
|
||||
@@ -499,7 +499,7 @@ set key=
|
||||
set _chan=
|
||||
set _dismapi=0
|
||||
|
||||
:: Check if DISM Api or slmgr.vbs is required for edition upgrade
|
||||
:: Check if DISM API or slmgr.vbs is required for edition upgrade
|
||||
|
||||
if not exist "%SysPath%\spp\tokens\skus\%targetedition%\" (
|
||||
echo %_wtarget% | find /i " %targetedition% " || (
|
||||
@@ -521,7 +521,7 @@ set _chan=Retail
|
||||
if not defined key (
|
||||
%eline%
|
||||
echo [%targetedition% ^| %winbuild%]
|
||||
echo Unable to get product key from pkeyhelper.dll
|
||||
echo Failed to get product key from pkeyhelper.dll.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
@@ -544,13 +544,13 @@ cls
|
||||
echo:
|
||||
%showeditionerror%
|
||||
if defined dismnotworking call :dk_color %_Yellow% "DISM.exe is not working."
|
||||
echo Changing the Current Edition [%osedition%] %fullbuild% to [%targetedition%]
|
||||
echo Changing the current edition [%osedition%] %fullbuild% to [%targetedition%]...
|
||||
echo:
|
||||
|
||||
if %_dismapi%==1 (
|
||||
call :dk_color %Green% "Notes-"
|
||||
call :dk_color %Green% "Notes -"
|
||||
echo:
|
||||
echo - Save your work before continue, system will auto restart.
|
||||
echo - Save your work before continuing, the system will auto-restart.
|
||||
echo:
|
||||
echo - You will need to activate with HWID option once the edition is changed.
|
||||
%line%
|
||||
@@ -562,7 +562,7 @@ if !errorlevel!==1 exit /b
|
||||
::========================================================================================================================================
|
||||
|
||||
if %_dismapi%==0 (
|
||||
echo Installing %_chan% Key [%key%]
|
||||
echo Installing %_chan% key [%key%]
|
||||
echo:
|
||||
if %_wmic% EQU 1 wmic path %sps% where __CLASS='%sps%' call InstallProductKey ProductKey="%key%" %nul%
|
||||
if %_wmic% EQU 0 %psc% "try { $null=(([WMISEARCHER]'SELECT Version FROM %sps%').Get()).InstallProductKey('%key%'); exit 0 } catch { exit $_.Exception.InnerException.HResult }" %nul%
|
||||
@@ -574,7 +574,7 @@ if !keyerror! EQU 0 (
|
||||
call :dk_refresh
|
||||
call :dk_color %Green% "[Successful]"
|
||||
echo:
|
||||
call :dk_color %Gray% "Reboot is required to properly change the Edition."
|
||||
call :dk_color %Gray% "Reboot is required to fully change the edition."
|
||||
) else (
|
||||
call :dk_color %Red% "[Unsuccessful] [Error Code: !keyerror!]"
|
||||
echo:
|
||||
@@ -585,7 +585,7 @@ call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
|
||||
if %_dismapi%==1 (
|
||||
echo:
|
||||
echo Applying the DISM API method with %_chan% Key %key%. Please wait...
|
||||
echo Applying the DISM API method with %_chan% key %key%. Please wait...
|
||||
echo:
|
||||
|
||||
call :ced_prep
|
||||
@@ -614,9 +614,9 @@ if defined rebootreq goto dk_done
|
||||
echo:
|
||||
%showeditionerror%
|
||||
if defined dismnotworking call :dk_color %_Yellow% "Note - DISM.exe is not working."
|
||||
echo Changing the Current Edition [%osedition%] %fullbuild% to [%targetedition%]
|
||||
echo Changing the current edition [%osedition%] %fullbuild% to [%targetedition%]...
|
||||
echo:
|
||||
call :dk_color %Blue% "Important - Save your work before continue, system will auto reboot."
|
||||
call :dk_color %Blue% "Important - Save your work before continuing, the system will auto-restart."
|
||||
echo:
|
||||
choice /C:01 /N /M "[1] Continue [0] %_exitmsg% : "
|
||||
if %errorlevel%==1 exit /b
|
||||
@@ -657,7 +657,7 @@ if not defined key call :changeeditiondata
|
||||
if not defined key (
|
||||
%eline%
|
||||
echo [%targetedition% ^| %winbuild%]
|
||||
echo Unable to get product key from pkeyhelper.dll
|
||||
echo Failed to get product key from pkeyhelper.dll.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
@@ -671,13 +671,13 @@ cls
|
||||
echo:
|
||||
%showeditionerror%
|
||||
if defined dismnotworking call :dk_color %_Yellow% "Note - DISM.exe is not working."
|
||||
echo Changing the Current Edition [%osedition%] %fullbuild% to [%targetedition%]
|
||||
echo Changing the current edition [%osedition%] %fullbuild% to [%targetedition%]...
|
||||
echo:
|
||||
|
||||
call :ced_prep
|
||||
if defined preperror goto dk_done
|
||||
|
||||
echo Applying the command with %_chan% Key
|
||||
echo Applying the command with %_chan% key...
|
||||
echo DISM /online /Set-Edition:%targetedition% /ProductKey:%key% /AcceptEula
|
||||
DISM /online /Set-Edition:%targetedition% /ProductKey:%key% /AcceptEula
|
||||
|
||||
@@ -699,8 +699,8 @@ for /f %%a in ('%psc% "(Get-Date).ToString('yyyyMMdd-HHmmssfff')"') do set _time
|
||||
|
||||
sc query TrustedInstaller | find /i "RUNNING" %nul% && (
|
||||
%eline%
|
||||
echo Failed to stop TrustedInstaller service.
|
||||
echo Try again or Restart your system and then try again.
|
||||
echo Failed to stop the TrustedInstaller service.
|
||||
echo Reboot your machine using the restart option and try again.
|
||||
set preperror=1
|
||||
exit /b
|
||||
)
|
||||
@@ -731,9 +731,9 @@ call :compresslog DISM\dism_%_time%.log ChangeEdition_Logs\DISM %nul%
|
||||
|
||||
echo:
|
||||
if %winbuild% GEQ 9200 %psc% "if ((Get-WindowsOptionalFeature -Online -FeatureName NetFx3).State -eq 'Enabled') {Write-Host 'Checking .NET Framework 3.5 Status - Enabled'}"
|
||||
echo Log files are copied to the ChangeEdition_Logs folder on the desktop.
|
||||
echo Log files are copied to the ChangeEdition_Logs folder on your desktop.
|
||||
echo:
|
||||
call :dk_color %Blue% "In case of errors, restart system before trying again."
|
||||
call :dk_color %Blue% "In case there are errors, you should restart the system before trying again."
|
||||
echo:
|
||||
set fixes=%fixes% %mas%change_edition_issues
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%change_edition_issues"
|
||||
@@ -850,7 +850,7 @@ exit /b
|
||||
|
||||
set _wmic=0
|
||||
for %%# in (wmic.exe) do @if not "%%~$PATH:#"=="" (
|
||||
wmic path Win32_ComputerSystem get CreationClassName /value %nul2% | find /i "computersystem" %nul1% && set _wmic=1
|
||||
cmd /c "wmic path Win32_ComputerSystem get CreationClassName /value" %nul2% | find /i "computersystem" %nul1% && set _wmic=1
|
||||
)
|
||||
exit /b
|
||||
|
||||
@@ -891,7 +891,7 @@ reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Upd
|
||||
|
||||
if defined rebootreq (
|
||||
%eline%
|
||||
echo Pending Reboot flags found.
|
||||
echo Pending reboot flags found.
|
||||
echo:
|
||||
echo Make sure Windows is fully updated, restart the system and try again.
|
||||
)
|
||||
@@ -935,7 +935,7 @@ for %%# in (pkeyhelper.dll) do @if "%%~$PATH:#"=="" exit /b
|
||||
for %%# in (%keyflow%) do (
|
||||
call :k_pkey %targetSKU% '%%#'
|
||||
if defined pkey call :k_pkeychannel !pkey!
|
||||
if /i [!pkeychannel!]==[%%#] (
|
||||
if /i "!pkeychannel!"=="%%#" (
|
||||
set key=!pkey!
|
||||
exit /b
|
||||
)
|
||||
@@ -987,13 +987,13 @@ echo:
|
||||
if %_unattended%==1 timeout /t 2 & exit /b
|
||||
|
||||
if defined fixes (
|
||||
call :dk_color2 %Blue% "Press [1] To Open Troubleshoot Page " %Gray% " Press [0] To Ignore"
|
||||
call :dk_color2 %Blue% "Press [1] to Open Troubleshoot Page " %Gray% " Press [0] to Ignore"
|
||||
choice /C:10 /N
|
||||
if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#))
|
||||
)
|
||||
|
||||
if defined terminal (
|
||||
call :dk_color %_Yellow% "Press 0 key to %_exitmsg%..."
|
||||
call :dk_color %_Yellow% "Press [0] key to %_exitmsg%..."
|
||||
choice /c 0 /n
|
||||
) else (
|
||||
call :dk_color %_Yellow% "Press any key to %_exitmsg%..."
|
||||
@@ -1004,7 +1004,7 @@ exit /b
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: https://github.com/Gamers-Against-Weed/Set-WindowsCbsEdition
|
||||
:: https://github.com/asdcorp/Set-WindowsCbsEdition
|
||||
|
||||
:cbsxml:[
|
||||
param (
|
||||
@@ -6,10 +6,23 @@
|
||||
:: https://gravesoft.dev/cas
|
||||
|
||||
|
||||
:: Set Environment variables, it helps if they are misconfigured in the system
|
||||
|
||||
setlocal EnableExtensions
|
||||
setlocal DisableDelayedExpansion
|
||||
|
||||
set "PathExt=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC"
|
||||
|
||||
set "SysPath=%SystemRoot%\System32"
|
||||
set "Path=%SystemRoot%\System32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SystemRoot%\System32\WindowsPowerShell\v1.0\"
|
||||
if exist "%SystemRoot%\Sysnative\reg.exe" (
|
||||
set "SysPath=%SystemRoot%\Sysnative"
|
||||
set "Path=%SystemRoot%\Sysnative;%SystemRoot%;%SystemRoot%\Sysnative\Wbem;%SystemRoot%\Sysnative\WindowsPowerShell\v1.0\;%Path%"
|
||||
)
|
||||
|
||||
set "ComSpec=%SysPath%\cmd.exe"
|
||||
set "PSModulePath=%ProgramFiles%\WindowsPowerShell\Modules;%SysPath%\WindowsPowerShell\v1.0\Modules"
|
||||
|
||||
set "_psc=powershell -nop -c"
|
||||
set "_err===== ERROR ===="
|
||||
set _pwsh=1
|
||||
@@ -29,8 +42,8 @@ setlocal EnableDelayedExpansion
|
||||
|
||||
:E_Exit
|
||||
echo.
|
||||
echo Press any key to exit.
|
||||
pause >nul
|
||||
echo Press 0 key to exit.
|
||||
choice /c 0 /n
|
||||
exit /b
|
||||
|
||||
:sppmgr:
|
||||
@@ -1,4 +1,4 @@
|
||||
@set masver=2.6
|
||||
@set masver=2.7
|
||||
@echo off
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Set Environment variables, it helps if they are misconfigured in the system
|
||||
:: Set environment variables, it helps if they are misconfigured in the system
|
||||
|
||||
setlocal EnableExtensions
|
||||
setlocal DisableDelayedExpansion
|
||||
@@ -121,13 +121,13 @@ call :dk_setvar
|
||||
if %winbuild% LSS 7600 (
|
||||
%nceline%
|
||||
echo Unsupported OS version detected [%winbuild%].
|
||||
echo Project is supported only for Windows 7/8/8.1/10/11 and their Server equivalent.
|
||||
echo Project is supported only for Windows 7/8/8.1/10/11 and their Server equivalents.
|
||||
goto done2
|
||||
)
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Fix special characters limitation in path name
|
||||
:: Fix special character limitations in path name
|
||||
|
||||
set "_work=%~dp0"
|
||||
if "%_work:~-1%"=="\" set "_work=%_work:~0,-1%"
|
||||
@@ -147,8 +147,8 @@ setlocal EnableDelayedExpansion
|
||||
echo "!_batf!" | find /i "!_ttemp!" %nul1% && (
|
||||
if /i not "!_work!"=="!_ttemp!" (
|
||||
%eline%
|
||||
echo Script is launched from the temp folder,
|
||||
echo Most likely you are running the script directly from the archive file.
|
||||
echo The script was launched from the temp folder.
|
||||
echo You are most likely running the script directly from the archive file.
|
||||
echo:
|
||||
echo Extract the archive file and launch the script from the extracted folder.
|
||||
goto done2
|
||||
@@ -189,7 +189,7 @@ goto done2
|
||||
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b
|
||||
%eline%
|
||||
echo This script needs admin rights.
|
||||
echo To do so, right click on this script and select 'Run as administrator'.
|
||||
echo Right click on this script and select 'Run as administrator'.
|
||||
goto done2
|
||||
)
|
||||
|
||||
@@ -242,20 +242,20 @@ set -=
|
||||
set old=
|
||||
|
||||
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 updatecheck.mass%-%grave.dev') do (
|
||||
if not [%%#]==[] (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.69.%masver%" %nul1% || set old=1))
|
||||
if not "%%#"=="" (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.69.%masver%" %nul1% || set old=1))
|
||||
)
|
||||
|
||||
if defined old (
|
||||
echo ________________________________________________
|
||||
%eline%
|
||||
echo Version %masver% of MAS is outdated.
|
||||
echo Your version of MAS [%masver%] is outdated.
|
||||
echo ________________________________________________
|
||||
echo:
|
||||
if not %_unattended%==1 (
|
||||
echo [1] Get Latest MAS
|
||||
echo [0] Continue Anyway
|
||||
echo:
|
||||
call :dk_color %_Green% "Enter a menu option in the Keyboard [1,0] :"
|
||||
call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :"
|
||||
choice /C:10 /N
|
||||
if !errorlevel!==2 rem
|
||||
if !errorlevel!==1 (start ht%-%tps://github.com/mass%-%gravel/Microsoft-Acti%-%vation-Scripts & start %mas% & exit /b)
|
||||
@@ -277,7 +277,7 @@ set "_dir=%desktop%\$OEM$\$$\Setup\Scripts"
|
||||
|
||||
if exist "!desktop!\" (
|
||||
%eline%
|
||||
echo Desktop location was not detected, aborting...
|
||||
echo Unable to detect Desktop location, aborting...
|
||||
goto done2
|
||||
)
|
||||
|
||||
@@ -290,7 +290,7 @@ if not defined terminal mode 78, 30
|
||||
if exist "!desktop!\$OEM$\" (
|
||||
echo _____________________________________________________
|
||||
%eline%
|
||||
echo $OEM$ folder already exists on the Desktop.
|
||||
echo The $OEM$ folder already exists on your Desktop.
|
||||
echo _____________________________________________________
|
||||
goto done2
|
||||
)
|
||||
@@ -349,7 +349,7 @@ call :dk_color2 %_White% " [R] " %_Green% "ReadMe"
|
||||
echo: [0] Exit
|
||||
echo: ________________________________________________________
|
||||
echo:
|
||||
call :dk_color2 %_White% " " %_Green% "Enter a menu option in the Keyboard :"
|
||||
call :dk_color2 %_White% " " %_Green% "Choose a menu option using your keyboard :"
|
||||
choice /C:123456789R0 /N
|
||||
set _erl=%errorlevel%
|
||||
|
||||
@@ -681,7 +681,7 @@ cd \
|
||||
:errorfound
|
||||
|
||||
%eline%
|
||||
echo $OEM$ Folder was not created successfully...
|
||||
echo The script failed to create the $OEM$ folder.
|
||||
goto :done2
|
||||
|
||||
:done
|
||||
@@ -689,7 +689,7 @@ goto :done2
|
||||
echo ______________________________________________________________
|
||||
echo:
|
||||
call :dk_color %Blue% "%oem%"
|
||||
call :dk_color %Green% "$OEM$ folder is successfully created on the Desktop."
|
||||
call :dk_color %Green% "$OEM$ folder was successfully created on your Desktop."
|
||||
echo "%oem%" | find /i "38" %nul% && (
|
||||
echo:
|
||||
echo To KMS38 activate Server Cor/Acor editions ^(No GUI Versions^),
|
||||
@@ -701,13 +701,13 @@ echo ______________________________________________________________
|
||||
|
||||
echo:
|
||||
if defined fixes (
|
||||
call :dk_color2 %Blue% "Press [1] To Open Troubleshoot Page " %Gray% " Press [0] To Ignore"
|
||||
call :dk_color2 %Blue% "Press [1] to Open Troubleshoot Page " %Gray% " Press [0] to Ignore"
|
||||
choice /C:10 /N
|
||||
if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#))
|
||||
)
|
||||
|
||||
if defined terminal (
|
||||
call :dk_color %_Yellow% "Press 0 key to %_exitmsg%..."
|
||||
call :dk_color %_Yellow% "Press [0] key to %_exitmsg%..."
|
||||
choice /c 0 /n
|
||||
) else (
|
||||
call :dk_color %_Yellow% "Press any key to %_exitmsg%..."
|
||||
@@ -777,7 +777,7 @@ exit /b
|
||||
if %_NCS% EQU 1 (
|
||||
echo %esc%[%~1%~2%esc%[0m
|
||||
) else (
|
||||
if not exist %psc% (echo %~3) else (%psc% write-host -back '%1' -fore '%2' '%3')
|
||||
%psc% write-host -back '%1' -fore '%2' '%3'
|
||||
)
|
||||
exit /b
|
||||
|
||||
@@ -786,7 +786,7 @@ exit /b
|
||||
if %_NCS% EQU 1 (
|
||||
echo %esc%[%~1%~2%esc%[%~3%~4%esc%[0m
|
||||
) else (
|
||||
if not exist %psc% (echo %~3%~6) else (%psc% write-host -back '%1' -fore '%2' '%3' -NoNewline; write-host -back '%4' -fore '%5' '%6')
|
||||
%psc% write-host -back '%1' -fore '%2' '%3' -NoNewline; write-host -back '%4' -fore '%5' '%6'
|
||||
)
|
||||
exit /b
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
30
README.md
30
README.md
@@ -14,19 +14,19 @@
|
||||
|
||||
## Download / How to use it?
|
||||
|
||||
### Method 1 - PowerShell (Recommended)
|
||||
### Method 1 - PowerShell (Windows 8 and later) ❤️
|
||||
|
||||
- Right-click on the Windows start menu and select PowerShell or Terminal (Not CMD).
|
||||
- Copy and paste the code below and press enter
|
||||
1. Open PowerShell (Not CMD). To do that, right-click on the Windows start menu and select PowerShell or Terminal.
|
||||
2. Copy and paste the code below and press enter
|
||||
```
|
||||
irm https://get.activated.win | iex
|
||||
```
|
||||
or (deprecated, will be retired on Aug 31 2024, use above instead)
|
||||
or (deprecated, will be retired on Dec 31 2024, use above instead)
|
||||
```
|
||||
irm https://massgrave.dev/get | iex
|
||||
```
|
||||
- You will see the activation options. Follow the on-screen instructions.
|
||||
- That's all.
|
||||
3. You will see the activation options. Choose [1] HWID for Windows activation. Choose [2] Ohook for Office activation.
|
||||
4. That's all.
|
||||
|
||||
---
|
||||
|
||||
@@ -35,22 +35,22 @@ irm https://massgrave.dev/get | iex
|
||||
- The Powershell method does not work on Windows 7. Use the Method 2 - Traditional instead.
|
||||
- The URL get.activated.win may be blocked by some DNS services because it is a new domain.
|
||||
|
||||
### Method 2 - Traditional
|
||||
### Method 2 - Traditional (Windows 7 and later)
|
||||
|
||||
- Download the file under the code button from [GitHub](https://github.com/massgravel/Microsoft-Activation-Scripts) or [Bitbucket](https://bitbucket.org/WindowsAddict/microsoft-activation-scripts)
|
||||
- Right-click on the downloaded zip file and extract
|
||||
- In the extracted folder, find the folder named `All-In-One-Version`
|
||||
- Run the file named `MAS_AIO-CRC32_XXXXXXXX.cmd`
|
||||
- You will see the activation options, follow the on-screen instructions.
|
||||
- That's all.
|
||||
1. Download the file under the code button from [GitHub](https://github.com/massgravel/Microsoft-Activation-Scripts) or [Bitbucket](https://bitbucket.org/WindowsAddict/microsoft-activation-scripts) or [Codeberg](https://codeberg.org/massgravel/Microsoft-Activation-Scripts)
|
||||
2. Right-click on the downloaded zip file and extract
|
||||
3. In the extracted folder, find the folder named `All-In-One-Version`
|
||||
4. Run the file named `MAS_AIO.cmd`
|
||||
5. You will see the activation options, follow the on-screen instructions.
|
||||
6. That's all.
|
||||
|
||||
To run the scripts in unattended mode, check [here](https://massgrave.dev/command_line_switches)
|
||||
|
||||
</br>
|
||||
|
||||
```
|
||||
Latest Version: 2.6
|
||||
Release date: 20-Apr-2024
|
||||
Latest Version: 2.7
|
||||
Release date: 6-Sep-2024
|
||||
```
|
||||
|
||||
### [Troubleshooting / Help](https://massgrave.dev/troubleshoot)
|
||||
|
||||
Reference in New Issue
Block a user