@@ -239,7 +239,6 @@ REM check LanguageMode
239239echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && (
240240echo FullLanguage mode not found in PowerShell. Aborting...
241241echo If you have applied restrictions on Powershell then undo those changes.
242- echo:
243242set fixes=%fixes% %mas%fix_powershell
244243call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_powershell"
245244goto dk_done
@@ -249,7 +248,6 @@ REM check Powershell core version
249248
250249cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && (
251250echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting...
252- echo:
253251set fixes=%fixes% %mas%in-place_repair_upgrade
254252call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
255253goto dk_done
@@ -260,7 +258,6 @@ REM check for Mal-ware that may cause issues with Powershell
260258for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
261259echo "%%f"
262260echo Mal%blank%ware found, PowerShell is not working properly.
263- echo:
264261set fixes=%fixes% %mas%remove_mal%w%ware
265262call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
266263goto dk_done
@@ -272,7 +269,6 @@ if /i "!tstresult2!"=="FullLanguage" (
272269cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul%
273270if !errorlevel!==3 (
274271echo Windows Powershell failed to load .NET command. Aborting...
275- echo:
276272set fixes=%fixes% %mas%in-place_repair_upgrade
277273call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
278274goto dk_done
@@ -293,7 +289,6 @@ echo Installed Antivirus - Microsoft Defender for Endpoint
293289cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { $n += $i.displayName }; if ($n) { Write-Host ('Installed Antivirus - ' + ($n -join ', '))}"""
294290)
295291
296- echo:
297292set fixes=%fixes% %mas%troubleshoot
298293call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
299294goto dk_done
@@ -716,7 +711,6 @@ echo:
716711if not defined results (
717712call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options."
718713call :dk_color %Blue% "After that, restart system and try activation again."
719- echo:
720714set fixes=%fixes% %mas%in-place_repair_upgrade
721715call :dk_color2 %Blue% "If it still shows the same error, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
722716)
@@ -763,7 +757,6 @@ echo [%winos% ^| %winbuild%]
763757echo:
764758echo Evaluation editions cannot be activated outside of their evaluation period.
765759call :dk_color %Blue% "Use TSforge activation option from the main menu to reset evaluation period."
766- echo:
767760set fixes=%fixes% %mas%evaluation_editions
768761call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%evaluation_editions"
769762goto dk_done
@@ -1035,7 +1028,6 @@ licensing.mp.microsoft.com
10351028findstr /i "%%#" "%SysPath%\drivers\etc\hosts" %nul1% && set "hosfail= [%%# Blocked in Hosts]"
10361029)
10371030call :dk_color %Red% "Checking Licensing Servers [Failed to Connect]!hosfail!"
1038- echo:
10391031set fixes=%fixes% %mas%licensing-servers-issue
10401032call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%licensing-servers-issue"
10411033echo:
@@ -1076,7 +1068,6 @@ set error=1
10761068call :dk_color %Red% "Checking Windows Update Registry [Corruption Found]"
10771069if !wcount! GTR 2 (
10781070call :dk_color %Red% "Windows seems to be infected with Mal%w%ware."
1079- echo:
10801071set fixes=%fixes% %mas%remove_mal%w%ware
10811072call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
10821073echo:
@@ -1105,7 +1096,6 @@ if %keyerror% EQU 0 if not defined _perm if defined _int (
11051096if not defined wucorrupt if not defined wublock if not defined wuerror if not defined storeblock if not defined resfail (
11061097echo "%error_code%" | findstr /i "0x80072e 0x80072f 0x800704cf 0x87e10bcf 0x800705b4" %nul% && (
11071098call :dk_color %Red% "Checking Internet Issues [Found] %error_code%"
1108- echo:
11091099set fixes=%fixes% %mas%licensing-servers-issue
11101100call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%licensing-servers-issue"
11111101echo:
@@ -1539,7 +1529,6 @@ if not "%results%%pupfound%"=="" (
15391529if defined pupfound call :dk_color %Gray% "Checking PUP Activators [Found%pupfound%]"
15401530if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection..."
15411531if defined results (call :dk_color %Red% "%results%"&set showfix=1)
1542- echo:
15431532set fixes=%fixes% %mas%remove_mal%w%ware
15441533call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
15451534echo:
@@ -1622,7 +1611,6 @@ set showfix=1
16221611)
16231612echo "%imagestate%" | find /i "UNDEPLOYABLE" %nul% && (
16241613if not defined showfix (
1625- echo:
16261614set fixes=%fixes% %mas%in-place_repair_upgrade
16271615call :dk_color2 %Blue% "If the activation fails, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
16281616echo:
@@ -1793,7 +1781,6 @@ set showfix=1
17931781if %winbuild% GEQ 7600 reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Plugins\Objects\msft:rm/algorithm/hwid/4.0" /f ba02fed39662 /d %nul% || (
17941782call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found] [Most likely caused by gaming spoofers]"
17951783if not defined showfix (
1796- echo:
17971784set fixes=%fixes% %mas%issues_due_to_gaming_spoofers
17981785call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
17991786echo:
@@ -1814,7 +1801,6 @@ if %winbuild% LSS 9200 set "tokenstore=%Systemdrive%\Windows\ServiceProfiles\Net
18141801if %winbuild% GEQ 9200 if /i not "!tokenstore!"=="%SysPath%\spp\store" if /i not "!tokenstore!"=="%SysPath%\spp\store\2.0" if /i not "!tokenstore!"=="%SysPath%\spp\store_test\2.0" (
18151802call :dk_color %Red% "Checking TokenStore Registry Key [Correct Path Not Found] [!tokenstore!]"
18161803if not defined showfix (
1817- echo:
18181804set fixes=%fixes% %mas%in-place_repair_upgrade
18191805call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
18201806echo:
@@ -1845,7 +1831,6 @@ call :dk_color %Gray% "Checking SPP Token Folder [Not Found, Creat
18451831) else (
18461832call :dk_color %Red% "Checking SPP Token Folder [Not Found, Failed to Create] [%tokenstore%\]"
18471833if not defined showfix (
1848- echo:
18491834set fixes=%fixes% %mas%in-place_repair_upgrade
18501835call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
18511836echo:
@@ -2035,7 +2020,6 @@ set showfix=1
20352020reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || (
20362021call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]"
20372022if not defined showfix (
2038- echo:
20392023set fixes=%fixes% %mas%in-place_repair_upgrade
20402024call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
20412025echo:
@@ -2160,7 +2144,6 @@ if "!taskinfo!"=="" set "taskinfo=Not Found"
21602144
21612145call :dk_color %Gray% "Checking SvcRestartTask Status [!taskinfo!. System might deactivate later.]"
21622146if not defined showfix (
2163- echo:
21642147echo "!taskinfo!" | findstr /i "Removed Not Found" %nul1% && (
21652148set fixes=%fixes% %mas%in-place_repair_upgrade
21662149call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
@@ -2556,7 +2539,6 @@ echo:
25562539if not defined results (
25572540call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options."
25582541call :dk_color %Blue% "After that, restart system and try activation again."
2559- echo:
25602542set fixes=%fixes% %mas%in-place_repair_upgrade
25612543call :dk_color2 %Blue% "If it still shows the same error, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
25622544)
@@ -2660,7 +2642,6 @@ echo:
26602642echo You only have the Office Dashboard app installed; you need to install the full version of Office.
26612643)
26622644call :dk_color %Blue% "Download and install Office from the URL below, then try again."
2663- echo:
26642645set fixes=%fixes% %mas%genuine-installation-media
26652646call :dk_color %_Yellow% "%mas%genuine-installation-media"
26662647goto dk_done
@@ -2875,7 +2856,6 @@ echo Help: %mas%troubleshoot
28752856) else (
28762857call :dk_color %Red% "Some errors were detected."
28772858if not defined ierror if not defined showfix call :dk_color %Blue% "%_fixmsg%"
2878- echo:
28792859set fixes=%fixes% %mas%troubleshoot
28802860call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
28812861)
@@ -4543,7 +4523,6 @@ echo:
45434523if not defined results (
45444524call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options."
45454525call :dk_color %Blue% "After that, restart system and try activation again."
4546- echo:
45474526set fixes=%fixes% %mas%in-place_repair_upgrade
45484527call :dk_color2 %Blue% "If it still shows the same error, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
45494528)
@@ -4557,7 +4536,6 @@ echo .NET 3.5 Framework is corrupt or missing. Aborting...
45574536if exist "%SysPath%\spp\tokens\skus\Security-SPP-Component-SKU-Embedded" (
45584537echo Install .NET Framework 4.8 and Windows Management Framework 5.1
45594538)
4560- echo:
45614539set fixes=%fixes% %mas%troubleshoot
45624540call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
45634541goto dk_done
@@ -4571,7 +4549,6 @@ if !errorlevel! EQU 1051 (
45714549%eline%
45724550echo Evaluation WLMS service is running, %_slser% service can not be stopped. Aborting...
45734551echo Install Non-Eval version for Windows build %winbuild%.
4574- echo:
45754552set fixes=%fixes% %mas%troubleshoot
45764553call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
45774554goto dk_done
@@ -12217,7 +12194,6 @@ echo:
1221712194if not defined results (
1221812195call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options."
1221912196call :dk_color %Blue% "After that, restart system and try activation again."
12220- echo:
1222112197set fixes=%fixes% %mas%in-place_repair_upgrade
1222212198call :dk_color2 %Blue% "If it still shows the same error, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
1222312199)
@@ -17228,7 +17204,6 @@ if not exist %SysPath%\%%# (
1722817204echo [%SysPath%\%%#] file is missing, aborting...
1722917205call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options."
1723017206call :dk_color %Blue% "After that, restart system and try activation again."
17231- echo:
1723217207set fixes=%fixes% %mas%in-place_repair_upgrade
1723317208call :dk_color2 %Blue% "If it still shows the same error, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
1723417209goto dk_done
@@ -17446,7 +17421,6 @@ if not defined key (
1744617421%eline%
1744717422echo [%targetedition% ^| %winbuild%]
1744817423echo Failed to get product key from pkeyhelper.dll.
17449- echo:
1745017424set fixes=%fixes% %mas%troubleshoot
1745117425call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
1745217426goto dk_done
@@ -17501,7 +17475,6 @@ echo:
1750117475call :dk_color %Gray% "Reboot is required to fully change the edition."
1750217476) else (
1750317477call :dk_color %Red% "[Unsuccessful] [Error Code: !keyerror!]"
17504- echo:
1750517478set fixes=%fixes% %mas%troubleshoot
1750617479call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
1750717480)
@@ -17582,7 +17555,6 @@ if not defined key (
1758217555%eline%
1758317556echo [%targetedition% ^| %winbuild%]
1758417557echo Failed to get product key from pkeyhelper.dll.
17585- echo:
1758617558set fixes=%fixes% %mas%troubleshoot
1758717559call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
1758817560goto dk_done
@@ -18136,7 +18108,6 @@ if not defined o16c2r_reg (
1813618108%eline%
1813718109echo Office C2R 2016 or later is not installed, which is required for this script.
1813818110echo Download and install Office from below URL and try again.
18139- echo:
1814018111set fixes=%fixes% %mas%genuine-installation-media
1814118112call :dk_color %_Yellow% "%mas%genuine-installation-media"
1814218113goto dk_done
@@ -18187,7 +18158,6 @@ if %winbuild% LSS 10240 if defined ltscfound (
1818718158echo Installed Office appears to be from the Volume channel %ltsc19%%ltsc21%%ltsc24%,
1818818159echo which is not officially supported on your Windows build version %winbuild%.
1818918160echo Aborting...
18190- echo:
1819118161set fixes=%fixes% %mas%troubleshoot
1819218162call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
1819318163goto dk_done
@@ -18201,7 +18171,6 @@ if defined unsupbuild (
1820118171%eline%
1820218172echo Unsupported Office %verchk% is installed on your Windows build version %winbuild%.
1820318173echo Aborting...
18204- echo:
1820518174set fixes=%fixes% %mas%troubleshoot
1820618175call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
1820718176goto dk_done
@@ -18308,7 +18277,6 @@ mode 98, 45
1830818277if not exist %SystemRoot%\Temp\%list%.txt (
1830918278%eline%
1831018279echo Failed to generate available editions list.
18311- echo:
1831218280set fixes=%fixes% %mas%troubleshoot
1831318281call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
1831418282goto :oe_goback
@@ -18373,7 +18341,6 @@ set suites=1
1837318341if not exist %SystemRoot%\Temp\getAppIds.txt (
1837418342%eline%
1837518343echo Failed to generate available apps list.
18376- echo:
1837718344set fixes=%fixes% %mas%troubleshoot
1837818345call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
1837918346goto :oe_goback
@@ -18892,7 +18859,6 @@ goto :oe_goback
1889218859if not defined build (
1889318860%eline%
1889418861call :dk_color %Red% "Failed to detect build number for the target FFN."
18895- echo:
1889618862set fixes=%fixes% %mas%troubleshoot
1889718863call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
1889818864goto :oe_goback
@@ -18930,7 +18896,6 @@ for /l %%i in (1,1,30) do (if !clverchk! LSS %buildchk% (call :ch_getinfo&timeou
1893018896if %clverchk% LSS %buildchk% (
1893118897echo:
1893218898call :dk_color %Red% "Failed to update Office C2R client. Aborting..."
18933- echo:
1893418899set fixes=%fixes% %mas%troubleshoot
1893518900call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
1893618901goto :oe_goback
0 commit comments