mirror of
https://github.com/massgravel/Microsoft-Activation-Scripts.git
synced 2026-03-13 14:43:54 +00:00
Compare commits
11 Commits
146d828b46
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
| 2a4fe194fb | |||
| 1baa4e18ed | |||
| 33b0ac9cc7 | |||
| 97602941e5 | |||
| 773b758f4d | |||
| c07796e405 | |||
| 3e3fe2ca52 | |||
| d33dfc9ce6 | |||
| a5435a349b | |||
| 4fdefbc0d5 | |||
| 63da908027 |
@ -1,4 +1,8 @@
|
||||
@::ab7249d77random13141b5922144806de5d43f
|
||||
@::Please stop false-flagging this script over and over. This is the 3rd time I've had to update the script to deal with the false positives.
|
||||
@::Nothing in this script is malicious and it is used by thousands of people *daily*.
|
||||
@::Is a real person even the one deciding to flag this or is it Copilot told to flag anything it decides not to like?
|
||||
@::If a campaign is using this script as a cover, please flag parts of the campaign instead of the script. This isn't the first time we experienced collateral damage due to campaigns completely unrelated to us.
|
||||
@::If you disagree that MAS is not malicious, we would appreciate if you contacted us to explain what constitutes MAS as "Sonbokli" and we'll look into it. Thank you.
|
||||
@set masver=3.10
|
||||
@setlocal DisableDelayedExpansion
|
||||
@echo off
|
||||
@ -239,7 +243,6 @@ REM check LanguageMode
|
||||
echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && (
|
||||
echo FullLanguage mode not found in PowerShell. Aborting...
|
||||
echo If you have applied restrictions on Powershell then undo those changes.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%fix_powershell
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_powershell"
|
||||
goto dk_done
|
||||
@ -249,7 +252,6 @@ REM check Powershell core version
|
||||
|
||||
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && (
|
||||
echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting...
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
goto dk_done
|
||||
@ -260,7 +262,6 @@ REM check for Mal-ware that may cause issues with Powershell
|
||||
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
|
||||
echo "%%f"
|
||||
echo Mal%blank%ware found, PowerShell is not working properly.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%remove_mal%w%ware
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
|
||||
goto dk_done
|
||||
@ -272,7 +273,6 @@ if /i "!tstresult2!"=="FullLanguage" (
|
||||
cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul%
|
||||
if !errorlevel!==3 (
|
||||
echo Windows Powershell failed to load .NET command. Aborting...
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
goto dk_done
|
||||
@ -293,7 +293,6 @@ echo Installed Antivirus - Microsoft Defender for Endpoint
|
||||
cmd /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 ', '))}"""
|
||||
)
|
||||
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
@ -716,7 +715,6 @@ echo:
|
||||
if not defined results (
|
||||
call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options."
|
||||
call :dk_color %Blue% "After that, restart system and try activation again."
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "If it still shows the same error, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
)
|
||||
@ -763,7 +761,6 @@ echo [%winos% ^| %winbuild%]
|
||||
echo:
|
||||
echo Evaluation editions cannot be activated outside of their evaluation period.
|
||||
call :dk_color %Blue% "Use TSforge activation option from the main menu to reset evaluation period."
|
||||
echo:
|
||||
set fixes=%fixes% %mas%evaluation_editions
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%evaluation_editions"
|
||||
goto dk_done
|
||||
@ -1035,7 +1032,6 @@ licensing.mp.microsoft.com
|
||||
findstr /i "%%#" "%SysPath%\drivers\etc\hosts" %nul1% && set "hosfail= [%%# Blocked in Hosts]"
|
||||
)
|
||||
call :dk_color %Red% "Checking Licensing Servers [Failed to Connect]!hosfail!"
|
||||
echo:
|
||||
set fixes=%fixes% %mas%licensing-servers-issue
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%licensing-servers-issue"
|
||||
echo:
|
||||
@ -1076,7 +1072,6 @@ set error=1
|
||||
call :dk_color %Red% "Checking Windows Update Registry [Corruption Found]"
|
||||
if !wcount! GTR 2 (
|
||||
call :dk_color %Red% "Windows seems to be infected with Mal%w%ware."
|
||||
echo:
|
||||
set fixes=%fixes% %mas%remove_mal%w%ware
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
|
||||
echo:
|
||||
@ -1105,7 +1100,6 @@ if %keyerror% EQU 0 if not defined _perm if defined _int (
|
||||
if not defined wucorrupt if not defined wublock if not defined wuerror if not defined storeblock if not defined resfail (
|
||||
echo "%error_code%" | findstr /i "0x80072e 0x80072f 0x800704cf 0x87e10bcf 0x800705b4" %nul% && (
|
||||
call :dk_color %Red% "Checking Internet Issues [Found] %error_code%"
|
||||
echo:
|
||||
set fixes=%fixes% %mas%licensing-servers-issue
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%licensing-servers-issue"
|
||||
echo:
|
||||
@ -1539,7 +1533,6 @@ 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..."
|
||||
if defined results (call :dk_color %Red% "%results%"&set showfix=1)
|
||||
echo:
|
||||
set fixes=%fixes% %mas%remove_mal%w%ware
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
|
||||
echo:
|
||||
@ -1622,7 +1615,6 @@ set showfix=1
|
||||
)
|
||||
echo "%imagestate%" | find /i "UNDEPLOYABLE" %nul% && (
|
||||
if not defined showfix (
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "If the activation fails, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
echo:
|
||||
@ -1793,7 +1785,6 @@ set showfix=1
|
||||
if %winbuild% GEQ 7600 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] [Most likely caused by gaming spoofers]"
|
||||
if not defined showfix (
|
||||
echo:
|
||||
set fixes=%fixes% %mas%issues_due_to_gaming_spoofers
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
|
||||
echo:
|
||||
@ -1814,7 +1805,6 @@ if %winbuild% LSS 9200 set "tokenstore=%Systemdrive%\Windows\ServiceProfiles\Net
|
||||
if %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" (
|
||||
call :dk_color %Red% "Checking TokenStore Registry Key [Correct Path Not Found] [!tokenstore!]"
|
||||
if not defined showfix (
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
echo:
|
||||
@ -1845,7 +1835,6 @@ call :dk_color %Gray% "Checking SPP Token Folder [Not Found, Creat
|
||||
) else (
|
||||
call :dk_color %Red% "Checking SPP Token Folder [Not Found, Failed to Create] [%tokenstore%\]"
|
||||
if not defined showfix (
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
echo:
|
||||
@ -2035,7 +2024,6 @@ set showfix=1
|
||||
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || (
|
||||
call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]"
|
||||
if not defined showfix (
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
echo:
|
||||
@ -2160,7 +2148,6 @@ if "!taskinfo!"=="" set "taskinfo=Not Found"
|
||||
|
||||
call :dk_color %Gray% "Checking SvcRestartTask Status [!taskinfo!. System might deactivate later.]"
|
||||
if not defined showfix (
|
||||
echo:
|
||||
echo "!taskinfo!" | findstr /i "Removed Not Found" %nul1% && (
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
@ -2556,7 +2543,6 @@ echo:
|
||||
if not defined results (
|
||||
call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options."
|
||||
call :dk_color %Blue% "After that, restart system and try activation again."
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "If it still shows the same error, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
)
|
||||
@ -2657,10 +2643,9 @@ call :dk_color %Red% "Checking Installed Office [Not Found]"
|
||||
|
||||
if defined ohub (
|
||||
echo:
|
||||
echo You only have the Office Dashboard app installed. You need to install the full version of Office.
|
||||
echo You only have the Office Dashboard app installed; you need to install the full version of Office.
|
||||
)
|
||||
call :dk_color %Blue% "Download and install Office from the below URL and then try again."
|
||||
echo:
|
||||
call :dk_color %Blue% "Download and install Office from the URL below, then try again."
|
||||
set fixes=%fixes% %mas%genuine-installation-media
|
||||
call :dk_color %_Yellow% "%mas%genuine-installation-media"
|
||||
goto dk_done
|
||||
@ -2875,7 +2860,6 @@ echo Help: %mas%troubleshoot
|
||||
) else (
|
||||
call :dk_color %Red% "Some errors were detected."
|
||||
if not defined ierror if not defined showfix call :dk_color %Blue% "%_fixmsg%"
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
)
|
||||
@ -4543,7 +4527,6 @@ echo:
|
||||
if not defined results (
|
||||
call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options."
|
||||
call :dk_color %Blue% "After that, restart system and try activation again."
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "If it still shows the same error, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
)
|
||||
@ -4557,7 +4540,6 @@ echo .NET 3.5 Framework is corrupt or missing. Aborting...
|
||||
if exist "%SysPath%\spp\tokens\skus\Security-SPP-Component-SKU-Embedded" (
|
||||
echo Install .NET Framework 4.8 and Windows Management Framework 5.1
|
||||
)
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
@ -4571,7 +4553,6 @@ if !errorlevel! EQU 1051 (
|
||||
%eline%
|
||||
echo Evaluation WLMS service is running, %_slser% service can not be stopped. Aborting...
|
||||
echo Install Non-Eval version for Windows build %winbuild%.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
@ -5040,7 +5021,7 @@ set esuexistsup=
|
||||
set esueditionlist=
|
||||
set esuexistbutnosup=
|
||||
|
||||
for %%# in (EnterpriseS IoTEnterpriseS IoTEnterpriseSK) do (if /i %tsedition%==%%# set isltsc=1)
|
||||
if %winbuild% GTR 14393 for %%# in (EnterpriseS IoTEnterpriseS IoTEnterpriseSK) do (if /i %tsedition%==%%# set isltsc=1)
|
||||
if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-Server*Edition~*.mum" set isServer=1
|
||||
|
||||
if /i %tsedition%==Embedded (
|
||||
@ -5086,6 +5067,9 @@ f520e45e-7413-4a34-a497-d2765967d094_Client-ESU-Year1_-%w10EsuEditions%-%w10EsuE
|
||||
REM WindowsServer2016
|
||||
91bcac0a-d7d3-4d2b-bd0c-72fed675f01b_Server-ESU-Year3[1-3y]_-ServerDatacenter-ServerDatacenterCore-ServerDatacenterV-ServerDatacenterVCore-ServerStandard-ServerStandardCore-ServerStandardV-ServerStandardVCore-
|
||||
4cd0ab30-73a4-4dde-972c-512f05be31df_Server-ESU-Year6[4-6y]_-ServerDatacenter-ServerDatacenterCore-ServerDatacenterV-ServerDatacenterVCore-ServerStandard-ServerStandardCore-ServerStandardV-ServerStandardVCore-
|
||||
REM Windows10LTSB2016
|
||||
f2571710-2c24-4677-8fb5-a07d41d3c1aa_Client-ESU-Year3[1-3y]_-EnterpriseS-EnterpriseSN-
|
||||
22badfe6-7d55-4485-874b-7ec317442134_Client-ESU-Year6[4-6y]_-EnterpriseS-EnterpriseSN-
|
||||
) do (
|
||||
for /f "tokens=1-3 delims=_" %%A in ("%%#") do (
|
||||
echo "%allapps%" | find /i "%%A" %nul1% && (
|
||||
@ -5141,7 +5125,7 @@ goto :ts_off
|
||||
set esuavail=
|
||||
if defined _vis if defined isServer set esuavail=1
|
||||
if %winbuild% LEQ 7602 if not defined _vis if not defined isThinpc set esuavail=1
|
||||
if %winbuild% GTR 7602 if %winbuild% LSS 14393 if defined isServer set esuavail=1
|
||||
if %winbuild% GTR 7602 if %winbuild% LEQ 14393 if defined isServer set esuavail=1
|
||||
if %winbuild% GEQ 10240 if %winbuild% LEQ 19045 if not defined isServer set esuavail=1
|
||||
if %winbuild% EQU 9600 set esuavail=1
|
||||
|
||||
@ -5259,9 +5243,9 @@ call :dk_color %Gray% "Checking Installed Office [Not Found]"
|
||||
|
||||
if defined ohub (
|
||||
echo:
|
||||
echo You only have the Office Dashboard app installed. You need to install the full version of Office.
|
||||
echo You only have the Office Dashboard app installed; you need to install the full version of Office.
|
||||
)
|
||||
call :dk_color %Blue% "Download and install Office from below URL and try again."
|
||||
call :dk_color %Blue% "Download and install Office from the URL below, then try again."
|
||||
if %_actwin%==0 set fixes=%fixes% %mas%genuine-installation-media
|
||||
call :dk_color %_Yellow% "%mas%genuine-installation-media"
|
||||
goto :ts_act
|
||||
@ -12217,7 +12201,6 @@ echo:
|
||||
if not defined results (
|
||||
call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options."
|
||||
call :dk_color %Blue% "After that, restart system and try activation again."
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "If it still shows the same error, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
)
|
||||
@ -12499,9 +12482,9 @@ call :dk_color %Red% "Checking Installed Office [Not Found]"
|
||||
|
||||
if defined ohub (
|
||||
echo:
|
||||
echo You only have the Office Dashboard app installed. You need to install the full version of Office.
|
||||
echo You only have the Office Dashboard app installed; you need to install the full version of Office.
|
||||
)
|
||||
call :dk_color %Blue% "Download and install Office from below URL and try again."
|
||||
call :dk_color %Blue% "Download and install Office from the URL below, then try again."
|
||||
set fixes=%fixes% %mas%genuine-installation-media
|
||||
call :dk_color %_Yellow% "%mas%genuine-installation-media"
|
||||
goto :ks_activate
|
||||
@ -17228,7 +17211,6 @@ if not exist %SysPath%\%%# (
|
||||
echo [%SysPath%\%%#] file is missing, aborting...
|
||||
call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options."
|
||||
call :dk_color %Blue% "After that, restart system and try activation again."
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "If it still shows the same error, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
goto dk_done
|
||||
@ -17446,7 +17428,6 @@ if not defined key (
|
||||
%eline%
|
||||
echo [%targetedition% ^| %winbuild%]
|
||||
echo Failed to get product key from pkeyhelper.dll.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
@ -17501,7 +17482,6 @@ echo:
|
||||
call :dk_color %Gray% "Reboot is required to fully change the edition."
|
||||
) else (
|
||||
call :dk_color %Red% "[Unsuccessful] [Error Code: !keyerror!]"
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
)
|
||||
@ -17582,7 +17562,6 @@ if not defined key (
|
||||
%eline%
|
||||
echo [%targetedition% ^| %winbuild%]
|
||||
echo Failed to get product key from pkeyhelper.dll.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
@ -18136,7 +18115,6 @@ if not defined o16c2r_reg (
|
||||
%eline%
|
||||
echo Office C2R 2016 or later is not installed, which is required for this script.
|
||||
echo Download and install Office from below URL and try again.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%genuine-installation-media
|
||||
call :dk_color %_Yellow% "%mas%genuine-installation-media"
|
||||
goto dk_done
|
||||
@ -18187,7 +18165,6 @@ if %winbuild% LSS 10240 if defined ltscfound (
|
||||
echo Installed Office appears to be from the Volume channel %ltsc19%%ltsc21%%ltsc24%,
|
||||
echo which is not officially supported on your Windows build version %winbuild%.
|
||||
echo Aborting...
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
@ -18201,7 +18178,6 @@ if defined unsupbuild (
|
||||
%eline%
|
||||
echo Unsupported Office %verchk% is installed on your Windows build version %winbuild%.
|
||||
echo Aborting...
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
@ -18308,7 +18284,6 @@ mode 98, 45
|
||||
if not exist %SystemRoot%\Temp\%list%.txt (
|
||||
%eline%
|
||||
echo Failed to generate available editions list.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto :oe_goback
|
||||
@ -18373,7 +18348,6 @@ set suites=1
|
||||
if not exist %SystemRoot%\Temp\getAppIds.txt (
|
||||
%eline%
|
||||
echo Failed to generate available apps list.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto :oe_goback
|
||||
@ -18403,6 +18377,11 @@ if defined Lync_st set Lync_st=Off
|
||||
set OneDrive_st=Off
|
||||
if defined suites (set Teams_st=Off) else (set Teams_st=)
|
||||
|
||||
set OutlookForWindows_st=
|
||||
if %winbuild% GEQ 19041 if defined Outlook_st echo %targetedition% | find /i "O365" %nul1% && (
|
||||
set OutlookForWindows_st=Off
|
||||
)
|
||||
|
||||
:oe_excludeapps
|
||||
|
||||
cls
|
||||
@ -18418,7 +18397,7 @@ if defined suites echo:
|
||||
if defined Access_st echo [A] Access : %Access_st%
|
||||
if defined Excel_st echo [E] Excel : %Excel_st%
|
||||
if defined OneNote_st echo [N] OneNote : %OneNote_st%
|
||||
if defined Outlook_st echo [O] Outlook : %Outlook_st%
|
||||
if defined Outlook_st echo [O] Outlook ^(Classic^) : %Outlook_st%
|
||||
if defined PowerPoint_st echo [P] PowerPoint : %PowerPoint_st%
|
||||
if defined Project_st echo [J] Project : %Project_st%
|
||||
if defined Publisher_st echo [R] Publisher : %Publisher_st%
|
||||
@ -18426,6 +18405,7 @@ if defined Visio_st echo [V] Visio : %Visio_st%
|
||||
if defined Word_st echo [W] Word : %Word_st%
|
||||
echo:
|
||||
if defined Lync_st echo [L] SkypeForBusiness : %Lync_st%
|
||||
if defined OutlookForWindows_st echo [K] Outlook ^(New^) : %OutlookForWindows_st%
|
||||
if defined OneDrive_st echo [D] OneDrive : %OneDrive_st%
|
||||
if defined Teams_st echo [T] Teams : %Teams_st%
|
||||
%line%
|
||||
@ -18435,12 +18415,13 @@ echo [0] Go Back
|
||||
%line%
|
||||
echo:
|
||||
call :dk_color %_Green% "Choose a menu option using your keyboard:"
|
||||
choice /C:AENOPJRVWLDT10 /N
|
||||
choice /C:AENOPJRVWLKDT10 /N
|
||||
set _el=!errorlevel!
|
||||
if !_el!==14 goto :oemenu
|
||||
if !_el!==13 call :excludelist & goto :oe_editionchangefinal
|
||||
if !_el!==12 if defined Teams_st (if "%Teams_st%"=="Off" (set Teams_st=ON) else (set Teams_st=Off))
|
||||
if !_el!==11 if defined OneDrive_st (if "%OneDrive_st%"=="Off" (set OneDrive_st=ON) else (set OneDrive_st=Off))
|
||||
if !_el!==15 goto :oemenu
|
||||
if !_el!==14 call :excludelist & goto :oe_editionchangefinal
|
||||
if !_el!==13 if defined Teams_st (if "%Teams_st%"=="Off" (set Teams_st=ON) else (set Teams_st=Off))
|
||||
if !_el!==12 if defined OneDrive_st (if "%OneDrive_st%"=="Off" (set OneDrive_st=ON) else (set OneDrive_st=Off))
|
||||
if !_el!==11 if defined OutlookForWindows_st (if "%OutlookForWindows_st%"=="Off" (set OutlookForWindows_st=ON) else (set OutlookForWindows_st=Off))
|
||||
if !_el!==10 if defined Lync_st (if "%Lync_st%"=="Off" (set Lync_st=ON) else (set Lync_st=Off))
|
||||
if !_el!==9 if defined Word_st (if "%Word_st%"=="Off" (set Word_st=ON) else (set Word_st=Off))
|
||||
if !_el!==8 if defined Visio_st (if "%Visio_st%"=="Off" (set Visio_st=ON) else (set Visio_st=Off))
|
||||
@ -18467,6 +18448,7 @@ publisher
|
||||
visio
|
||||
word
|
||||
lync
|
||||
outlookforwindows
|
||||
onedrive
|
||||
teams
|
||||
) do (
|
||||
@ -18892,7 +18874,6 @@ goto :oe_goback
|
||||
if not defined build (
|
||||
%eline%
|
||||
call :dk_color %Red% "Failed to detect build number for the target FFN."
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto :oe_goback
|
||||
@ -18930,7 +18911,6 @@ for /l %%i in (1,1,30) do (if !clverchk! LSS %buildchk% (call :ch_getinfo&timeou
|
||||
if %clverchk% LSS %buildchk% (
|
||||
echo:
|
||||
call :dk_color %Red% "Failed to update Office C2R client. Aborting..."
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto :oe_goback
|
||||
|
||||
@ -260,7 +260,6 @@ REM check LanguageMode
|
||||
echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && (
|
||||
echo FullLanguage mode not found in PowerShell. Aborting...
|
||||
echo If you have applied restrictions on Powershell then undo those changes.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%fix_powershell
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_powershell"
|
||||
goto dk_done
|
||||
@ -270,7 +269,6 @@ REM check Powershell core version
|
||||
|
||||
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && (
|
||||
echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting...
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
goto dk_done
|
||||
@ -281,7 +279,6 @@ REM check for Mal-ware that may cause issues with Powershell
|
||||
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
|
||||
echo "%%f"
|
||||
echo Mal%blank%ware found, PowerShell is not working properly.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%remove_mal%w%ware
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
|
||||
goto dk_done
|
||||
@ -293,7 +290,6 @@ if /i "!tstresult2!"=="FullLanguage" (
|
||||
cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul%
|
||||
if !errorlevel!==3 (
|
||||
echo Windows Powershell failed to load .NET command. Aborting...
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
goto dk_done
|
||||
@ -314,7 +310,6 @@ echo Installed Antivirus - Microsoft Defender for Endpoint
|
||||
cmd /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 ', '))}"""
|
||||
)
|
||||
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
@ -425,7 +420,6 @@ echo:
|
||||
if not defined results (
|
||||
call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options."
|
||||
call :dk_color %Blue% "After that, restart system and try activation again."
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "If it still shows the same error, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
)
|
||||
@ -472,7 +466,6 @@ echo [%winos% ^| %winbuild%]
|
||||
echo:
|
||||
echo Evaluation editions cannot be activated outside of their evaluation period.
|
||||
call :dk_color %Blue% "Use TSforge activation option from the main menu to reset evaluation period."
|
||||
echo:
|
||||
set fixes=%fixes% %mas%evaluation_editions
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%evaluation_editions"
|
||||
goto dk_done
|
||||
@ -744,7 +737,6 @@ licensing.mp.microsoft.com
|
||||
findstr /i "%%#" "%SysPath%\drivers\etc\hosts" %nul1% && set "hosfail= [%%# Blocked in Hosts]"
|
||||
)
|
||||
call :dk_color %Red% "Checking Licensing Servers [Failed to Connect]!hosfail!"
|
||||
echo:
|
||||
set fixes=%fixes% %mas%licensing-servers-issue
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%licensing-servers-issue"
|
||||
echo:
|
||||
@ -813,7 +805,6 @@ if %keyerror% EQU 0 if not defined _perm if defined _int (
|
||||
if not defined wucorrupt if not defined wublock if not defined wuerror if not defined storeblock if not defined resfail (
|
||||
echo "%error_code%" | findstr /i "0x80072e 0x80072f 0x800704cf 0x87e10bcf 0x800705b4" %nul% && (
|
||||
call :dk_color %Red% "Checking Internet Issues [Found] %error_code%"
|
||||
echo:
|
||||
set fixes=%fixes% %mas%licensing-servers-issue
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%licensing-servers-issue"
|
||||
echo:
|
||||
@ -1231,7 +1222,6 @@ 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..."
|
||||
if defined results (call :dk_color %Red% "%results%"&set showfix=1)
|
||||
echo:
|
||||
set fixes=%fixes% %mas%remove_mal%w%ware
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
|
||||
echo:
|
||||
@ -1314,7 +1304,6 @@ set showfix=1
|
||||
)
|
||||
echo "%imagestate%" | find /i "UNDEPLOYABLE" %nul% && (
|
||||
if not defined showfix (
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "If the activation fails, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
echo:
|
||||
@ -1485,7 +1474,6 @@ set showfix=1
|
||||
if %winbuild% GEQ 7600 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] [Most likely caused by gaming spoofers]"
|
||||
if not defined showfix (
|
||||
echo:
|
||||
set fixes=%fixes% %mas%issues_due_to_gaming_spoofers
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
|
||||
echo:
|
||||
@ -1506,7 +1494,6 @@ if %winbuild% LSS 9200 set "tokenstore=%Systemdrive%\Windows\ServiceProfiles\Net
|
||||
if %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" (
|
||||
call :dk_color %Red% "Checking TokenStore Registry Key [Correct Path Not Found] [!tokenstore!]"
|
||||
if not defined showfix (
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
echo:
|
||||
@ -1537,7 +1524,6 @@ call :dk_color %Gray% "Checking SPP Token Folder [Not Found, Creat
|
||||
) else (
|
||||
call :dk_color %Red% "Checking SPP Token Folder [Not Found, Failed to Create] [%tokenstore%\]"
|
||||
if not defined showfix (
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
echo:
|
||||
@ -1727,7 +1713,6 @@ set showfix=1
|
||||
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || (
|
||||
call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]"
|
||||
if not defined showfix (
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
echo:
|
||||
@ -1852,7 +1837,6 @@ if "!taskinfo!"=="" set "taskinfo=Not Found"
|
||||
|
||||
call :dk_color %Gray% "Checking SvcRestartTask Status [!taskinfo!. System might deactivate later.]"
|
||||
if not defined showfix (
|
||||
echo:
|
||||
echo "!taskinfo!" | findstr /i "Removed Not Found" %nul1% && (
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
|
||||
@ -269,7 +269,6 @@ REM check LanguageMode
|
||||
echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && (
|
||||
echo FullLanguage mode not found in PowerShell. Aborting...
|
||||
echo If you have applied restrictions on Powershell then undo those changes.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%fix_powershell
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_powershell"
|
||||
goto dk_done
|
||||
@ -279,7 +278,6 @@ REM check Powershell core version
|
||||
|
||||
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && (
|
||||
echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting...
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
goto dk_done
|
||||
@ -290,7 +288,6 @@ REM check for Mal-ware that may cause issues with Powershell
|
||||
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
|
||||
echo "%%f"
|
||||
echo Mal%blank%ware found, PowerShell is not working properly.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%remove_mal%w%ware
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
|
||||
goto dk_done
|
||||
@ -302,7 +299,6 @@ if /i "!tstresult2!"=="FullLanguage" (
|
||||
cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul%
|
||||
if !errorlevel!==3 (
|
||||
echo Windows Powershell failed to load .NET command. Aborting...
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
goto dk_done
|
||||
@ -323,7 +319,6 @@ echo Installed Antivirus - Microsoft Defender for Endpoint
|
||||
cmd /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 ', '))}"""
|
||||
)
|
||||
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
@ -471,7 +466,6 @@ echo:
|
||||
if not defined results (
|
||||
call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options."
|
||||
call :dk_color %Blue% "After that, restart system and try activation again."
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "If it still shows the same error, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
)
|
||||
@ -573,7 +567,6 @@ echo:
|
||||
echo You only have the Office Dashboard app installed; you need to install the full version of Office.
|
||||
)
|
||||
call :dk_color %Blue% "Download and install Office from the URL below, then try again."
|
||||
echo:
|
||||
set fixes=%fixes% %mas%genuine-installation-media
|
||||
call :dk_color %_Yellow% "%mas%genuine-installation-media"
|
||||
goto dk_done
|
||||
@ -788,7 +781,6 @@ echo Help: %mas%troubleshoot
|
||||
) else (
|
||||
call :dk_color %Red% "Some errors were detected."
|
||||
if not defined ierror if not defined showfix call :dk_color %Blue% "%_fixmsg%"
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
)
|
||||
@ -1941,7 +1933,6 @@ 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..."
|
||||
if defined results (call :dk_color %Red% "%results%"&set showfix=1)
|
||||
echo:
|
||||
set fixes=%fixes% %mas%remove_mal%w%ware
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
|
||||
echo:
|
||||
@ -2024,7 +2015,6 @@ set showfix=1
|
||||
)
|
||||
echo "%imagestate%" | find /i "UNDEPLOYABLE" %nul% && (
|
||||
if not defined showfix (
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "If the activation fails, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
echo:
|
||||
@ -2195,7 +2185,6 @@ set showfix=1
|
||||
if %winbuild% GEQ 7600 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] [Most likely caused by gaming spoofers]"
|
||||
if not defined showfix (
|
||||
echo:
|
||||
set fixes=%fixes% %mas%issues_due_to_gaming_spoofers
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
|
||||
echo:
|
||||
@ -2216,7 +2205,6 @@ if %winbuild% LSS 9200 set "tokenstore=%Systemdrive%\Windows\ServiceProfiles\Net
|
||||
if %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" (
|
||||
call :dk_color %Red% "Checking TokenStore Registry Key [Correct Path Not Found] [!tokenstore!]"
|
||||
if not defined showfix (
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
echo:
|
||||
@ -2247,7 +2235,6 @@ call :dk_color %Gray% "Checking SPP Token Folder [Not Found, Creat
|
||||
) else (
|
||||
call :dk_color %Red% "Checking SPP Token Folder [Not Found, Failed to Create] [%tokenstore%\]"
|
||||
if not defined showfix (
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
echo:
|
||||
@ -2437,7 +2424,6 @@ set showfix=1
|
||||
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || (
|
||||
call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]"
|
||||
if not defined showfix (
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
echo:
|
||||
@ -2562,7 +2548,6 @@ if "!taskinfo!"=="" set "taskinfo=Not Found"
|
||||
|
||||
call :dk_color %Gray% "Checking SvcRestartTask Status [!taskinfo!. System might deactivate later.]"
|
||||
if not defined showfix (
|
||||
echo:
|
||||
echo "!taskinfo!" | findstr /i "Removed Not Found" %nul1% && (
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
|
||||
@ -300,7 +300,6 @@ REM check LanguageMode
|
||||
echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && (
|
||||
echo FullLanguage mode not found in PowerShell. Aborting...
|
||||
echo If you have applied restrictions on Powershell then undo those changes.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%fix_powershell
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_powershell"
|
||||
goto dk_done
|
||||
@ -310,7 +309,6 @@ REM check Powershell core version
|
||||
|
||||
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && (
|
||||
echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting...
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
goto dk_done
|
||||
@ -321,7 +319,6 @@ REM check for Mal-ware that may cause issues with Powershell
|
||||
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
|
||||
echo "%%f"
|
||||
echo Mal%blank%ware found, PowerShell is not working properly.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%remove_mal%w%ware
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
|
||||
goto dk_done
|
||||
@ -333,7 +330,6 @@ if /i "!tstresult2!"=="FullLanguage" (
|
||||
cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul%
|
||||
if !errorlevel!==3 (
|
||||
echo Windows Powershell failed to load .NET command. Aborting...
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
goto dk_done
|
||||
@ -354,7 +350,6 @@ echo Installed Antivirus - Microsoft Defender for Endpoint
|
||||
cmd /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 ', '))}"""
|
||||
)
|
||||
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
@ -534,7 +529,6 @@ echo:
|
||||
if not defined results (
|
||||
call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options."
|
||||
call :dk_color %Blue% "After that, restart system and try activation again."
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "If it still shows the same error, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
)
|
||||
@ -2983,7 +2977,6 @@ 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..."
|
||||
if defined results (call :dk_color %Red% "%results%"&set showfix=1)
|
||||
echo:
|
||||
set fixes=%fixes% %mas%remove_mal%w%ware
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
|
||||
echo:
|
||||
@ -3066,7 +3059,6 @@ set showfix=1
|
||||
)
|
||||
echo "%imagestate%" | find /i "UNDEPLOYABLE" %nul% && (
|
||||
if not defined showfix (
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "If the activation fails, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
echo:
|
||||
@ -3237,7 +3229,6 @@ set showfix=1
|
||||
if %winbuild% GEQ 7600 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] [Most likely caused by gaming spoofers]"
|
||||
if not defined showfix (
|
||||
echo:
|
||||
set fixes=%fixes% %mas%issues_due_to_gaming_spoofers
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
|
||||
echo:
|
||||
@ -3258,7 +3249,6 @@ if %winbuild% LSS 9200 set "tokenstore=%Systemdrive%\Windows\ServiceProfiles\Net
|
||||
if %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" (
|
||||
call :dk_color %Red% "Checking TokenStore Registry Key [Correct Path Not Found] [!tokenstore!]"
|
||||
if not defined showfix (
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
echo:
|
||||
@ -3289,7 +3279,6 @@ call :dk_color %Gray% "Checking SPP Token Folder [Not Found, Creat
|
||||
) else (
|
||||
call :dk_color %Red% "Checking SPP Token Folder [Not Found, Failed to Create] [%tokenstore%\]"
|
||||
if not defined showfix (
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
echo:
|
||||
@ -3381,7 +3370,7 @@ echo Checking WPA Registry Count [%wpainfo%]
|
||||
|
||||
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && (
|
||||
call :dk_color %Red% "Checking Rearm [System is Rearmed]"
|
||||
if not defined showfix
|
||||
if not defined showfix (
|
||||
call :dk_color %Blue% "Reboot your machine using the restart option to fix this error."
|
||||
echo:
|
||||
)
|
||||
@ -3479,7 +3468,6 @@ set showfix=1
|
||||
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || (
|
||||
call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]"
|
||||
if not defined showfix (
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
echo:
|
||||
@ -3604,7 +3592,6 @@ if "!taskinfo!"=="" set "taskinfo=Not Found"
|
||||
|
||||
call :dk_color %Gray% "Checking SvcRestartTask Status [!taskinfo!. System might deactivate later.]"
|
||||
if not defined showfix (
|
||||
echo:
|
||||
echo "!taskinfo!" | findstr /i "Removed Not Found" %nul1% && (
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
|
||||
@ -212,7 +212,6 @@ call :dk_setvar
|
||||
if %winbuild% EQU 1 (
|
||||
%eline%
|
||||
echo Failed to detect Windows build number.
|
||||
echo:
|
||||
setlocal EnableDelayedExpansion
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
@ -327,7 +326,6 @@ REM check LanguageMode
|
||||
echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && (
|
||||
echo FullLanguage mode not found in PowerShell. Aborting...
|
||||
echo If you have applied restrictions on Powershell then undo those changes.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%fix_powershell
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_powershell"
|
||||
goto dk_done
|
||||
@ -337,7 +335,6 @@ REM check Powershell core version
|
||||
|
||||
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && (
|
||||
echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting...
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
goto dk_done
|
||||
@ -348,7 +345,6 @@ REM check for Mal-ware that may cause issues with Powershell
|
||||
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
|
||||
echo "%%f"
|
||||
echo Mal%blank%ware found, PowerShell is not working properly.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%remove_mal%w%ware
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
|
||||
goto dk_done
|
||||
@ -360,7 +356,6 @@ if /i "!tstresult2!"=="FullLanguage" (
|
||||
cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul%
|
||||
if !errorlevel!==3 (
|
||||
echo Windows Powershell failed to load .NET command. Aborting...
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
goto dk_done
|
||||
@ -381,7 +376,6 @@ echo Installed Antivirus - Microsoft Defender for Endpoint
|
||||
cmd /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 ', '))}"""
|
||||
)
|
||||
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
@ -604,7 +598,6 @@ echo:
|
||||
if not defined results (
|
||||
call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options."
|
||||
call :dk_color %Blue% "After that, restart system and try activation again."
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "If it still shows the same error, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
)
|
||||
@ -618,7 +611,6 @@ echo .NET 3.5 Framework is corrupt or missing. Aborting...
|
||||
if exist "%SysPath%\spp\tokens\skus\Security-SPP-Component-SKU-Embedded" (
|
||||
echo Install .NET Framework 4.8 and Windows Management Framework 5.1
|
||||
)
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
@ -632,7 +624,6 @@ if !errorlevel! EQU 1051 (
|
||||
%eline%
|
||||
echo Evaluation WLMS service is running, %_slser% service can not be stopped. Aborting...
|
||||
echo Install Non-Eval version for Windows build %winbuild%.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
@ -1101,7 +1092,7 @@ set esuexistsup=
|
||||
set esueditionlist=
|
||||
set esuexistbutnosup=
|
||||
|
||||
for %%# in (EnterpriseS IoTEnterpriseS IoTEnterpriseSK) do (if /i %tsedition%==%%# set isltsc=1)
|
||||
if %winbuild% GTR 14393 for %%# in (EnterpriseS IoTEnterpriseS IoTEnterpriseSK) do (if /i %tsedition%==%%# set isltsc=1)
|
||||
if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-Server*Edition~*.mum" set isServer=1
|
||||
|
||||
if /i %tsedition%==Embedded (
|
||||
@ -1147,6 +1138,9 @@ f520e45e-7413-4a34-a497-d2765967d094_Client-ESU-Year1_-%w10EsuEditions%-%w10EsuE
|
||||
REM WindowsServer2016
|
||||
91bcac0a-d7d3-4d2b-bd0c-72fed675f01b_Server-ESU-Year3[1-3y]_-ServerDatacenter-ServerDatacenterCore-ServerDatacenterV-ServerDatacenterVCore-ServerStandard-ServerStandardCore-ServerStandardV-ServerStandardVCore-
|
||||
4cd0ab30-73a4-4dde-972c-512f05be31df_Server-ESU-Year6[4-6y]_-ServerDatacenter-ServerDatacenterCore-ServerDatacenterV-ServerDatacenterVCore-ServerStandard-ServerStandardCore-ServerStandardV-ServerStandardVCore-
|
||||
REM Windows10LTSB2016
|
||||
f2571710-2c24-4677-8fb5-a07d41d3c1aa_Client-ESU-Year3[1-3y]_-EnterpriseS-EnterpriseSN-
|
||||
22badfe6-7d55-4485-874b-7ec317442134_Client-ESU-Year6[4-6y]_-EnterpriseS-EnterpriseSN-
|
||||
) do (
|
||||
for /f "tokens=1-3 delims=_" %%A in ("%%#") do (
|
||||
echo "%allapps%" | find /i "%%A" %nul1% && (
|
||||
@ -2999,7 +2993,6 @@ 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..."
|
||||
if defined results (call :dk_color %Red% "%results%"&set showfix=1)
|
||||
echo:
|
||||
set fixes=%fixes% %mas%remove_mal%w%ware
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
|
||||
echo:
|
||||
@ -3082,7 +3075,6 @@ set showfix=1
|
||||
)
|
||||
echo "%imagestate%" | find /i "UNDEPLOYABLE" %nul% && (
|
||||
if not defined showfix (
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "If the activation fails, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
echo:
|
||||
@ -3253,7 +3245,6 @@ set showfix=1
|
||||
if %winbuild% GEQ 7600 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] [Most likely caused by gaming spoofers]"
|
||||
if not defined showfix (
|
||||
echo:
|
||||
set fixes=%fixes% %mas%issues_due_to_gaming_spoofers
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
|
||||
echo:
|
||||
@ -3274,7 +3265,6 @@ if %winbuild% LSS 9200 set "tokenstore=%Systemdrive%\Windows\ServiceProfiles\Net
|
||||
if %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" (
|
||||
call :dk_color %Red% "Checking TokenStore Registry Key [Correct Path Not Found] [!tokenstore!]"
|
||||
if not defined showfix (
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
echo:
|
||||
@ -3305,7 +3295,6 @@ call :dk_color %Gray% "Checking SPP Token Folder [Not Found, Creat
|
||||
) else (
|
||||
call :dk_color %Red% "Checking SPP Token Folder [Not Found, Failed to Create] [%tokenstore%\]"
|
||||
if not defined showfix (
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
echo:
|
||||
@ -3495,7 +3484,6 @@ set showfix=1
|
||||
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || (
|
||||
call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]"
|
||||
if not defined showfix (
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
echo:
|
||||
@ -3620,7 +3608,6 @@ if "!taskinfo!"=="" set "taskinfo=Not Found"
|
||||
|
||||
call :dk_color %Gray% "Checking SvcRestartTask Status [!taskinfo!. System might deactivate later.]"
|
||||
if not defined showfix (
|
||||
echo:
|
||||
echo "!taskinfo!" | findstr /i "Removed Not Found" %nul1% && (
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
|
||||
@ -214,7 +214,6 @@ REM check LanguageMode
|
||||
echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && (
|
||||
echo FullLanguage mode not found in PowerShell. Aborting...
|
||||
echo If you have applied restrictions on Powershell then undo those changes.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%fix_powershell
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_powershell"
|
||||
goto dk_done
|
||||
@ -224,7 +223,6 @@ REM check Powershell core version
|
||||
|
||||
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && (
|
||||
echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting...
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
goto dk_done
|
||||
@ -235,7 +233,6 @@ REM check for Mal-ware that may cause issues with Powershell
|
||||
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
|
||||
echo "%%f"
|
||||
echo Mal%blank%ware found, PowerShell is not working properly.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%remove_mal%w%ware
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
|
||||
goto dk_done
|
||||
@ -247,7 +244,6 @@ if /i "!tstresult2!"=="FullLanguage" (
|
||||
cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul%
|
||||
if !errorlevel!==3 (
|
||||
echo Windows Powershell failed to load .NET command. Aborting...
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
goto dk_done
|
||||
@ -268,7 +264,6 @@ echo Installed Antivirus - Microsoft Defender for Endpoint
|
||||
cmd /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 ', '))}"""
|
||||
)
|
||||
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
@ -416,7 +411,6 @@ if not defined o16c2r_reg (
|
||||
%eline%
|
||||
echo Office C2R 2016 or later is not installed, which is required for this script.
|
||||
echo Download and install Office from below URL and try again.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%genuine-installation-media
|
||||
call :dk_color %_Yellow% "%mas%genuine-installation-media"
|
||||
goto dk_done
|
||||
@ -467,7 +461,6 @@ if %winbuild% LSS 10240 if defined ltscfound (
|
||||
echo Installed Office appears to be from the Volume channel %ltsc19%%ltsc21%%ltsc24%,
|
||||
echo which is not officially supported on your Windows build version %winbuild%.
|
||||
echo Aborting...
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
@ -481,7 +474,6 @@ if defined unsupbuild (
|
||||
%eline%
|
||||
echo Unsupported Office %verchk% is installed on your Windows build version %winbuild%.
|
||||
echo Aborting...
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
@ -588,7 +580,6 @@ mode 98, 45
|
||||
if not exist %SystemRoot%\Temp\%list%.txt (
|
||||
%eline%
|
||||
echo Failed to generate available editions list.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto :oe_goback
|
||||
@ -653,7 +644,6 @@ set suites=1
|
||||
if not exist %SystemRoot%\Temp\getAppIds.txt (
|
||||
%eline%
|
||||
echo Failed to generate available apps list.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto :oe_goback
|
||||
@ -683,6 +673,11 @@ if defined Lync_st set Lync_st=Off
|
||||
set OneDrive_st=Off
|
||||
if defined suites (set Teams_st=Off) else (set Teams_st=)
|
||||
|
||||
set OutlookForWindows_st=
|
||||
if %winbuild% GEQ 19041 if defined Outlook_st echo %targetedition% | find /i "O365" %nul1% && (
|
||||
set OutlookForWindows_st=Off
|
||||
)
|
||||
|
||||
:oe_excludeapps
|
||||
|
||||
cls
|
||||
@ -698,7 +693,7 @@ if defined suites echo:
|
||||
if defined Access_st echo [A] Access : %Access_st%
|
||||
if defined Excel_st echo [E] Excel : %Excel_st%
|
||||
if defined OneNote_st echo [N] OneNote : %OneNote_st%
|
||||
if defined Outlook_st echo [O] Outlook : %Outlook_st%
|
||||
if defined Outlook_st echo [O] Outlook ^(Classic^) : %Outlook_st%
|
||||
if defined PowerPoint_st echo [P] PowerPoint : %PowerPoint_st%
|
||||
if defined Project_st echo [J] Project : %Project_st%
|
||||
if defined Publisher_st echo [R] Publisher : %Publisher_st%
|
||||
@ -706,6 +701,7 @@ if defined Visio_st echo [V] Visio : %Visio_st%
|
||||
if defined Word_st echo [W] Word : %Word_st%
|
||||
echo:
|
||||
if defined Lync_st echo [L] SkypeForBusiness : %Lync_st%
|
||||
if defined OutlookForWindows_st echo [K] Outlook ^(New^) : %OutlookForWindows_st%
|
||||
if defined OneDrive_st echo [D] OneDrive : %OneDrive_st%
|
||||
if defined Teams_st echo [T] Teams : %Teams_st%
|
||||
%line%
|
||||
@ -715,12 +711,13 @@ echo [0] Go Back
|
||||
%line%
|
||||
echo:
|
||||
call :dk_color %_Green% "Choose a menu option using your keyboard:"
|
||||
choice /C:AENOPJRVWLDT10 /N
|
||||
choice /C:AENOPJRVWLKDT10 /N
|
||||
set _el=!errorlevel!
|
||||
if !_el!==14 goto :oemenu
|
||||
if !_el!==13 call :excludelist & goto :oe_editionchangefinal
|
||||
if !_el!==12 if defined Teams_st (if "%Teams_st%"=="Off" (set Teams_st=ON) else (set Teams_st=Off))
|
||||
if !_el!==11 if defined OneDrive_st (if "%OneDrive_st%"=="Off" (set OneDrive_st=ON) else (set OneDrive_st=Off))
|
||||
if !_el!==15 goto :oemenu
|
||||
if !_el!==14 call :excludelist & goto :oe_editionchangefinal
|
||||
if !_el!==13 if defined Teams_st (if "%Teams_st%"=="Off" (set Teams_st=ON) else (set Teams_st=Off))
|
||||
if !_el!==12 if defined OneDrive_st (if "%OneDrive_st%"=="Off" (set OneDrive_st=ON) else (set OneDrive_st=Off))
|
||||
if !_el!==11 if defined OutlookForWindows_st (if "%OutlookForWindows_st%"=="Off" (set OutlookForWindows_st=ON) else (set OutlookForWindows_st=Off))
|
||||
if !_el!==10 if defined Lync_st (if "%Lync_st%"=="Off" (set Lync_st=ON) else (set Lync_st=Off))
|
||||
if !_el!==9 if defined Word_st (if "%Word_st%"=="Off" (set Word_st=ON) else (set Word_st=Off))
|
||||
if !_el!==8 if defined Visio_st (if "%Visio_st%"=="Off" (set Visio_st=ON) else (set Visio_st=Off))
|
||||
@ -747,6 +744,7 @@ publisher
|
||||
visio
|
||||
word
|
||||
lync
|
||||
outlookforwindows
|
||||
onedrive
|
||||
teams
|
||||
) do (
|
||||
@ -1172,7 +1170,6 @@ goto :oe_goback
|
||||
if not defined build (
|
||||
%eline%
|
||||
call :dk_color %Red% "Failed to detect build number for the target FFN."
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto :oe_goback
|
||||
@ -1210,7 +1207,6 @@ for /l %%i in (1,1,30) do (if !clverchk! LSS %buildchk% (call :ch_getinfo&timeou
|
||||
if %clverchk% LSS %buildchk% (
|
||||
echo:
|
||||
call :dk_color %Red% "Failed to update Office C2R client. Aborting..."
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto :oe_goback
|
||||
|
||||
@ -219,7 +219,6 @@ REM check LanguageMode
|
||||
echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && (
|
||||
echo FullLanguage mode not found in PowerShell. Aborting...
|
||||
echo If you have applied restrictions on Powershell then undo those changes.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%fix_powershell
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_powershell"
|
||||
goto dk_done
|
||||
@ -229,7 +228,6 @@ REM check Powershell core version
|
||||
|
||||
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && (
|
||||
echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting...
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
goto dk_done
|
||||
@ -240,7 +238,6 @@ REM check for Mal-ware that may cause issues with Powershell
|
||||
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
|
||||
echo "%%f"
|
||||
echo Mal%blank%ware found, PowerShell is not working properly.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%remove_mal%w%ware
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
|
||||
goto dk_done
|
||||
@ -252,7 +249,6 @@ if /i "!tstresult2!"=="FullLanguage" (
|
||||
cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul%
|
||||
if !errorlevel!==3 (
|
||||
echo Windows Powershell failed to load .NET command. Aborting...
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
goto dk_done
|
||||
@ -273,7 +269,6 @@ echo Installed Antivirus - Microsoft Defender for Endpoint
|
||||
cmd /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 ', '))}"""
|
||||
)
|
||||
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
@ -397,7 +392,6 @@ if not exist %SysPath%\%%# (
|
||||
echo [%SysPath%\%%#] file is missing, aborting...
|
||||
call :dk_color %Blue% "Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options."
|
||||
call :dk_color %Blue% "After that, restart system and try activation again."
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "If it still shows the same error, do this - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
goto dk_done
|
||||
@ -615,7 +609,6 @@ if not defined key (
|
||||
%eline%
|
||||
echo [%targetedition% ^| %winbuild%]
|
||||
echo Failed to get product key from pkeyhelper.dll.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
@ -670,7 +663,6 @@ echo:
|
||||
call :dk_color %Gray% "Reboot is required to fully change the edition."
|
||||
) else (
|
||||
call :dk_color %Red% "[Unsuccessful] [Error Code: !keyerror!]"
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
)
|
||||
@ -751,7 +743,6 @@ if not defined key (
|
||||
%eline%
|
||||
echo [%targetedition% ^| %winbuild%]
|
||||
echo Failed to get product key from pkeyhelper.dll.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
|
||||
@ -230,7 +230,6 @@ REM check LanguageMode
|
||||
echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && (
|
||||
echo FullLanguage mode not found in PowerShell. Aborting...
|
||||
echo If you have applied restrictions on Powershell then undo those changes.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%fix_powershell
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_powershell"
|
||||
goto done2
|
||||
@ -240,7 +239,6 @@ REM check Powershell core version
|
||||
|
||||
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && (
|
||||
echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting...
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
goto done2
|
||||
@ -251,7 +249,6 @@ REM check for Mal-ware that may cause issues with Powershell
|
||||
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
|
||||
echo "%%f"
|
||||
echo Mal%blank%ware found, PowerShell is not working properly.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%remove_mal%w%ware
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
|
||||
goto done2
|
||||
@ -263,7 +260,6 @@ if /i "!tstresult2!"=="FullLanguage" (
|
||||
cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul%
|
||||
if !errorlevel!==3 (
|
||||
echo Windows Powershell failed to load .NET command. Aborting...
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
goto done2
|
||||
@ -284,7 +280,6 @@ echo Installed Antivirus - Microsoft Defender for Endpoint
|
||||
cmd /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 ', '))}"""
|
||||
)
|
||||
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto done2
|
||||
|
||||
@ -231,7 +231,6 @@ REM check LanguageMode
|
||||
echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && (
|
||||
echo FullLanguage mode not found in PowerShell. Aborting...
|
||||
echo If you have applied restrictions on Powershell then undo those changes.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%fix_powershell
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_powershell"
|
||||
goto dk_done
|
||||
@ -241,7 +240,6 @@ REM check Powershell core version
|
||||
|
||||
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && (
|
||||
echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting...
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
goto dk_done
|
||||
@ -252,7 +250,6 @@ REM check for Mal-ware that may cause issues with Powershell
|
||||
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
|
||||
echo "%%f"
|
||||
echo Mal%blank%ware found, PowerShell is not working properly.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%remove_mal%w%ware
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
|
||||
goto dk_done
|
||||
@ -264,7 +261,6 @@ if /i "!tstresult2!"=="FullLanguage" (
|
||||
cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul%
|
||||
if !errorlevel!==3 (
|
||||
echo Windows Powershell failed to load .NET command. Aborting...
|
||||
echo:
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
goto dk_done
|
||||
@ -285,7 +281,6 @@ echo Installed Antivirus - Microsoft Defender for Endpoint
|
||||
cmd /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 ', '))}"""
|
||||
)
|
||||
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
|
||||
Reference in New Issue
Block a user