mirror of
https://github.com/massgravel/Microsoft-Activation-Scripts.git
synced 2025-05-14 08:12:19 +00:00
Compare commits
No commits in common. "master" and "3.0" have entirely different histories.
14 changed files with 3507 additions and 8176 deletions
6
.gitattributes
vendored
6
.gitattributes
vendored
|
@ -1,4 +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
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,4 +1,4 @@
|
|||
@set masver=3.2
|
||||
@set masver=3.0
|
||||
@echo off
|
||||
|
||||
|
||||
|
@ -109,7 +109,7 @@ echo:
|
|||
echo Null service is not running, script may crash...
|
||||
echo:
|
||||
echo:
|
||||
echo Check this webpage for help - %mas%fix_service
|
||||
echo Help - %mas%fix_service
|
||||
echo:
|
||||
echo:
|
||||
ping 127.0.0.1 -n 20
|
||||
|
@ -124,7 +124,7 @@ echo:
|
|||
echo Error - Script either has LF line ending issue or an empty line at the end of the script is missing.
|
||||
echo:
|
||||
echo:
|
||||
echo Check this webpage for help - %mas%troubleshoot
|
||||
echo Help - %mas%troubleshoot
|
||||
echo:
|
||||
echo:
|
||||
ping 127.0.0.1 -n 20 >nul
|
||||
|
@ -167,7 +167,7 @@ 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"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
|
@ -219,6 +219,33 @@ goto dk_done
|
|||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Check PowerShell
|
||||
|
||||
REM :PStest: $ExecutionContext.SessionState.LanguageMode :PStest:
|
||||
|
||||
cmd /c "%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':PStest:\s*';iex ($f[1])"" | find /i "FullLanguage" %nul1% || (
|
||||
%eline%
|
||||
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode""
|
||||
echo:
|
||||
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | find /i "FullLanguage" %nul1% && (
|
||||
echo Failed to run Powershell command but Powershell is working.
|
||||
echo:
|
||||
cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { if ($i.displayName -notlike '*windows*') { $n += $i.displayName } }; if ($n) { Write-Host ('Installed 3rd party Antivirus might be blocking the script - ' + ($n -join ', ')) -ForegroundColor White -BackgroundColor Blue }"""
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
) || (
|
||||
echo PowerShell is not working. Aborting...
|
||||
echo If you have applied restrictions on Powershell then undo those changes.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%fix_powershell
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%fix_powershell"
|
||||
)
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Elevate script as admin and pass arguments and preventing loop
|
||||
|
||||
%nul1% fltmc || (
|
||||
|
@ -231,58 +258,6 @@ goto dk_done
|
|||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Check PowerShell
|
||||
|
||||
::pstst $ExecutionContext.SessionState.LanguageMode :pstst
|
||||
|
||||
for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}" %nul6%') do (set tstresult=%%a)
|
||||
|
||||
if /i not "%tstresult%"=="FullLanguage" (
|
||||
%eline%
|
||||
echo: %tstresult%
|
||||
cmd /c "%psc% $ExecutionContext.SessionState.LanguageMode"
|
||||
|
||||
REM check LanguageMode
|
||||
|
||||
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | 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
|
||||
)
|
||||
|
||||
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...
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
|
||||
REM check antivirus and other errors
|
||||
|
||||
echo PowerShell is not working properly. Aborting...
|
||||
cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { if ($i.displayName -notlike '*windows*') { $n += $i.displayName } }; if ($n) { Write-Host ('Installed 3rd party Antivirus might be blocking the script - ' + ($n -join ', ')) -ForegroundColor White -BackgroundColor Blue }"""
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Disable QuickEdit and launch from conhost.exe to avoid Terminal app
|
||||
|
||||
if %winbuild% GEQ 17763 (
|
||||
|
@ -293,33 +268,34 @@ set terminal=
|
|||
|
||||
:: Check if script is running in Terminal app
|
||||
|
||||
set r1=$TB = [AppDomain]::CurrentDomain.DefineDynamicAssembly(4, 1).DefineDynamicModule(2, $False).DefineType(0);
|
||||
set r2=%r1% [void]$TB.DefinePInvokeMethod('GetConsoleWindow', 'kernel32.dll', 22, 1, [IntPtr], @(), 1, 3).SetImplementationFlags(128);
|
||||
set r3=%r2% [void]$TB.DefinePInvokeMethod('SendMessageW', 'user32.dll', 22, 1, [IntPtr], @([IntPtr], [UInt32], [IntPtr], [IntPtr]), 1, 3).SetImplementationFlags(128);
|
||||
set d1=%r3% $hIcon = $TB.CreateType(); $hWnd = $hIcon::GetConsoleWindow();
|
||||
set d2=%d1% echo $($hIcon::SendMessageW($hWnd, 127, 0, 0) -ne [IntPtr]::Zero);
|
||||
|
||||
if defined terminal (
|
||||
set lines=0
|
||||
for /f "skip=2 tokens=2 delims=: " %%A in ('mode con') do if "!lines!"=="0" set lines=%%A
|
||||
if !lines! GEQ 100 set terminal=
|
||||
%psc% "%d2%" %nul2% | find /i "True" %nul1% && set terminal=
|
||||
)
|
||||
|
||||
if defined ps32onArm goto :skipQE
|
||||
if %_unattended%==1 goto :skipQE
|
||||
for %%# in (%_args%) do (if /i "%%#"=="-qedit" goto :skipQE)
|
||||
|
||||
:: Relaunch to disable QuickEdit in the current session and use conhost.exe instead of the Terminal app
|
||||
:: This code disables QuickEdit for the current cmd.exe session without making permanent registry changes
|
||||
:: It is included because clicking on the script window can pause execution, causing confusion that the script has stopped due to an error
|
||||
|
||||
set resetQE=1
|
||||
reg query HKCU\Console /v QuickEdit %nul2% | find /i "0x0" %nul1% && set resetQE=0
|
||||
reg add HKCU\Console /v QuickEdit /t REG_DWORD /d 0 /f %nul1%
|
||||
|
||||
if defined terminal (
|
||||
start conhost.exe "!_batf!" %_args% -qedit
|
||||
start reg add HKCU\Console /v QuickEdit /t REG_DWORD /d %resetQE% /f %nul1%
|
||||
exit /b
|
||||
) else if %resetQE% EQU 1 (
|
||||
start cmd.exe /c ""!_batf!" %_args% -qedit"
|
||||
start reg add HKCU\Console /v QuickEdit /t REG_DWORD /d %resetQE% /f %nul1%
|
||||
exit /b
|
||||
set "launchcmd=start conhost.exe %psc%"
|
||||
) else (
|
||||
set "launchcmd=%psc%"
|
||||
)
|
||||
|
||||
:: Disable QuickEdit in current session
|
||||
|
||||
set "d1=$t=[AppDomain]::CurrentDomain.DefineDynamicAssembly(4, 1).DefineDynamicModule(2, $False).DefineType(0);"
|
||||
set "d2=$t.DefinePInvokeMethod('GetStdHandle', 'kernel32.dll', 22, 1, [IntPtr], @([Int32]), 1, 3).SetImplementationFlags(128);"
|
||||
set "d3=$t.DefinePInvokeMethod('SetConsoleMode', 'kernel32.dll', 22, 1, [Boolean], @([IntPtr], [Int32]), 1, 3).SetImplementationFlags(128);"
|
||||
set "d4=$k=$t.CreateType(); $b=$k::SetConsoleMode($k::GetStdHandle(-10), 0x0080);"
|
||||
|
||||
%launchcmd% "%d1% %d2% %d3% %d4% & cmd.exe '/c' '!_PSarg! -qedit'" && (exit /b) || (set terminal=1)
|
||||
:skipQE
|
||||
|
||||
::========================================================================================================================================
|
||||
|
@ -328,18 +304,12 @@ exit /b
|
|||
|
||||
set -=
|
||||
set old=
|
||||
set pingp=
|
||||
set upver=%masver:.=%
|
||||
|
||||
for %%A in (
|
||||
activ%-%ated.win
|
||||
mass%-%grave.dev
|
||||
) do if not defined pingp (
|
||||
for /f "delims=[] tokens=2" %%B in ('ping -n 1 %%A') do (
|
||||
if not "%%B"=="" (set old=1& set pingp=1)
|
||||
for /f "delims=[] tokens=2" %%C in ('ping -n 1 updatecheck%upver%.%%A') do (
|
||||
if not "%%C"=="" set old=
|
||||
)
|
||||
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 activ%-%ated.win') do (
|
||||
if not "%%#"=="" set old=1
|
||||
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 updatecheck%upver%.activ%-%ated.win') do (
|
||||
if not "%%#"=="" set old=
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -381,13 +351,8 @@ if not exist %SysPath%\%%# (
|
|||
%eline%
|
||||
echo [%SysPath%\%%#] file is missing, aborting...
|
||||
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%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
)
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
)
|
||||
)
|
||||
|
@ -433,7 +398,7 @@ 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"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%evaluation_editions"
|
||||
goto dk_done
|
||||
)
|
||||
)
|
||||
|
@ -520,7 +485,7 @@ echo %mas%
|
|||
) else (
|
||||
echo Required license files not found in %SysPath%\spp\tokens\skus\
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
)
|
||||
echo:
|
||||
goto dk_done
|
||||
|
@ -543,7 +508,6 @@ call :dk_color %Blue% "Windows Subscription [SKU ID-%slcSKU%] detected. Script w
|
|||
echo:
|
||||
)
|
||||
|
||||
set generickey=1
|
||||
call :dk_inskey "[%key%]"
|
||||
|
||||
::========================================================================================================================================
|
||||
|
@ -700,7 +664,7 @@ findstr /i "%%#" "%SysPath%\drivers\etc\hosts" %nul1% && set "hosfail= [%%# Bloc
|
|||
)
|
||||
call :dk_color %Red% "Checking Licensing Servers [Failed to Connect]!hosfail!"
|
||||
set fixes=%fixes% %mas%licensing-servers-issue
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%licensing-servers-issue"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%licensing-servers-issue"
|
||||
)
|
||||
|
||||
::==========================================================================================================================================
|
||||
|
@ -737,7 +701,7 @@ 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."
|
||||
set fixes=%fixes% %mas%remove_mal%w%ware
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%remove_mal%w%ware"
|
||||
) else (
|
||||
call :dk_color %Blue% "HWID activation needs working Windows updates, if you have used any tool to block updates, undo it."
|
||||
)
|
||||
|
@ -762,7 +726,7 @@ if not defined wucorrupt if not defined wublock if not defined wuerror if not de
|
|||
echo "%error_code%" | findstr /i "0x80072e 0x80072f 0x800704cf 0x87e10bcf 0x800705b4" %nul% && (
|
||||
call :dk_color %Red% "Checking Internet Issues [Found] %error_code%"
|
||||
set fixes=%fixes% %mas%licensing-servers-issue
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%licensing-servers-issue"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%licensing-servers-issue"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -780,7 +744,7 @@ call :dk_color %Blue% "Use TSforge activation option from the main menu instead.
|
|||
) else (
|
||||
if not defined error call :dk_color %Blue% "%_fixmsg%"
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -814,16 +778,10 @@ goto :dk_done
|
|||
|
||||
:dk_setvar
|
||||
|
||||
set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe
|
||||
set psc=%ps% -nop -c
|
||||
set psc=powershell.exe
|
||||
set winbuild=1
|
||||
for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G
|
||||
|
||||
set _slexe=sppsvc.exe& set _slser=sppsvc
|
||||
if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc)
|
||||
if %winbuild% LSS 7600 if exist "%SysPath%\SLsvc.exe" (set _slexe=SLsvc.exe& set _slser=SLsvc)
|
||||
if %_slexe%==SLsvc.exe set _vis=1
|
||||
|
||||
set _NCS=1
|
||||
if %winbuild% LSS 10586 set _NCS=0
|
||||
if %winbuild% GEQ 10586 reg query "HKCU\Console" /v ForceV2 %nul2% | find /i "0x0" %nul1% && (set _NCS=0)
|
||||
|
@ -963,12 +921,11 @@ set keyerror=%errorlevel%
|
|||
cmd /c exit /b %keyerror%
|
||||
if %keyerror% NEQ 0 set "keyerror=[0x%=ExitCode%]"
|
||||
|
||||
if defined generickey (set "keyecho=Installing Generic Product Key ") else (set "keyecho=Installing Product Key ")
|
||||
if %keyerror% EQU 0 (
|
||||
if %sps%==SoftwareLicensingService call :dk_refresh
|
||||
echo %keyecho% %~1 [Successful]
|
||||
echo Installing Generic Product Key %~1 [Successful]
|
||||
) else (
|
||||
call :dk_color %Red% "%keyecho% %~1 [Failed] %keyerror%"
|
||||
call :dk_color %Red% "Installing Generic Product Key %~1 [Failed] %keyerror%"
|
||||
if not defined error (
|
||||
if defined altapplist call :dk_color %Red% "Activation ID not found for this key."
|
||||
call :dk_color %Blue% "%_fixmsg%"
|
||||
|
@ -977,7 +934,6 @@ set showfix=1
|
|||
set error=1
|
||||
)
|
||||
|
||||
set generickey=
|
||||
exit /b
|
||||
|
||||
:: Activation command
|
||||
|
@ -1016,8 +972,6 @@ exit /b
|
|||
|
||||
:dk_reeval
|
||||
|
||||
if %winbuild% LSS 7600 exit /b
|
||||
|
||||
:: This key is left by the system in rearm process and sppsvc sometimes fails to delete it, it causes issues in working of the Scheduled Tasks of SPP
|
||||
|
||||
set "ruleskey=HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedSystemState"
|
||||
|
@ -1063,13 +1017,13 @@ function InstallLicenseArr($Str) {
|
|||
ForEach ($x in $a) {InstallLicenseFile "$x"}
|
||||
}
|
||||
function InstallLicenseDir($Loc) {
|
||||
Get-ChildItem $Loc -Recurse -Filter *.xrm-ms | ForEach-Object {InstallLicenseFile $_.FullName}
|
||||
dir $Loc *.xrm-ms -af -s | select -expand FullName | % {InstallLicenseFile "$_"}
|
||||
}
|
||||
function ReinstallLicenses() {
|
||||
$Paths = @("$env:SysPath\oem", "$env:SysPath\licensing", "$env:SysPath\spp\tokens")
|
||||
foreach ($Path in $Paths) {
|
||||
if (Test-Path $Path) { InstallLicenseDir "$Path" }
|
||||
}
|
||||
$Oem = "$env:SysPath\oem"
|
||||
$Spp = "$env:SysPath\spp\tokens"
|
||||
InstallLicenseDir "$Spp"
|
||||
If (Test-Path $Oem) {InstallLicenseDir "$Oem"}
|
||||
}
|
||||
:xrm:
|
||||
|
||||
|
@ -1077,7 +1031,6 @@ function ReinstallLicenses() {
|
|||
|
||||
:dk_ckeckwmic
|
||||
|
||||
if %winbuild% LSS 9200 (set _wmic=1&exit /b)
|
||||
set _wmic=0
|
||||
for %%# in (wmic.exe) do @if not "%%~$PATH:#"=="" (
|
||||
cmd /c "wmic path Win32_ComputerSystem get CreationClassName /value" %nul2% | find /i "computersystem" %nul1% && set _wmic=1
|
||||
|
@ -1088,16 +1041,16 @@ exit /b
|
|||
|
||||
:dk_sppissue
|
||||
|
||||
sc start %_slser% %nul%
|
||||
sc start sppsvc %nul%
|
||||
set spperror=%errorlevel%
|
||||
|
||||
if %spperror% NEQ 1056 if %spperror% NEQ 0 (
|
||||
%eline%
|
||||
echo sc start %_slser% [Error Code: %spperror%]
|
||||
echo sc start sppsvc [Error Code: %spperror%]
|
||||
)
|
||||
|
||||
echo:
|
||||
%psc% "$job = Start-Job { (Get-WmiObject -Query 'SELECT * FROM %sps%').Version }; if (-not (Wait-Job $job -Timeout 30)) {write-host '%_slser% is not working correctly. Check this webpage for help - %mas%troubleshoot'}"
|
||||
%psc% "$job = Start-Job { (Get-WmiObject -Query 'SELECT * FROM %sps%').Version }; if (-not (Wait-Job $job -Timeout 30)) {write-host 'sppsvc is not working correctly. Help - %mas%troubleshoot'}"
|
||||
exit /b
|
||||
|
||||
:: Get Product name (WMI/REG methods are not reliable in all conditions, hence winbrand.dll method is used)
|
||||
|
@ -1105,7 +1058,7 @@ exit /b
|
|||
:dk_product
|
||||
|
||||
set d1=%ref% $meth = $TypeBuilder.DefinePInvokeMethod('BrandingFormatString', 'winbrand.dll', 'Public, Static', 1, [String], @([String]), 1, 3);
|
||||
set d1=%d1% $meth.SetImplementationFlags(128); $TypeBuilder.CreateType()::BrandingFormatString('%%WINDOWS_LONG%%') -replace [string][char]0xa9, '' -replace [string][char]0xae, '' -replace [string][char]0x2122, ''
|
||||
set d1=%d1% $meth.SetImplementationFlags(128); $TypeBuilder.CreateType()::BrandingFormatString('%%WINDOWS_LONG%%')
|
||||
|
||||
set winos=
|
||||
for /f "delims=" %%s in ('"%psc% %d1%"') do if not errorlevel 1 (set winos=%%s)
|
||||
|
@ -1161,11 +1114,11 @@ 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=[Antivirus URLs are blocked in hosts]"
|
||||
|
||||
sc start %_slser% %nul%
|
||||
sc start sppsvc %nul%
|
||||
echo "%errorlevel%" | findstr "577 225" %nul% && (
|
||||
set "results=%results%[Likely File Infector]"
|
||||
) || (
|
||||
if not exist %SysPath%\%_slexe% if not exist %SysPath%\alg.exe (set "results=%results%[Likely File Infector]")
|
||||
if not exist %SysPath%\sppsvc.exe if not exist %SysPath%\alg.exe (set "results=%results%[Likely File Infector]")
|
||||
)
|
||||
|
||||
if not "%results%%pupfound%"=="" (
|
||||
|
@ -1173,7 +1126,7 @@ if defined pupfound call :dk_color %Gray% "Checking PUP Activators
|
|||
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% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%remove_mal%w%ware"
|
||||
echo:
|
||||
)
|
||||
|
||||
|
@ -1245,7 +1198,6 @@ for %%# in (%serv_ste%) do (
|
|||
if /i %%#==ClipSVC (reg add "HKLM\SYSTEM\CurrentControlSet\Services\%%#" /v "Start" /t REG_DWORD /d "3" /f %nul% & sc config %%# start= demand %nul%)
|
||||
if /i %%#==wlidsvc sc config %%# start= demand %nul%
|
||||
if /i %%#==sppsvc (reg add "HKLM\SYSTEM\CurrentControlSet\Services\%%#" /v "Start" /t REG_DWORD /d "2" /f %nul% & sc config %%# start= delayed-auto %nul%)
|
||||
if /i %%#==SLsvc sc config %%# start= auto %nul%
|
||||
if /i %%#==KeyIso sc config %%# start= demand %nul%
|
||||
if /i %%#==LicenseManager sc config %%# start= demand %nul%
|
||||
if /i %%#==Winmgmt sc config %%# start= auto %nul%
|
||||
|
@ -1294,7 +1246,7 @@ set showfix=1
|
|||
)
|
||||
echo %serv_e% | findstr /i "sppsvc-1060" %nul% && (
|
||||
set fixes=%fixes% %mas%fix_service
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_service"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%fix_service"
|
||||
set showfix=1
|
||||
)
|
||||
)
|
||||
|
@ -1351,7 +1303,7 @@ if not defined notwinact if exist "%SystemRoot%\Servicing\Packages\Microsoft-Win
|
|||
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul2% | find /i "Eval" %nul1% || (
|
||||
call :dk_color %Red% "Checking Eval Packages [Non-Eval Licenses are installed in Eval Windows]"
|
||||
set fixes=%fixes% %mas%evaluation_editions
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%evaluation_editions"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%evaluation_editions"
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -1375,22 +1327,19 @@ if %osedition%==0 (
|
|||
call :dk_color %Red% "Checking Edition Name [Not Found In Registry]"
|
||||
) else (
|
||||
|
||||
if not exist "%SysPath%\spp\tokens\skus\%osedition%\%osedition%*.xrm-ms" if not exist "%SysPath%\spp\tokens\skus\Security-SPP-Component-SKU-%osedition%\*-%osedition%-*.xrm-ms" if not exist "%SysPath%\licensing\skus\Security-Licensing-SLC-Component-SKU-%osedition%\*-%osedition%-*.xrm-ms" (
|
||||
if not exist "%SysPath%\spp\tokens\skus\%osedition%\%osedition%*.xrm-ms" if not exist "%SysPath%\spp\tokens\skus\Security-SPP-Component-SKU-%osedition%\*-%osedition%-*.xrm-ms" (
|
||||
set skunotfound=1
|
||||
call :dk_color %Red% "Checking License Files [Not Found] [%osedition%]"
|
||||
)
|
||||
|
||||
if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*-%osedition%-*.mum" (
|
||||
if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-%osedition%Edition*.mum" (
|
||||
call :dk_color %Red% "Checking Package Files [Not Found] [%osedition%]"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
if %_wmic% EQU 1 wmic path %sps% get Version %nul%
|
||||
if %_wmic% EQU 0 %psc% "try { $null=([WMISEARCHER]'SELECT * FROM %sps%').Get().Version; exit 0 } catch { exit $_.Exception.InnerException.HResult }" %nul%
|
||||
%psc% "try { $null=([WMISEARCHER]'SELECT * FROM %sps%').Get().Version; exit 0 } catch { exit $_.Exception.InnerException.HResult }" %nul%
|
||||
set error_code=%errorlevel%
|
||||
cmd /c exit /b %error_code%
|
||||
if %error_code% NEQ 0 set "error_code=0x%=ExitCode%"
|
||||
|
@ -1460,7 +1409,7 @@ call :dk_color2 %Blue% "In case of activation issues, do this - " %_Yellow% " %m
|
|||
)
|
||||
|
||||
|
||||
for %%# in (SppEx%w%tComObj.exe SLsvc.exe sppsvc.exe sppsvc.exe\PerfOptions) 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 (
|
||||
|
@ -1474,39 +1423,38 @@ echo Checking SPP In IFEO [%_sppint%]
|
|||
)
|
||||
|
||||
|
||||
if %winbuild% GEQ 7600 for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" %nul6%') do if /i %%b NEQ 0x0 (
|
||||
for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" %nul6%') do if /i %%b NEQ 0x0 (
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" /t REG_DWORD /d "0" /f %nul%
|
||||
call :dk_color %Red% "Checking SkipRearm [Default 0 Value Not Found. Changing To 0]"
|
||||
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 20 | Out-Null"
|
||||
)
|
||||
|
||||
|
||||
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% || (
|
||||
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% "Most likely caused by gaming spoofers. Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
|
||||
call :dk_color2 %Blue% "Most likely caused by gaming spoofers. Help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
|
||||
set error=1
|
||||
set showfix=1
|
||||
)
|
||||
|
||||
|
||||
set tokenstore=
|
||||
if %winbuild% GEQ 7600 (
|
||||
for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v TokenStore %nul6%') do call set "tokenstore=%%b"
|
||||
if %winbuild% LSS 9200 set "tokenstore=%Systemdrive%\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform"
|
||||
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" (
|
||||
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" (
|
||||
set toerr=1
|
||||
set error=1
|
||||
set showfix=1
|
||||
call :dk_color %Red% "Checking TokenStore Registry Key [Correct Path Not Found] [!tokenstore!]"
|
||||
call :dk_color %Red% "Checking TokenStore Registry Key [Correct Path Not Found] [%tokenstore%]"
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
)
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
)
|
||||
|
||||
|
||||
:: This code creates token folder only if it's missing and sets default permission for it
|
||||
|
||||
if %winbuild% GEQ 7600 if not defined toerr if not exist "%tokenstore%\" (
|
||||
if not defined toerr if not exist "%tokenstore%\" (
|
||||
mkdir "%tokenstore%" %nul%
|
||||
if %winbuild% LSS 9200 set "d=$sddl = 'O:NSG:NSD:AI(A;OICIID;FA;;;SY)(A;OICIID;FA;;;BA)(A;OICIID;FA;;;NS)';"
|
||||
if %winbuild% GEQ 9200 set "d=$sddl = 'O:BAG:BAD:PAI(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)(A;OICIIO;GR;;;BU)(A;;FR;;;BU)(A;OICI;FA;;;S-1-5-80-123231216-2592883651-3715271367-3753151631-4175906628)';"
|
||||
|
@ -1527,7 +1475,7 @@ set showfix=1
|
|||
if not defined notwinact (
|
||||
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
||||
if not defined apps (
|
||||
%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul%
|
||||
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 20 | Out-Null; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul%
|
||||
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
||||
if not defined apps (
|
||||
set "_notfoundids=Key Not Installed / Act ID Not Found"
|
||||
|
@ -1542,7 +1490,7 @@ call :dk_color %Red% "Checking Activation IDs [!_notfoundids!]"
|
|||
)
|
||||
|
||||
|
||||
if %winbuild% GEQ 7600 if exist "%tokenstore%\" if not exist "%tokenstore%\tokens.dat" (
|
||||
if exist "%tokenstore%\" if not exist "%tokenstore%\tokens.dat" (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking SPP tokens.dat [Not Found] [%tokenstore%\]"
|
||||
)
|
||||
|
@ -1625,7 +1573,7 @@ exit /b
|
|||
$wpaKey = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', $env:COMPUTERNAME).OpenSubKey("SYSTEM\\WPA")
|
||||
$count = 0
|
||||
foreach ($subkeyName in $wpaKey.GetSubKeyNames()) {
|
||||
if ($subkeyName -match '8DEC0AF1-0341-4b93-85CD-72606C2DF94C.*') {
|
||||
if ($subkeyName -match '.*-.*-.*-.*-.*-') {
|
||||
$count++
|
||||
}
|
||||
}
|
||||
|
@ -1634,7 +1582,7 @@ $minBuildNumber = 14393
|
|||
if ($osVersion.Build -ge $minBuildNumber) {
|
||||
$subkeyHashTable = @{}
|
||||
foreach ($subkeyName in $wpaKey.GetSubKeyNames()) {
|
||||
if ($subkeyName -match '8DEC0AF1-0341-4b93-85CD-72606C2DF94C.*') {
|
||||
if ($subkeyName -match '.*-.*-.*-.*-.*-') {
|
||||
$keyNumber = $subkeyName -replace '.*-', ''
|
||||
$subkeyHashTable[$keyNumber] = $true
|
||||
}
|
||||
|
@ -1648,7 +1596,7 @@ if ($osVersion.Build -ge $minBuildNumber) {
|
|||
}
|
||||
}
|
||||
$wpaKey.GetSubKeyNames() | ForEach-Object {
|
||||
if ($_ -match '8DEC0AF1-0341-4b93-85CD-72606C2DF94C.*') {
|
||||
if ($_ -match '.*-.*-.*-.*-.*-') {
|
||||
if ($PSVersionTable.PSVersion.Major -lt 3) {
|
||||
cmd /c "reg query "HKLM\SYSTEM\WPA\$_" /ve /t REG_BINARY >nul 2>&1"
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
|
@ -1677,10 +1625,8 @@ $wpaKey.Close()
|
|||
|
||||
if %_NCS% EQU 1 (
|
||||
echo %esc%[%~1%~2%esc%[0m
|
||||
) else if exist %ps% (
|
||||
) else (
|
||||
%psc% write-host -back '%1' -fore '%2' '%3'
|
||||
) else if not exist %ps% (
|
||||
echo %~3
|
||||
)
|
||||
exit /b
|
||||
|
||||
|
@ -1688,10 +1634,8 @@ exit /b
|
|||
|
||||
if %_NCS% EQU 1 (
|
||||
echo %esc%[%~1%~2%esc%[%~3%~4%esc%[0m
|
||||
) else if exist %ps% (
|
||||
) else (
|
||||
%psc% write-host -back '%1' -fore '%2' '%3' -NoNewline; write-host -back '%4' -fore '%5' '%6'
|
||||
) else if not exist %ps% (
|
||||
echo %~3 %~6
|
||||
)
|
||||
exit /b
|
||||
|
||||
|
@ -1706,7 +1650,6 @@ if defined fixes (
|
|||
call :dk_color %White% "Follow ALL the ABOVE blue lines. "
|
||||
call :dk_color2 %Blue% "Press [1] to Open Support Webpage " %Gray% " Press [0] to Ignore"
|
||||
choice /C:10 /N
|
||||
if !errorlevel!==2 exit /b
|
||||
if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#))
|
||||
)
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@set masver=3.2
|
||||
@set masver=3.0
|
||||
@echo off
|
||||
|
||||
|
||||
|
@ -112,7 +112,7 @@ echo:
|
|||
echo Null service is not running, script may crash...
|
||||
echo:
|
||||
echo:
|
||||
echo Check this webpage for help - %mas%fix_service
|
||||
echo Help - %mas%fix_service
|
||||
echo:
|
||||
echo:
|
||||
ping 127.0.0.1 -n 20
|
||||
|
@ -127,7 +127,7 @@ echo:
|
|||
echo Error - Script either has LF line ending issue or an empty line at the end of the script is missing.
|
||||
echo:
|
||||
echo:
|
||||
echo Check this webpage for help - %mas%troubleshoot
|
||||
echo Help - %mas%troubleshoot
|
||||
echo:
|
||||
echo:
|
||||
ping 127.0.0.1 -n 20 >nul
|
||||
|
@ -173,7 +173,7 @@ 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"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
|
@ -222,6 +222,33 @@ goto dk_done
|
|||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Check PowerShell
|
||||
|
||||
REM :PStest: $ExecutionContext.SessionState.LanguageMode :PStest:
|
||||
|
||||
cmd /c "%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':PStest:\s*';iex ($f[1])"" | find /i "FullLanguage" %nul1% || (
|
||||
%eline%
|
||||
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode""
|
||||
echo:
|
||||
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | find /i "FullLanguage" %nul1% && (
|
||||
echo Failed to run Powershell command but Powershell is working.
|
||||
echo:
|
||||
cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { if ($i.displayName -notlike '*windows*') { $n += $i.displayName } }; if ($n) { Write-Host ('Installed 3rd party Antivirus might be blocking the script - ' + ($n -join ', ')) -ForegroundColor White -BackgroundColor Blue }"""
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
) || (
|
||||
echo PowerShell is not working. Aborting...
|
||||
echo If you have applied restrictions on Powershell then undo those changes.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%fix_powershell
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%fix_powershell"
|
||||
)
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Elevate script as admin and pass arguments and preventing loop
|
||||
|
||||
%nul1% fltmc || (
|
||||
|
@ -234,58 +261,6 @@ goto dk_done
|
|||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Check PowerShell
|
||||
|
||||
::pstst $ExecutionContext.SessionState.LanguageMode :pstst
|
||||
|
||||
for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}" %nul6%') do (set tstresult=%%a)
|
||||
|
||||
if /i not "%tstresult%"=="FullLanguage" (
|
||||
%eline%
|
||||
echo: %tstresult%
|
||||
cmd /c "%psc% $ExecutionContext.SessionState.LanguageMode"
|
||||
|
||||
REM check LanguageMode
|
||||
|
||||
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | 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
|
||||
)
|
||||
|
||||
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...
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
|
||||
REM check antivirus and other errors
|
||||
|
||||
echo PowerShell is not working properly. Aborting...
|
||||
cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { if ($i.displayName -notlike '*windows*') { $n += $i.displayName } }; if ($n) { Write-Host ('Installed 3rd party Antivirus might be blocking the script - ' + ($n -join ', ')) -ForegroundColor White -BackgroundColor Blue }"""
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Disable QuickEdit and launch from conhost.exe to avoid Terminal app
|
||||
|
||||
if %winbuild% GEQ 17763 (
|
||||
|
@ -296,33 +271,34 @@ set terminal=
|
|||
|
||||
:: Check if script is running in Terminal app
|
||||
|
||||
set r1=$TB = [AppDomain]::CurrentDomain.DefineDynamicAssembly(4, 1).DefineDynamicModule(2, $False).DefineType(0);
|
||||
set r2=%r1% [void]$TB.DefinePInvokeMethod('GetConsoleWindow', 'kernel32.dll', 22, 1, [IntPtr], @(), 1, 3).SetImplementationFlags(128);
|
||||
set r3=%r2% [void]$TB.DefinePInvokeMethod('SendMessageW', 'user32.dll', 22, 1, [IntPtr], @([IntPtr], [UInt32], [IntPtr], [IntPtr]), 1, 3).SetImplementationFlags(128);
|
||||
set d1=%r3% $hIcon = $TB.CreateType(); $hWnd = $hIcon::GetConsoleWindow();
|
||||
set d2=%d1% echo $($hIcon::SendMessageW($hWnd, 127, 0, 0) -ne [IntPtr]::Zero);
|
||||
|
||||
if defined terminal (
|
||||
set lines=0
|
||||
for /f "skip=2 tokens=2 delims=: " %%A in ('mode con') do if "!lines!"=="0" set lines=%%A
|
||||
if !lines! GEQ 100 set terminal=
|
||||
%psc% "%d2%" %nul2% | find /i "True" %nul1% && set terminal=
|
||||
)
|
||||
|
||||
if defined ps32onArm goto :skipQE
|
||||
if %_unattended%==1 goto :skipQE
|
||||
for %%# in (%_args%) do (if /i "%%#"=="-qedit" goto :skipQE)
|
||||
|
||||
:: Relaunch to disable QuickEdit in the current session and use conhost.exe instead of the Terminal app
|
||||
:: This code disables QuickEdit for the current cmd.exe session without making permanent registry changes
|
||||
:: It is included because clicking on the script window can pause execution, causing confusion that the script has stopped due to an error
|
||||
|
||||
set resetQE=1
|
||||
reg query HKCU\Console /v QuickEdit %nul2% | find /i "0x0" %nul1% && set resetQE=0
|
||||
reg add HKCU\Console /v QuickEdit /t REG_DWORD /d 0 /f %nul1%
|
||||
|
||||
if defined terminal (
|
||||
start conhost.exe "!_batf!" %_args% -qedit
|
||||
start reg add HKCU\Console /v QuickEdit /t REG_DWORD /d %resetQE% /f %nul1%
|
||||
exit /b
|
||||
) else if %resetQE% EQU 1 (
|
||||
start cmd.exe /c ""!_batf!" %_args% -qedit"
|
||||
start reg add HKCU\Console /v QuickEdit /t REG_DWORD /d %resetQE% /f %nul1%
|
||||
exit /b
|
||||
set "launchcmd=start conhost.exe %psc%"
|
||||
) else (
|
||||
set "launchcmd=%psc%"
|
||||
)
|
||||
|
||||
:: Disable QuickEdit in current session
|
||||
|
||||
set "d1=$t=[AppDomain]::CurrentDomain.DefineDynamicAssembly(4, 1).DefineDynamicModule(2, $False).DefineType(0);"
|
||||
set "d2=$t.DefinePInvokeMethod('GetStdHandle', 'kernel32.dll', 22, 1, [IntPtr], @([Int32]), 1, 3).SetImplementationFlags(128);"
|
||||
set "d3=$t.DefinePInvokeMethod('SetConsoleMode', 'kernel32.dll', 22, 1, [Boolean], @([IntPtr], [Int32]), 1, 3).SetImplementationFlags(128);"
|
||||
set "d4=$k=$t.CreateType(); $b=$k::SetConsoleMode($k::GetStdHandle(-10), 0x0080);"
|
||||
|
||||
%launchcmd% "%d1% %d2% %d3% %d4% & cmd.exe '/c' '!_PSarg! -qedit'" && (exit /b) || (set terminal=1)
|
||||
:skipQE
|
||||
|
||||
::========================================================================================================================================
|
||||
|
@ -331,18 +307,12 @@ exit /b
|
|||
|
||||
set -=
|
||||
set old=
|
||||
set pingp=
|
||||
set upver=%masver:.=%
|
||||
|
||||
for %%A in (
|
||||
activ%-%ated.win
|
||||
mass%-%grave.dev
|
||||
) do if not defined pingp (
|
||||
for /f "delims=[] tokens=2" %%B in ('ping -n 1 %%A') do (
|
||||
if not "%%B"=="" (set old=1& set pingp=1)
|
||||
for /f "delims=[] tokens=2" %%C in ('ping -n 1 updatecheck%upver%.%%A') do (
|
||||
if not "%%C"=="" set old=
|
||||
)
|
||||
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 activ%-%ated.win') do (
|
||||
if not "%%#"=="" set old=1
|
||||
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 updatecheck%upver%.activ%-%ated.win') do (
|
||||
if not "%%#"=="" set old=
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -421,13 +391,8 @@ if defined _fmiss (
|
|||
%eline%
|
||||
echo [%_fmiss%] file is missing, aborting...
|
||||
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%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
)
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
|
@ -484,7 +449,7 @@ 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"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%evaluation_editions"
|
||||
)
|
||||
goto dk_done
|
||||
)
|
||||
|
@ -500,7 +465,7 @@ if not exist "!_work!\clipup.exe" (
|
|||
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% "Check this webpage for help - " %_Yellow% " %mas%kms38"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%kms38"
|
||||
goto dk_done
|
||||
)
|
||||
)
|
||||
|
@ -512,7 +477,7 @@ if defined a_cor (
|
|||
if !errorlevel!==3 (
|
||||
%eline%
|
||||
echo Valid digital signature not found in clipup.exe file.
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
)
|
||||
)
|
||||
|
@ -580,13 +545,13 @@ if exist "%SysPath%\spp\tokens\skus\%osedition%\*GVLK*.xrm-ms" set sppks=1
|
|||
if defined skunotfound (
|
||||
call :dk_color %Red% "Required license files not found in %SysPath%\spp\tokens\skus\"
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
)
|
||||
|
||||
if defined sppks (
|
||||
call :dk_color %Red% "KMS38 activation is supported but failed to find the key."
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
)
|
||||
|
||||
if not defined skunotfound if not defined sppks (
|
||||
|
@ -622,7 +587,6 @@ call echo Checking Installed Product Key [Partial Key - %%_partial%%] [
|
|||
)
|
||||
|
||||
if defined key (
|
||||
set generickey=1
|
||||
call :dk_inskey "[%key%]"
|
||||
)
|
||||
|
||||
|
@ -637,7 +601,7 @@ if %_wmic% EQU 0 for /f "tokens=2 delims==" %%a in ('%psc% "(([WMISEARCHER]'SELE
|
|||
if not defined app (
|
||||
call :dk_color %Red% "Checking Installed GVLK Activation ID [Not Found] Aborting..."
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto :dk_done
|
||||
)
|
||||
|
||||
|
@ -721,6 +685,12 @@ set "_xmlexist=if exist "%tdir%\GenuineTicket.xml""
|
|||
|
||||
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 20 | Out-Null"
|
||||
|
||||
sc query sppsvc | find /i "STOPPED" %nul% && (
|
||||
echo Stopping sppsvc Service [Successful]
|
||||
) || (
|
||||
call :dk_color %Gray% "Stopping sppsvc Service [Failed]"
|
||||
)
|
||||
|
||||
%_xmlexist% (
|
||||
%psc% "Start-Job { Restart-Service ClipSVC } | Wait-Job -Timeout 20 | Out-Null"
|
||||
%_xmlexist% timeout /t 2 %nul%
|
||||
|
@ -799,7 +769,7 @@ goto :k_final
|
|||
call :dk_color %Red% "Activation Failed"
|
||||
if not defined error call :dk_color %Blue% "%_fixmsg%"
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
|
@ -914,16 +884,10 @@ $key.SetAccessControl($acl)
|
|||
|
||||
:dk_setvar
|
||||
|
||||
set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe
|
||||
set psc=%ps% -nop -c
|
||||
set psc=powershell.exe
|
||||
set winbuild=1
|
||||
for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G
|
||||
|
||||
set _slexe=sppsvc.exe& set _slser=sppsvc
|
||||
if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc)
|
||||
if %winbuild% LSS 7600 if exist "%SysPath%\SLsvc.exe" (set _slexe=SLsvc.exe& set _slser=SLsvc)
|
||||
if %_slexe%==SLsvc.exe set _vis=1
|
||||
|
||||
set _NCS=1
|
||||
if %winbuild% LSS 10586 set _NCS=0
|
||||
if %winbuild% GEQ 10586 reg query "HKCU\Console" /v ForceV2 %nul2% | find /i "0x0" %nul1% && (set _NCS=0)
|
||||
|
@ -1082,12 +1046,11 @@ set keyerror=%errorlevel%
|
|||
cmd /c exit /b %keyerror%
|
||||
if %keyerror% NEQ 0 set "keyerror=[0x%=ExitCode%]"
|
||||
|
||||
if defined generickey (set "keyecho=Installing Generic Product Key ") else (set "keyecho=Installing Product Key ")
|
||||
if %keyerror% EQU 0 (
|
||||
if %sps%==SoftwareLicensingService call :dk_refresh
|
||||
echo %keyecho% %~1 [Successful]
|
||||
echo Installing Generic Product Key %~1 [Successful]
|
||||
) else (
|
||||
call :dk_color %Red% "%keyecho% %~1 [Failed] %keyerror%"
|
||||
call :dk_color %Red% "Installing Generic Product Key %~1 [Failed] %keyerror%"
|
||||
if not defined error (
|
||||
if defined altapplist call :dk_color %Red% "Activation ID not found for this key."
|
||||
call :dk_color %Blue% "%_fixmsg%"
|
||||
|
@ -1096,7 +1059,6 @@ set showfix=1
|
|||
set error=1
|
||||
)
|
||||
|
||||
set generickey=
|
||||
exit /b
|
||||
|
||||
:: Get Windows installed key channel
|
||||
|
@ -1132,8 +1094,6 @@ exit /b
|
|||
|
||||
:dk_reeval
|
||||
|
||||
if %winbuild% LSS 7600 exit /b
|
||||
|
||||
:: This key is left by the system in rearm process and sppsvc sometimes fails to delete it, it causes issues in working of the Scheduled Tasks of SPP
|
||||
|
||||
set "ruleskey=HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedSystemState"
|
||||
|
@ -1161,13 +1121,13 @@ function InstallLicenseArr($Str) {
|
|||
ForEach ($x in $a) {InstallLicenseFile "$x"}
|
||||
}
|
||||
function InstallLicenseDir($Loc) {
|
||||
Get-ChildItem $Loc -Recurse -Filter *.xrm-ms | ForEach-Object {InstallLicenseFile $_.FullName}
|
||||
dir $Loc *.xrm-ms -af -s | select -expand FullName | % {InstallLicenseFile "$_"}
|
||||
}
|
||||
function ReinstallLicenses() {
|
||||
$Paths = @("$env:SysPath\oem", "$env:SysPath\licensing", "$env:SysPath\spp\tokens")
|
||||
foreach ($Path in $Paths) {
|
||||
if (Test-Path $Path) { InstallLicenseDir "$Path" }
|
||||
}
|
||||
$Oem = "$env:SysPath\oem"
|
||||
$Spp = "$env:SysPath\spp\tokens"
|
||||
InstallLicenseDir "$Spp"
|
||||
If (Test-Path $Oem) {InstallLicenseDir "$Oem"}
|
||||
}
|
||||
:xrm:
|
||||
|
||||
|
@ -1175,7 +1135,6 @@ function ReinstallLicenses() {
|
|||
|
||||
:dk_ckeckwmic
|
||||
|
||||
if %winbuild% LSS 9200 (set _wmic=1&exit /b)
|
||||
set _wmic=0
|
||||
for %%# in (wmic.exe) do @if not "%%~$PATH:#"=="" (
|
||||
cmd /c "wmic path Win32_ComputerSystem get CreationClassName /value" %nul2% | find /i "computersystem" %nul1% && set _wmic=1
|
||||
|
@ -1186,16 +1145,16 @@ exit /b
|
|||
|
||||
:dk_sppissue
|
||||
|
||||
sc start %_slser% %nul%
|
||||
sc start sppsvc %nul%
|
||||
set spperror=%errorlevel%
|
||||
|
||||
if %spperror% NEQ 1056 if %spperror% NEQ 0 (
|
||||
%eline%
|
||||
echo sc start %_slser% [Error Code: %spperror%]
|
||||
echo sc start sppsvc [Error Code: %spperror%]
|
||||
)
|
||||
|
||||
echo:
|
||||
%psc% "$job = Start-Job { (Get-WmiObject -Query 'SELECT * FROM %sps%').Version }; if (-not (Wait-Job $job -Timeout 30)) {write-host '%_slser% is not working correctly. Check this webpage for help - %mas%troubleshoot'}"
|
||||
%psc% "$job = Start-Job { (Get-WmiObject -Query 'SELECT * FROM %sps%').Version }; if (-not (Wait-Job $job -Timeout 30)) {write-host 'sppsvc is not working correctly. Help - %mas%troubleshoot'}"
|
||||
exit /b
|
||||
|
||||
:: Get Product name (WMI/REG methods are not reliable in all conditions, hence winbrand.dll method is used)
|
||||
|
@ -1203,7 +1162,7 @@ exit /b
|
|||
:dk_product
|
||||
|
||||
set d1=%ref% $meth = $TypeBuilder.DefinePInvokeMethod('BrandingFormatString', 'winbrand.dll', 'Public, Static', 1, [String], @([String]), 1, 3);
|
||||
set d1=%d1% $meth.SetImplementationFlags(128); $TypeBuilder.CreateType()::BrandingFormatString('%%WINDOWS_LONG%%') -replace [string][char]0xa9, '' -replace [string][char]0xae, '' -replace [string][char]0x2122, ''
|
||||
set d1=%d1% $meth.SetImplementationFlags(128); $TypeBuilder.CreateType()::BrandingFormatString('%%WINDOWS_LONG%%')
|
||||
|
||||
set winos=
|
||||
for /f "delims=" %%s in ('"%psc% %d1%"') do if not errorlevel 1 (set winos=%%s)
|
||||
|
@ -1304,11 +1263,11 @@ 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=[Antivirus URLs are blocked in hosts]"
|
||||
|
||||
sc start %_slser% %nul%
|
||||
sc start sppsvc %nul%
|
||||
echo "%errorlevel%" | findstr "577 225" %nul% && (
|
||||
set "results=%results%[Likely File Infector]"
|
||||
) || (
|
||||
if not exist %SysPath%\%_slexe% if not exist %SysPath%\alg.exe (set "results=%results%[Likely File Infector]")
|
||||
if not exist %SysPath%\sppsvc.exe if not exist %SysPath%\alg.exe (set "results=%results%[Likely File Infector]")
|
||||
)
|
||||
|
||||
if not "%results%%pupfound%"=="" (
|
||||
|
@ -1316,7 +1275,7 @@ if defined pupfound call :dk_color %Gray% "Checking PUP Activators
|
|||
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% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%remove_mal%w%ware"
|
||||
echo:
|
||||
)
|
||||
|
||||
|
@ -1388,7 +1347,6 @@ for %%# in (%serv_ste%) do (
|
|||
if /i %%#==ClipSVC (reg add "HKLM\SYSTEM\CurrentControlSet\Services\%%#" /v "Start" /t REG_DWORD /d "3" /f %nul% & sc config %%# start= demand %nul%)
|
||||
if /i %%#==wlidsvc sc config %%# start= demand %nul%
|
||||
if /i %%#==sppsvc (reg add "HKLM\SYSTEM\CurrentControlSet\Services\%%#" /v "Start" /t REG_DWORD /d "2" /f %nul% & sc config %%# start= delayed-auto %nul%)
|
||||
if /i %%#==SLsvc sc config %%# start= auto %nul%
|
||||
if /i %%#==KeyIso sc config %%# start= demand %nul%
|
||||
if /i %%#==LicenseManager sc config %%# start= demand %nul%
|
||||
if /i %%#==Winmgmt sc config %%# start= auto %nul%
|
||||
|
@ -1437,7 +1395,7 @@ set showfix=1
|
|||
)
|
||||
echo %serv_e% | findstr /i "sppsvc-1060" %nul% && (
|
||||
set fixes=%fixes% %mas%fix_service
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_service"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%fix_service"
|
||||
set showfix=1
|
||||
)
|
||||
)
|
||||
|
@ -1494,7 +1452,7 @@ if not defined notwinact if exist "%SystemRoot%\Servicing\Packages\Microsoft-Win
|
|||
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul2% | find /i "Eval" %nul1% || (
|
||||
call :dk_color %Red% "Checking Eval Packages [Non-Eval Licenses are installed in Eval Windows]"
|
||||
set fixes=%fixes% %mas%evaluation_editions
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%evaluation_editions"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%evaluation_editions"
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -1518,22 +1476,19 @@ if %osedition%==0 (
|
|||
call :dk_color %Red% "Checking Edition Name [Not Found In Registry]"
|
||||
) else (
|
||||
|
||||
if not exist "%SysPath%\spp\tokens\skus\%osedition%\%osedition%*.xrm-ms" if not exist "%SysPath%\spp\tokens\skus\Security-SPP-Component-SKU-%osedition%\*-%osedition%-*.xrm-ms" if not exist "%SysPath%\licensing\skus\Security-Licensing-SLC-Component-SKU-%osedition%\*-%osedition%-*.xrm-ms" (
|
||||
if not exist "%SysPath%\spp\tokens\skus\%osedition%\%osedition%*.xrm-ms" if not exist "%SysPath%\spp\tokens\skus\Security-SPP-Component-SKU-%osedition%\*-%osedition%-*.xrm-ms" (
|
||||
set skunotfound=1
|
||||
call :dk_color %Red% "Checking License Files [Not Found] [%osedition%]"
|
||||
)
|
||||
|
||||
if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*-%osedition%-*.mum" (
|
||||
if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-%osedition%Edition*.mum" (
|
||||
call :dk_color %Red% "Checking Package Files [Not Found] [%osedition%]"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
if %_wmic% EQU 1 wmic path %sps% get Version %nul%
|
||||
if %_wmic% EQU 0 %psc% "try { $null=([WMISEARCHER]'SELECT * FROM %sps%').Get().Version; exit 0 } catch { exit $_.Exception.InnerException.HResult }" %nul%
|
||||
%psc% "try { $null=([WMISEARCHER]'SELECT * FROM %sps%').Get().Version; exit 0 } catch { exit $_.Exception.InnerException.HResult }" %nul%
|
||||
set error_code=%errorlevel%
|
||||
cmd /c exit /b %error_code%
|
||||
if %error_code% NEQ 0 set "error_code=0x%=ExitCode%"
|
||||
|
@ -1603,7 +1558,7 @@ call :dk_color2 %Blue% "In case of activation issues, do this - " %_Yellow% " %m
|
|||
)
|
||||
|
||||
|
||||
for %%# in (SppEx%w%tComObj.exe SLsvc.exe sppsvc.exe sppsvc.exe\PerfOptions) 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 (
|
||||
|
@ -1617,39 +1572,38 @@ echo Checking SPP In IFEO [%_sppint%]
|
|||
)
|
||||
|
||||
|
||||
if %winbuild% GEQ 7600 for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" %nul6%') do if /i %%b NEQ 0x0 (
|
||||
for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" %nul6%') do if /i %%b NEQ 0x0 (
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" /t REG_DWORD /d "0" /f %nul%
|
||||
call :dk_color %Red% "Checking SkipRearm [Default 0 Value Not Found. Changing To 0]"
|
||||
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 20 | Out-Null"
|
||||
)
|
||||
|
||||
|
||||
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% || (
|
||||
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% "Most likely caused by gaming spoofers. Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
|
||||
call :dk_color2 %Blue% "Most likely caused by gaming spoofers. Help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
|
||||
set error=1
|
||||
set showfix=1
|
||||
)
|
||||
|
||||
|
||||
set tokenstore=
|
||||
if %winbuild% GEQ 7600 (
|
||||
for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v TokenStore %nul6%') do call set "tokenstore=%%b"
|
||||
if %winbuild% LSS 9200 set "tokenstore=%Systemdrive%\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform"
|
||||
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" (
|
||||
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" (
|
||||
set toerr=1
|
||||
set error=1
|
||||
set showfix=1
|
||||
call :dk_color %Red% "Checking TokenStore Registry Key [Correct Path Not Found] [!tokenstore!]"
|
||||
call :dk_color %Red% "Checking TokenStore Registry Key [Correct Path Not Found] [%tokenstore%]"
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
)
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
)
|
||||
|
||||
|
||||
:: This code creates token folder only if it's missing and sets default permission for it
|
||||
|
||||
if %winbuild% GEQ 7600 if not defined toerr if not exist "%tokenstore%\" (
|
||||
if not defined toerr if not exist "%tokenstore%\" (
|
||||
mkdir "%tokenstore%" %nul%
|
||||
if %winbuild% LSS 9200 set "d=$sddl = 'O:NSG:NSD:AI(A;OICIID;FA;;;SY)(A;OICIID;FA;;;BA)(A;OICIID;FA;;;NS)';"
|
||||
if %winbuild% GEQ 9200 set "d=$sddl = 'O:BAG:BAD:PAI(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)(A;OICIIO;GR;;;BU)(A;;FR;;;BU)(A;OICI;FA;;;S-1-5-80-123231216-2592883651-3715271367-3753151631-4175906628)';"
|
||||
|
@ -1670,7 +1624,7 @@ set showfix=1
|
|||
if not defined notwinact (
|
||||
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
||||
if not defined apps (
|
||||
%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul%
|
||||
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 20 | Out-Null; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul%
|
||||
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
||||
if not defined apps (
|
||||
set "_notfoundids=Key Not Installed / Act ID Not Found"
|
||||
|
@ -1685,7 +1639,7 @@ call :dk_color %Red% "Checking Activation IDs [!_notfoundids!]"
|
|||
)
|
||||
|
||||
|
||||
if %winbuild% GEQ 7600 if exist "%tokenstore%\" if not exist "%tokenstore%\tokens.dat" (
|
||||
if exist "%tokenstore%\" if not exist "%tokenstore%\tokens.dat" (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking SPP tokens.dat [Not Found] [%tokenstore%\]"
|
||||
)
|
||||
|
@ -1768,7 +1722,7 @@ exit /b
|
|||
$wpaKey = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', $env:COMPUTERNAME).OpenSubKey("SYSTEM\\WPA")
|
||||
$count = 0
|
||||
foreach ($subkeyName in $wpaKey.GetSubKeyNames()) {
|
||||
if ($subkeyName -match '8DEC0AF1-0341-4b93-85CD-72606C2DF94C.*') {
|
||||
if ($subkeyName -match '.*-.*-.*-.*-.*-') {
|
||||
$count++
|
||||
}
|
||||
}
|
||||
|
@ -1777,7 +1731,7 @@ $minBuildNumber = 14393
|
|||
if ($osVersion.Build -ge $minBuildNumber) {
|
||||
$subkeyHashTable = @{}
|
||||
foreach ($subkeyName in $wpaKey.GetSubKeyNames()) {
|
||||
if ($subkeyName -match '8DEC0AF1-0341-4b93-85CD-72606C2DF94C.*') {
|
||||
if ($subkeyName -match '.*-.*-.*-.*-.*-') {
|
||||
$keyNumber = $subkeyName -replace '.*-', ''
|
||||
$subkeyHashTable[$keyNumber] = $true
|
||||
}
|
||||
|
@ -1791,7 +1745,7 @@ if ($osVersion.Build -ge $minBuildNumber) {
|
|||
}
|
||||
}
|
||||
$wpaKey.GetSubKeyNames() | ForEach-Object {
|
||||
if ($_ -match '8DEC0AF1-0341-4b93-85CD-72606C2DF94C.*') {
|
||||
if ($_ -match '.*-.*-.*-.*-.*-') {
|
||||
if ($PSVersionTable.PSVersion.Major -lt 3) {
|
||||
cmd /c "reg query "HKLM\SYSTEM\WPA\$_" /ve /t REG_BINARY >nul 2>&1"
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
|
@ -1820,10 +1774,8 @@ $wpaKey.Close()
|
|||
|
||||
if %_NCS% EQU 1 (
|
||||
echo %esc%[%~1%~2%esc%[0m
|
||||
) else if exist %ps% (
|
||||
) else (
|
||||
%psc% write-host -back '%1' -fore '%2' '%3'
|
||||
) else if not exist %ps% (
|
||||
echo %~3
|
||||
)
|
||||
exit /b
|
||||
|
||||
|
@ -1831,10 +1783,8 @@ exit /b
|
|||
|
||||
if %_NCS% EQU 1 (
|
||||
echo %esc%[%~1%~2%esc%[%~3%~4%esc%[0m
|
||||
) else if exist %ps% (
|
||||
) else (
|
||||
%psc% write-host -back '%1' -fore '%2' '%3' -NoNewline; write-host -back '%4' -fore '%5' '%6'
|
||||
) else if not exist %ps% (
|
||||
echo %~3 %~6
|
||||
)
|
||||
exit /b
|
||||
|
||||
|
@ -1849,7 +1799,6 @@ if defined fixes (
|
|||
call :dk_color %White% "Follow ALL the ABOVE blue lines. "
|
||||
call :dk_color2 %Blue% "Press [1] to Open Support Webpage " %Gray% " Press [0] to Ignore"
|
||||
choice /C:10 /N
|
||||
if !errorlevel!==2 exit /b
|
||||
if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#))
|
||||
)
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -10,5 +10,4 @@ Online KMS - Windows / Office - 180 Days. Lifetime With Renewal
|
|||
|
||||
--------------------------------------------------------------------------------------
|
||||
|
||||
Check the below link for more details:
|
||||
https://massgrave.dev/chart
|
||||
For more details, check https://massgrave.dev/activations_comparison
|
|
@ -1,4 +1,4 @@
|
|||
@set masver=3.2
|
||||
@set masver=3.0
|
||||
@echo off
|
||||
|
||||
|
||||
|
@ -69,7 +69,7 @@ echo:
|
|||
echo Null service is not running, script may crash...
|
||||
echo:
|
||||
echo:
|
||||
echo Check this webpage for help - %mas%fix_service
|
||||
echo Help - %mas%fix_service
|
||||
echo:
|
||||
echo:
|
||||
ping 127.0.0.1 -n 20
|
||||
|
@ -84,7 +84,7 @@ echo:
|
|||
echo Error - Script either has LF line ending issue or an empty line at the end of the script is missing.
|
||||
echo:
|
||||
echo:
|
||||
echo Check this webpage for help - %mas%troubleshoot
|
||||
echo Help - %mas%troubleshoot
|
||||
echo:
|
||||
echo:
|
||||
ping 127.0.0.1 -n 20 >nul
|
||||
|
@ -129,14 +129,14 @@ 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"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
if %winbuild% LSS 7600 (
|
||||
%eline%
|
||||
%nceline%
|
||||
echo Unsupported OS version detected [%winbuild%].
|
||||
echo This option is supported only for Windows 7/8/8.1/10/11 and their Server equivalents.
|
||||
echo Project is supported only for Windows 7/8/8.1/10/11 and their Server equivalents.
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
|
@ -172,6 +172,33 @@ goto dk_done
|
|||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Check PowerShell
|
||||
|
||||
REM :PStest: $ExecutionContext.SessionState.LanguageMode :PStest:
|
||||
|
||||
cmd /c "%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':PStest:\s*';iex ($f[1])"" | find /i "FullLanguage" %nul1% || (
|
||||
%eline%
|
||||
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode""
|
||||
echo:
|
||||
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | find /i "FullLanguage" %nul1% && (
|
||||
echo Failed to run Powershell command but Powershell is working.
|
||||
echo:
|
||||
cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { if ($i.displayName -notlike '*windows*') { $n += $i.displayName } }; if ($n) { Write-Host ('Installed 3rd party Antivirus might be blocking the script - ' + ($n -join ', ')) -ForegroundColor White -BackgroundColor Blue }"""
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
) || (
|
||||
echo PowerShell is not working. Aborting...
|
||||
echo If you have applied restrictions on Powershell then undo those changes.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%fix_powershell
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%fix_powershell"
|
||||
)
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Elevate script as admin and pass arguments and preventing loop
|
||||
|
||||
%nul1% fltmc || (
|
||||
|
@ -184,58 +211,6 @@ goto dk_done
|
|||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Check PowerShell
|
||||
|
||||
::pstst $ExecutionContext.SessionState.LanguageMode :pstst
|
||||
|
||||
for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}" %nul6%') do (set tstresult=%%a)
|
||||
|
||||
if /i not "%tstresult%"=="FullLanguage" (
|
||||
%eline%
|
||||
echo: %tstresult%
|
||||
cmd /c "%psc% $ExecutionContext.SessionState.LanguageMode"
|
||||
|
||||
REM check LanguageMode
|
||||
|
||||
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | 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
|
||||
)
|
||||
|
||||
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...
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
|
||||
REM check antivirus and other errors
|
||||
|
||||
echo PowerShell is not working properly. Aborting...
|
||||
cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { if ($i.displayName -notlike '*windows*') { $n += $i.displayName } }; if ($n) { Write-Host ('Installed 3rd party Antivirus might be blocking the script - ' + ($n -join ', ')) -ForegroundColor White -BackgroundColor Blue }"""
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Disable QuickEdit and launch from conhost.exe to avoid Terminal app
|
||||
|
||||
if %winbuild% GEQ 17763 (
|
||||
|
@ -246,33 +221,34 @@ set terminal=
|
|||
|
||||
:: Check if script is running in Terminal app
|
||||
|
||||
set r1=$TB = [AppDomain]::CurrentDomain.DefineDynamicAssembly(4, 1).DefineDynamicModule(2, $False).DefineType(0);
|
||||
set r2=%r1% [void]$TB.DefinePInvokeMethod('GetConsoleWindow', 'kernel32.dll', 22, 1, [IntPtr], @(), 1, 3).SetImplementationFlags(128);
|
||||
set r3=%r2% [void]$TB.DefinePInvokeMethod('SendMessageW', 'user32.dll', 22, 1, [IntPtr], @([IntPtr], [UInt32], [IntPtr], [IntPtr]), 1, 3).SetImplementationFlags(128);
|
||||
set d1=%r3% $hIcon = $TB.CreateType(); $hWnd = $hIcon::GetConsoleWindow();
|
||||
set d2=%d1% echo $($hIcon::SendMessageW($hWnd, 127, 0, 0) -ne [IntPtr]::Zero);
|
||||
|
||||
if defined terminal (
|
||||
set lines=0
|
||||
for /f "skip=2 tokens=2 delims=: " %%A in ('mode con') do if "!lines!"=="0" set lines=%%A
|
||||
if !lines! GEQ 100 set terminal=
|
||||
%psc% "%d2%" %nul2% | find /i "True" %nul1% && set terminal=
|
||||
)
|
||||
|
||||
if defined ps32onArm goto :skipQE
|
||||
if %_unattended%==1 goto :skipQE
|
||||
for %%# in (%_args%) do (if /i "%%#"=="-qedit" goto :skipQE)
|
||||
|
||||
:: Relaunch to disable QuickEdit in the current session and use conhost.exe instead of the Terminal app
|
||||
:: This code disables QuickEdit for the current cmd.exe session without making permanent registry changes
|
||||
:: It is included because clicking on the script window can pause execution, causing confusion that the script has stopped due to an error
|
||||
|
||||
set resetQE=1
|
||||
reg query HKCU\Console /v QuickEdit %nul2% | find /i "0x0" %nul1% && set resetQE=0
|
||||
reg add HKCU\Console /v QuickEdit /t REG_DWORD /d 0 /f %nul1%
|
||||
|
||||
if defined terminal (
|
||||
start conhost.exe "!_batf!" %_args% -qedit
|
||||
start reg add HKCU\Console /v QuickEdit /t REG_DWORD /d %resetQE% /f %nul1%
|
||||
exit /b
|
||||
) else if %resetQE% EQU 1 (
|
||||
start cmd.exe /c ""!_batf!" %_args% -qedit"
|
||||
start reg add HKCU\Console /v QuickEdit /t REG_DWORD /d %resetQE% /f %nul1%
|
||||
exit /b
|
||||
set "launchcmd=start conhost.exe %psc%"
|
||||
) else (
|
||||
set "launchcmd=%psc%"
|
||||
)
|
||||
|
||||
:: Disable QuickEdit in current session
|
||||
|
||||
set "d1=$t=[AppDomain]::CurrentDomain.DefineDynamicAssembly(4, 1).DefineDynamicModule(2, $False).DefineType(0);"
|
||||
set "d2=$t.DefinePInvokeMethod('GetStdHandle', 'kernel32.dll', 22, 1, [IntPtr], @([Int32]), 1, 3).SetImplementationFlags(128);"
|
||||
set "d3=$t.DefinePInvokeMethod('SetConsoleMode', 'kernel32.dll', 22, 1, [Boolean], @([IntPtr], [Int32]), 1, 3).SetImplementationFlags(128);"
|
||||
set "d4=$k=$t.CreateType(); $b=$k::SetConsoleMode($k::GetStdHandle(-10), 0x0080);"
|
||||
|
||||
%launchcmd% "%d1% %d2% %d3% %d4% & cmd.exe '/c' '!_PSarg! -qedit'" && (exit /b) || (set terminal=1)
|
||||
:skipQE
|
||||
|
||||
::========================================================================================================================================
|
||||
|
@ -281,18 +257,12 @@ exit /b
|
|||
|
||||
set -=
|
||||
set old=
|
||||
set pingp=
|
||||
set upver=%masver:.=%
|
||||
|
||||
for %%A in (
|
||||
activ%-%ated.win
|
||||
mass%-%grave.dev
|
||||
) do if not defined pingp (
|
||||
for /f "delims=[] tokens=2" %%B in ('ping -n 1 %%A') do (
|
||||
if not "%%B"=="" (set old=1& set pingp=1)
|
||||
for /f "delims=[] tokens=2" %%C in ('ping -n 1 updatecheck%upver%.%%A') do (
|
||||
if not "%%C"=="" set old=
|
||||
)
|
||||
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 activ%-%ated.win') do (
|
||||
if not "%%#"=="" set old=1
|
||||
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 updatecheck%upver%.activ%-%ated.win') do (
|
||||
if not "%%#"=="" set old=
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -328,7 +298,7 @@ if not exist %SysPath%\sppsvc.exe (
|
|||
echo [%SysPath%\sppsvc.exe] file is missing. Aborting...
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
|
@ -366,7 +336,7 @@ if %osedition%==0 (
|
|||
echo Failed to detect OS Edition. Aborting...
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
|
@ -439,7 +409,7 @@ 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"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
|
@ -453,7 +423,7 @@ echo Unsupported Office %verchk% is installed on your Windows build version %win
|
|||
echo Aborting...
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
|
@ -559,7 +529,7 @@ if not exist %SystemRoot%\Temp\%list%.txt (
|
|||
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"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto :oe_goback
|
||||
)
|
||||
|
||||
|
@ -624,7 +594,7 @@ if not exist %SystemRoot%\Temp\getAppIds.txt (
|
|||
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"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto :oe_goback
|
||||
)
|
||||
)
|
||||
|
@ -806,7 +776,7 @@ if %errorcode% EQU 0 (
|
|||
call :dk_color %Gray% "Now run the Office activation option from the main menu."
|
||||
) else (
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
)
|
||||
|
||||
call :oe_tempcleanup
|
||||
|
@ -949,7 +919,7 @@ echo %c2rcommand%
|
|||
if %errorlevel% NEQ 0 (
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
)
|
||||
|
||||
goto :oe_goback
|
||||
|
@ -1097,7 +1067,7 @@ echo:
|
|||
echo %updcommand%
|
||||
%updcommand%
|
||||
echo:
|
||||
echo Check this webpage for help - %mas%troubleshoot
|
||||
echo Help - %mas%troubleshoot
|
||||
goto :oe_goback
|
||||
|
||||
::========================================================================================================================================
|
||||
|
@ -1111,7 +1081,6 @@ if defined fixes (
|
|||
call :dk_color %White% "Follow ALL the ABOVE blue lines. "
|
||||
call :dk_color2 %Blue% "Press [1] to Open Support Webpage " %Gray% " Press [0] to Ignore"
|
||||
choice /C:10 /N
|
||||
if !errorlevel!==2 goto :oemenu
|
||||
if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#))
|
||||
)
|
||||
|
||||
|
@ -1353,16 +1322,10 @@ if ($appIdsList.Count -gt 0) {
|
|||
|
||||
:dk_setvar
|
||||
|
||||
set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe
|
||||
set psc=%ps% -nop -c
|
||||
set psc=powershell.exe
|
||||
set winbuild=1
|
||||
for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G
|
||||
|
||||
set _slexe=sppsvc.exe& set _slser=sppsvc
|
||||
if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc)
|
||||
if %winbuild% LSS 7600 if exist "%SysPath%\SLsvc.exe" (set _slexe=SLsvc.exe& set _slser=SLsvc)
|
||||
if %_slexe%==SLsvc.exe set _vis=1
|
||||
|
||||
set _NCS=1
|
||||
if %winbuild% LSS 10586 set _NCS=0
|
||||
if %winbuild% GEQ 10586 reg query "HKCU\Console" /v ForceV2 %nul2% | find /i "0x0" %nul1% && (set _NCS=0)
|
||||
|
@ -1409,7 +1372,6 @@ exit /b
|
|||
|
||||
:dk_ckeckwmic
|
||||
|
||||
if %winbuild% LSS 9200 (set _wmic=1&exit /b)
|
||||
set _wmic=0
|
||||
for %%# in (wmic.exe) do @if not "%%~$PATH:#"=="" (
|
||||
cmd /c "wmic path Win32_ComputerSystem get CreationClassName /value" %nul2% | find /i "computersystem" %nul1% && set _wmic=1
|
||||
|
@ -1420,16 +1382,16 @@ exit /b
|
|||
|
||||
:dk_sppissue
|
||||
|
||||
sc start %_slser% %nul%
|
||||
sc start sppsvc %nul%
|
||||
set spperror=%errorlevel%
|
||||
|
||||
if %spperror% NEQ 1056 if %spperror% NEQ 0 (
|
||||
%eline%
|
||||
echo sc start %_slser% [Error Code: %spperror%]
|
||||
echo sc start sppsvc [Error Code: %spperror%]
|
||||
)
|
||||
|
||||
echo:
|
||||
%psc% "$job = Start-Job { (Get-WmiObject -Query 'SELECT * FROM %sps%').Version }; if (-not (Wait-Job $job -Timeout 30)) {write-host '%_slser% is not working correctly. Check this webpage for help - %mas%troubleshoot'}"
|
||||
%psc% "$job = Start-Job { (Get-WmiObject -Query 'SELECT * FROM %sps%').Version }; if (-not (Wait-Job $job -Timeout 30)) {write-host 'sppsvc is not working correctly. Help - %mas%troubleshoot'}"
|
||||
exit /b
|
||||
|
||||
:: Common lines used in PowerShell reflection code
|
||||
|
@ -1447,10 +1409,8 @@ exit /b
|
|||
|
||||
if %_NCS% EQU 1 (
|
||||
echo %esc%[%~1%~2%esc%[0m
|
||||
) else if exist %ps% (
|
||||
) else (
|
||||
%psc% write-host -back '%1' -fore '%2' '%3'
|
||||
) else if not exist %ps% (
|
||||
echo %~3
|
||||
)
|
||||
exit /b
|
||||
|
||||
|
@ -1458,10 +1418,8 @@ exit /b
|
|||
|
||||
if %_NCS% EQU 1 (
|
||||
echo %esc%[%~1%~2%esc%[%~3%~4%esc%[0m
|
||||
) else if exist %ps% (
|
||||
) else (
|
||||
%psc% write-host -back '%1' -fore '%2' '%3' -NoNewline; write-host -back '%4' -fore '%5' '%6'
|
||||
) else if not exist %ps% (
|
||||
echo %~3 %~6
|
||||
)
|
||||
exit /b
|
||||
|
||||
|
@ -1476,7 +1434,6 @@ if defined fixes (
|
|||
call :dk_color %White% "Follow ALL the ABOVE blue lines. "
|
||||
call :dk_color2 %Blue% "Press [1] to Open Support Webpage " %Gray% " Press [0] to Ignore"
|
||||
choice /C:10 /N
|
||||
if !errorlevel!==2 exit /b
|
||||
if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#))
|
||||
)
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@set masver=3.2
|
||||
@set masver=3.0
|
||||
@echo off
|
||||
|
||||
|
||||
|
@ -74,7 +74,7 @@ echo:
|
|||
echo Null service is not running, script may crash...
|
||||
echo:
|
||||
echo:
|
||||
echo Check this webpage for help - %mas%fix_service
|
||||
echo Help - %mas%fix_service
|
||||
echo:
|
||||
echo:
|
||||
ping 127.0.0.1 -n 20
|
||||
|
@ -89,7 +89,7 @@ echo:
|
|||
echo Error - Script either has LF line ending issue or an empty line at the end of the script is missing.
|
||||
echo:
|
||||
echo:
|
||||
echo Check this webpage for help - %mas%troubleshoot
|
||||
echo Help - %mas%troubleshoot
|
||||
echo:
|
||||
echo:
|
||||
ping 127.0.0.1 -n 20 >nul
|
||||
|
@ -134,14 +134,14 @@ 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"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
if %winbuild% LSS 7600 (
|
||||
%eline%
|
||||
%nceline%
|
||||
echo Unsupported OS version detected [%winbuild%].
|
||||
echo This option is supported only for Windows 7/8/8.1/10/11 and their Server equivalents.
|
||||
echo Project is supported only for Windows 7/8/8.1/10/11 and their Server equivalents.
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
|
@ -177,6 +177,33 @@ goto dk_done
|
|||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Check PowerShell
|
||||
|
||||
REM :PStest: $ExecutionContext.SessionState.LanguageMode :PStest:
|
||||
|
||||
cmd /c "%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':PStest:\s*';iex ($f[1])"" | find /i "FullLanguage" %nul1% || (
|
||||
%eline%
|
||||
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode""
|
||||
echo:
|
||||
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | find /i "FullLanguage" %nul1% && (
|
||||
echo Failed to run Powershell command but Powershell is working.
|
||||
echo:
|
||||
cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { if ($i.displayName -notlike '*windows*') { $n += $i.displayName } }; if ($n) { Write-Host ('Installed 3rd party Antivirus might be blocking the script - ' + ($n -join ', ')) -ForegroundColor White -BackgroundColor Blue }"""
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
) || (
|
||||
echo PowerShell is not working. Aborting...
|
||||
echo If you have applied restrictions on Powershell then undo those changes.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%fix_powershell
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%fix_powershell"
|
||||
)
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Elevate script as admin and pass arguments and preventing loop
|
||||
|
||||
%nul1% fltmc || (
|
||||
|
@ -189,58 +216,6 @@ goto dk_done
|
|||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Check PowerShell
|
||||
|
||||
::pstst $ExecutionContext.SessionState.LanguageMode :pstst
|
||||
|
||||
for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}" %nul6%') do (set tstresult=%%a)
|
||||
|
||||
if /i not "%tstresult%"=="FullLanguage" (
|
||||
%eline%
|
||||
echo: %tstresult%
|
||||
cmd /c "%psc% $ExecutionContext.SessionState.LanguageMode"
|
||||
|
||||
REM check LanguageMode
|
||||
|
||||
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | 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
|
||||
)
|
||||
|
||||
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...
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
|
||||
REM check antivirus and other errors
|
||||
|
||||
echo PowerShell is not working properly. Aborting...
|
||||
cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { if ($i.displayName -notlike '*windows*') { $n += $i.displayName } }; if ($n) { Write-Host ('Installed 3rd party Antivirus might be blocking the script - ' + ($n -join ', ')) -ForegroundColor White -BackgroundColor Blue }"""
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Disable QuickEdit and launch from conhost.exe to avoid Terminal app
|
||||
|
||||
if %winbuild% GEQ 17763 (
|
||||
|
@ -251,33 +226,34 @@ set terminal=
|
|||
|
||||
:: Check if script is running in Terminal app
|
||||
|
||||
set r1=$TB = [AppDomain]::CurrentDomain.DefineDynamicAssembly(4, 1).DefineDynamicModule(2, $False).DefineType(0);
|
||||
set r2=%r1% [void]$TB.DefinePInvokeMethod('GetConsoleWindow', 'kernel32.dll', 22, 1, [IntPtr], @(), 1, 3).SetImplementationFlags(128);
|
||||
set r3=%r2% [void]$TB.DefinePInvokeMethod('SendMessageW', 'user32.dll', 22, 1, [IntPtr], @([IntPtr], [UInt32], [IntPtr], [IntPtr]), 1, 3).SetImplementationFlags(128);
|
||||
set d1=%r3% $hIcon = $TB.CreateType(); $hWnd = $hIcon::GetConsoleWindow();
|
||||
set d2=%d1% echo $($hIcon::SendMessageW($hWnd, 127, 0, 0) -ne [IntPtr]::Zero);
|
||||
|
||||
if defined terminal (
|
||||
set lines=0
|
||||
for /f "skip=2 tokens=2 delims=: " %%A in ('mode con') do if "!lines!"=="0" set lines=%%A
|
||||
if !lines! GEQ 100 set terminal=
|
||||
%psc% "%d2%" %nul2% | find /i "True" %nul1% && set terminal=
|
||||
)
|
||||
|
||||
if defined ps32onArm goto :skipQE
|
||||
if %_unattended%==1 goto :skipQE
|
||||
for %%# in (%_args%) do (if /i "%%#"=="-qedit" goto :skipQE)
|
||||
|
||||
:: Relaunch to disable QuickEdit in the current session and use conhost.exe instead of the Terminal app
|
||||
:: This code disables QuickEdit for the current cmd.exe session without making permanent registry changes
|
||||
:: It is included because clicking on the script window can pause execution, causing confusion that the script has stopped due to an error
|
||||
|
||||
set resetQE=1
|
||||
reg query HKCU\Console /v QuickEdit %nul2% | find /i "0x0" %nul1% && set resetQE=0
|
||||
reg add HKCU\Console /v QuickEdit /t REG_DWORD /d 0 /f %nul1%
|
||||
|
||||
if defined terminal (
|
||||
start conhost.exe "!_batf!" %_args% -qedit
|
||||
start reg add HKCU\Console /v QuickEdit /t REG_DWORD /d %resetQE% /f %nul1%
|
||||
exit /b
|
||||
) else if %resetQE% EQU 1 (
|
||||
start cmd.exe /c ""!_batf!" %_args% -qedit"
|
||||
start reg add HKCU\Console /v QuickEdit /t REG_DWORD /d %resetQE% /f %nul1%
|
||||
exit /b
|
||||
set "launchcmd=start conhost.exe %psc%"
|
||||
) else (
|
||||
set "launchcmd=%psc%"
|
||||
)
|
||||
|
||||
:: Disable QuickEdit in current session
|
||||
|
||||
set "d1=$t=[AppDomain]::CurrentDomain.DefineDynamicAssembly(4, 1).DefineDynamicModule(2, $False).DefineType(0);"
|
||||
set "d2=$t.DefinePInvokeMethod('GetStdHandle', 'kernel32.dll', 22, 1, [IntPtr], @([Int32]), 1, 3).SetImplementationFlags(128);"
|
||||
set "d3=$t.DefinePInvokeMethod('SetConsoleMode', 'kernel32.dll', 22, 1, [Boolean], @([IntPtr], [Int32]), 1, 3).SetImplementationFlags(128);"
|
||||
set "d4=$k=$t.CreateType(); $b=$k::SetConsoleMode($k::GetStdHandle(-10), 0x0080);"
|
||||
|
||||
%launchcmd% "%d1% %d2% %d3% %d4% & cmd.exe '/c' '!_PSarg! -qedit'" && (exit /b) || (set terminal=1)
|
||||
:skipQE
|
||||
|
||||
::========================================================================================================================================
|
||||
|
@ -286,18 +262,12 @@ exit /b
|
|||
|
||||
set -=
|
||||
set old=
|
||||
set pingp=
|
||||
set upver=%masver:.=%
|
||||
|
||||
for %%A in (
|
||||
activ%-%ated.win
|
||||
mass%-%grave.dev
|
||||
) do if not defined pingp (
|
||||
for /f "delims=[] tokens=2" %%B in ('ping -n 1 %%A') do (
|
||||
if not "%%B"=="" (set old=1& set pingp=1)
|
||||
for /f "delims=[] tokens=2" %%C in ('ping -n 1 updatecheck%upver%.%%A') do (
|
||||
if not "%%C"=="" set old=
|
||||
)
|
||||
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 activ%-%ated.win') do (
|
||||
if not "%%#"=="" set old=1
|
||||
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 updatecheck%upver%.activ%-%ated.win') do (
|
||||
if not "%%#"=="" set old=
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -354,11 +324,8 @@ if not exist %SysPath%\%%# (
|
|||
%eline%
|
||||
echo [%SysPath%\%%#] file is missing, aborting...
|
||||
echo:
|
||||
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%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
)
|
||||
)
|
||||
|
@ -391,7 +358,7 @@ if not defined allapps (
|
|||
echo Failed to find activation IDs. Aborting...
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
|
@ -414,7 +381,7 @@ if not defined osedition (
|
|||
echo Failed to detect OS edition, aborting...
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
|
@ -576,7 +543,7 @@ 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"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
|
@ -631,7 +598,7 @@ call :dk_color %Gray% "Reboot is required to fully change the edition."
|
|||
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"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -712,7 +679,7 @@ 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"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
|
@ -788,7 +755,7 @@ echo:
|
|||
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% "Check this webpage for help - " %_Yellow% " %mas%change_edition_issues"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%change_edition_issues"
|
||||
exit /b
|
||||
|
||||
:compresslog
|
||||
|
@ -827,16 +794,10 @@ exit /b
|
|||
|
||||
:dk_setvar
|
||||
|
||||
set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe
|
||||
set psc=%ps% -nop -c
|
||||
set psc=powershell.exe
|
||||
set winbuild=1
|
||||
for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G
|
||||
|
||||
set _slexe=sppsvc.exe& set _slser=sppsvc
|
||||
if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc)
|
||||
if %winbuild% LSS 7600 if exist "%SysPath%\SLsvc.exe" (set _slexe=SLsvc.exe& set _slser=SLsvc)
|
||||
if %_slexe%==SLsvc.exe set _vis=1
|
||||
|
||||
set _NCS=1
|
||||
if %winbuild% LSS 10586 set _NCS=0
|
||||
if %winbuild% GEQ 10586 reg query "HKCU\Console" /v ForceV2 %nul2% | find /i "0x0" %nul1% && (set _NCS=0)
|
||||
|
@ -910,7 +871,6 @@ exit /b
|
|||
|
||||
:dk_ckeckwmic
|
||||
|
||||
if %winbuild% LSS 9200 (set _wmic=1&exit /b)
|
||||
set _wmic=0
|
||||
for %%# in (wmic.exe) do @if not "%%~$PATH:#"=="" (
|
||||
cmd /c "wmic path Win32_ComputerSystem get CreationClassName /value" %nul2% | find /i "computersystem" %nul1% && set _wmic=1
|
||||
|
@ -921,16 +881,16 @@ exit /b
|
|||
|
||||
:dk_sppissue
|
||||
|
||||
sc start %_slser% %nul%
|
||||
sc start sppsvc %nul%
|
||||
set spperror=%errorlevel%
|
||||
|
||||
if %spperror% NEQ 1056 if %spperror% NEQ 0 (
|
||||
%eline%
|
||||
echo sc start %_slser% [Error Code: %spperror%]
|
||||
echo sc start sppsvc [Error Code: %spperror%]
|
||||
)
|
||||
|
||||
echo:
|
||||
%psc% "$job = Start-Job { (Get-WmiObject -Query 'SELECT * FROM %sps%').Version }; if (-not (Wait-Job $job -Timeout 30)) {write-host '%_slser% is not working correctly. Check this webpage for help - %mas%troubleshoot'}"
|
||||
%psc% "$job = Start-Job { (Get-WmiObject -Query 'SELECT * FROM %sps%').Version }; if (-not (Wait-Job $job -Timeout 30)) {write-host 'sppsvc is not working correctly. Help - %mas%troubleshoot'}"
|
||||
exit /b
|
||||
|
||||
:: Common lines used in PowerShell reflection code
|
||||
|
@ -1028,10 +988,8 @@ exit /b
|
|||
|
||||
if %_NCS% EQU 1 (
|
||||
echo %esc%[%~1%~2%esc%[0m
|
||||
) else if exist %ps% (
|
||||
) else (
|
||||
%psc% write-host -back '%1' -fore '%2' '%3'
|
||||
) else if not exist %ps% (
|
||||
echo %~3
|
||||
)
|
||||
exit /b
|
||||
|
||||
|
@ -1039,10 +997,8 @@ exit /b
|
|||
|
||||
if %_NCS% EQU 1 (
|
||||
echo %esc%[%~1%~2%esc%[%~3%~4%esc%[0m
|
||||
) else if exist %ps% (
|
||||
) else (
|
||||
%psc% write-host -back '%1' -fore '%2' '%3' -NoNewline; write-host -back '%4' -fore '%5' '%6'
|
||||
) else if not exist %ps% (
|
||||
echo %~3 %~6
|
||||
)
|
||||
exit /b
|
||||
|
||||
|
@ -1057,7 +1013,6 @@ if defined fixes (
|
|||
call :dk_color %White% "Follow ALL the ABOVE blue lines. "
|
||||
call :dk_color2 %Blue% "Press [1] to Open Support Webpage " %Gray% " Press [0] to Ignore"
|
||||
choice /C:10 /N
|
||||
if !errorlevel!==2 exit /b
|
||||
if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#))
|
||||
)
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,4 +1,4 @@
|
|||
@set masver=3.2
|
||||
@set masver=3.0
|
||||
@echo off
|
||||
|
||||
|
||||
|
@ -69,7 +69,7 @@ echo:
|
|||
echo Null service is not running, script may crash...
|
||||
echo:
|
||||
echo:
|
||||
echo Check this webpage for help - %mas%fix_service
|
||||
echo Help - %mas%fix_service
|
||||
echo:
|
||||
echo:
|
||||
ping 127.0.0.1 -n 20
|
||||
|
@ -84,7 +84,7 @@ echo:
|
|||
echo Error - Script either has LF line ending issue or an empty line at the end of the script is missing.
|
||||
echo:
|
||||
echo:
|
||||
echo Check this webpage for help - %mas%troubleshoot
|
||||
echo Help - %mas%troubleshoot
|
||||
echo:
|
||||
echo:
|
||||
ping 127.0.0.1 -n 20 >nul
|
||||
|
@ -128,31 +128,14 @@ 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"
|
||||
goto done2
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
if %winbuild% LSS 6001 (
|
||||
if %winbuild% LSS 7600 (
|
||||
%nceline%
|
||||
echo Unsupported OS version detected [%winbuild%].
|
||||
echo MAS only supports Windows Vista/7/8/8.1/10/11 and their Server equivalents.
|
||||
if %winbuild% EQU 6000 (
|
||||
echo:
|
||||
echo Windows Vista RTM is not supported because Powershell cannot be installed.
|
||||
echo Upgrade to Windows Vista SP1 or SP2.
|
||||
)
|
||||
goto done2
|
||||
)
|
||||
|
||||
if %winbuild% LSS 7600 if not exist "%SysPath%\WindowsPowerShell\v1.0\Modules" (
|
||||
%nceline%
|
||||
if not exist %ps% (
|
||||
echo PowerShell is not installed in your system.
|
||||
)
|
||||
echo Install PowerShell 2.0 using the following URL.
|
||||
echo:
|
||||
echo https://www.catalog.update.microsoft.com/Search.aspx?q=KB968930
|
||||
if %_unattended%==0 start https://www.catalog.update.microsoft.com/Search.aspx?q=KB968930
|
||||
echo Project is supported only for Windows 7/8/8.1/10/11 and their Server equivalents.
|
||||
goto done2
|
||||
)
|
||||
|
||||
|
@ -188,6 +171,33 @@ goto done2
|
|||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Check PowerShell
|
||||
|
||||
REM :PStest: $ExecutionContext.SessionState.LanguageMode :PStest:
|
||||
|
||||
cmd /c "%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':PStest:\s*';iex ($f[1])"" | find /i "FullLanguage" %nul1% || (
|
||||
%eline%
|
||||
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode""
|
||||
echo:
|
||||
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | find /i "FullLanguage" %nul1% && (
|
||||
echo Failed to run Powershell command but Powershell is working.
|
||||
echo:
|
||||
cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { if ($i.displayName -notlike '*windows*') { $n += $i.displayName } }; if ($n) { Write-Host ('Installed 3rd party Antivirus might be blocking the script - ' + ($n -join ', ')) -ForegroundColor White -BackgroundColor Blue }"""
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
) || (
|
||||
echo PowerShell is not working. Aborting...
|
||||
echo If you have applied restrictions on Powershell then undo those changes.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%fix_powershell
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%fix_powershell"
|
||||
)
|
||||
goto done2
|
||||
)
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Elevate script as admin and pass arguments and preventing loop
|
||||
|
||||
%nul1% fltmc || (
|
||||
|
@ -200,58 +210,6 @@ goto done2
|
|||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Check PowerShell
|
||||
|
||||
::pstst $ExecutionContext.SessionState.LanguageMode :pstst
|
||||
|
||||
for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}" %nul6%') do (set tstresult=%%a)
|
||||
|
||||
if /i not "%tstresult%"=="FullLanguage" (
|
||||
%eline%
|
||||
echo: %tstresult%
|
||||
cmd /c "%psc% $ExecutionContext.SessionState.LanguageMode"
|
||||
|
||||
REM check LanguageMode
|
||||
|
||||
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | 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
|
||||
)
|
||||
|
||||
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...
|
||||
goto done2
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
|
||||
REM check antivirus and other errors
|
||||
|
||||
echo PowerShell is not working properly. Aborting...
|
||||
cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { if ($i.displayName -notlike '*windows*') { $n += $i.displayName } }; if ($n) { Write-Host ('Installed 3rd party Antivirus might be blocking the script - ' + ($n -join ', ')) -ForegroundColor White -BackgroundColor Blue }"""
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto done2
|
||||
)
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Disable QuickEdit and launch from conhost.exe to avoid Terminal app
|
||||
|
||||
if %winbuild% GEQ 17763 (
|
||||
|
@ -262,33 +220,34 @@ set terminal=
|
|||
|
||||
:: Check if script is running in Terminal app
|
||||
|
||||
set r1=$TB = [AppDomain]::CurrentDomain.DefineDynamicAssembly(4, 1).DefineDynamicModule(2, $False).DefineType(0);
|
||||
set r2=%r1% [void]$TB.DefinePInvokeMethod('GetConsoleWindow', 'kernel32.dll', 22, 1, [IntPtr], @(), 1, 3).SetImplementationFlags(128);
|
||||
set r3=%r2% [void]$TB.DefinePInvokeMethod('SendMessageW', 'user32.dll', 22, 1, [IntPtr], @([IntPtr], [UInt32], [IntPtr], [IntPtr]), 1, 3).SetImplementationFlags(128);
|
||||
set d1=%r3% $hIcon = $TB.CreateType(); $hWnd = $hIcon::GetConsoleWindow();
|
||||
set d2=%d1% echo $($hIcon::SendMessageW($hWnd, 127, 0, 0) -ne [IntPtr]::Zero);
|
||||
|
||||
if defined terminal (
|
||||
set lines=0
|
||||
for /f "skip=2 tokens=2 delims=: " %%A in ('mode con') do if "!lines!"=="0" set lines=%%A
|
||||
if !lines! GEQ 100 set terminal=
|
||||
%psc% "%d2%" %nul2% | find /i "True" %nul1% && set terminal=
|
||||
)
|
||||
|
||||
if defined ps32onArm goto :skipQE
|
||||
if %_unattended%==1 goto :skipQE
|
||||
for %%# in (%_args%) do (if /i "%%#"=="-qedit" goto :skipQE)
|
||||
|
||||
:: Relaunch to disable QuickEdit in the current session and use conhost.exe instead of the Terminal app
|
||||
:: This code disables QuickEdit for the current cmd.exe session without making permanent registry changes
|
||||
:: It is included because clicking on the script window can pause execution, causing confusion that the script has stopped due to an error
|
||||
|
||||
set resetQE=1
|
||||
reg query HKCU\Console /v QuickEdit %nul2% | find /i "0x0" %nul1% && set resetQE=0
|
||||
reg add HKCU\Console /v QuickEdit /t REG_DWORD /d 0 /f %nul1%
|
||||
|
||||
if defined terminal (
|
||||
start conhost.exe "!_batf!" %_args% -qedit
|
||||
start reg add HKCU\Console /v QuickEdit /t REG_DWORD /d %resetQE% /f %nul1%
|
||||
exit /b
|
||||
) else if %resetQE% EQU 1 (
|
||||
start cmd.exe /c ""!_batf!" %_args% -qedit"
|
||||
start reg add HKCU\Console /v QuickEdit /t REG_DWORD /d %resetQE% /f %nul1%
|
||||
exit /b
|
||||
set "launchcmd=start conhost.exe %psc%"
|
||||
) else (
|
||||
set "launchcmd=%psc%"
|
||||
)
|
||||
|
||||
:: Disable QuickEdit in current session
|
||||
|
||||
set "d1=$t=[AppDomain]::CurrentDomain.DefineDynamicAssembly(4, 1).DefineDynamicModule(2, $False).DefineType(0);"
|
||||
set "d2=$t.DefinePInvokeMethod('GetStdHandle', 'kernel32.dll', 22, 1, [IntPtr], @([Int32]), 1, 3).SetImplementationFlags(128);"
|
||||
set "d3=$t.DefinePInvokeMethod('SetConsoleMode', 'kernel32.dll', 22, 1, [Boolean], @([IntPtr], [Int32]), 1, 3).SetImplementationFlags(128);"
|
||||
set "d4=$k=$t.CreateType(); $b=$k::SetConsoleMode($k::GetStdHandle(-10), 0x0080);"
|
||||
|
||||
%launchcmd% "%d1% %d2% %d3% %d4% & cmd.exe '/c' '!_PSarg! -qedit'" && (exit /b) || (set terminal=1)
|
||||
:skipQE
|
||||
|
||||
::========================================================================================================================================
|
||||
|
@ -297,18 +256,12 @@ exit /b
|
|||
|
||||
set -=
|
||||
set old=
|
||||
set pingp=
|
||||
set upver=%masver:.=%
|
||||
|
||||
for %%A in (
|
||||
activ%-%ated.win
|
||||
mass%-%grave.dev
|
||||
) do if not defined pingp (
|
||||
for /f "delims=[] tokens=2" %%B in ('ping -n 1 %%A') do (
|
||||
if not "%%B"=="" (set old=1& set pingp=1)
|
||||
for /f "delims=[] tokens=2" %%C in ('ping -n 1 updatecheck%upver%.%%A') do (
|
||||
if not "%%C"=="" set old=
|
||||
)
|
||||
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 activ%-%ated.win') do (
|
||||
if not "%%#"=="" set old=1
|
||||
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 updatecheck%upver%.activ%-%ated.win') do (
|
||||
if not "%%#"=="" set old=
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -731,7 +684,6 @@ if defined fixes (
|
|||
call :dk_color %White% "Follow ALL the ABOVE blue lines. "
|
||||
call :dk_color2 %Blue% "Press [1] to Open Support Webpage " %Gray% " Press [0] to Ignore"
|
||||
choice /C:10 /N
|
||||
if !errorlevel!==2 exit /b
|
||||
if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#))
|
||||
)
|
||||
|
||||
|
@ -750,16 +702,10 @@ exit /b
|
|||
|
||||
:dk_setvar
|
||||
|
||||
set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe
|
||||
set psc=%ps% -nop -c
|
||||
set psc=powershell.exe
|
||||
set winbuild=1
|
||||
for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G
|
||||
|
||||
set _slexe=sppsvc.exe& set _slser=sppsvc
|
||||
if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc)
|
||||
if %winbuild% LSS 7600 if exist "%SysPath%\SLsvc.exe" (set _slexe=SLsvc.exe& set _slser=SLsvc)
|
||||
if %_slexe%==SLsvc.exe set _vis=1
|
||||
|
||||
set _NCS=1
|
||||
if %winbuild% LSS 10586 set _NCS=0
|
||||
if %winbuild% GEQ 10586 reg query "HKCU\Console" /v ForceV2 %nul2% | find /i "0x0" %nul1% && (set _NCS=0)
|
||||
|
@ -815,10 +761,8 @@ exit /b
|
|||
|
||||
if %_NCS% EQU 1 (
|
||||
echo %esc%[%~1%~2%esc%[0m
|
||||
) else if exist %ps% (
|
||||
) else (
|
||||
%psc% write-host -back '%1' -fore '%2' '%3'
|
||||
) else if not exist %ps% (
|
||||
echo %~3
|
||||
)
|
||||
exit /b
|
||||
|
||||
|
@ -826,10 +770,8 @@ exit /b
|
|||
|
||||
if %_NCS% EQU 1 (
|
||||
echo %esc%[%~1%~2%esc%[%~3%~4%esc%[0m
|
||||
) else if exist %ps% (
|
||||
) else (
|
||||
%psc% write-host -back '%1' -fore '%2' '%3' -NoNewline; write-host -back '%4' -fore '%5' '%6'
|
||||
) else if not exist %ps% (
|
||||
echo %~3 %~6
|
||||
)
|
||||
exit /b
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@set masver=3.2
|
||||
@set masver=3.0
|
||||
@echo off
|
||||
|
||||
|
||||
|
@ -69,7 +69,7 @@ echo:
|
|||
echo Null service is not running, script may crash...
|
||||
echo:
|
||||
echo:
|
||||
echo Check this webpage for help - %mas%fix_service
|
||||
echo Help - %mas%fix_service
|
||||
echo:
|
||||
echo:
|
||||
ping 127.0.0.1 -n 20
|
||||
|
@ -84,7 +84,7 @@ echo:
|
|||
echo Error - Script either has LF line ending issue or an empty line at the end of the script is missing.
|
||||
echo:
|
||||
echo:
|
||||
echo Check this webpage for help - %mas%troubleshoot
|
||||
echo Help - %mas%troubleshoot
|
||||
echo:
|
||||
echo:
|
||||
ping 127.0.0.1 -n 20 >nul
|
||||
|
@ -129,31 +129,14 @@ 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"
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
if %winbuild% LSS 6001 (
|
||||
if %winbuild% LSS 7600 (
|
||||
%nceline%
|
||||
echo Unsupported OS version detected [%winbuild%].
|
||||
echo MAS only supports Windows Vista/7/8/8.1/10/11 and their Server equivalents.
|
||||
if %winbuild% EQU 6000 (
|
||||
echo:
|
||||
echo Windows Vista RTM is not supported because Powershell cannot be installed.
|
||||
echo Upgrade to Windows Vista SP1 or SP2.
|
||||
)
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
if %winbuild% LSS 7600 if not exist "%SysPath%\WindowsPowerShell\v1.0\Modules" (
|
||||
%nceline%
|
||||
if not exist %ps% (
|
||||
echo PowerShell is not installed in your system.
|
||||
)
|
||||
echo Install PowerShell 2.0 using the following URL.
|
||||
echo:
|
||||
echo https://www.catalog.update.microsoft.com/Search.aspx?q=KB968930
|
||||
if %_unattended%==0 start https://www.catalog.update.microsoft.com/Search.aspx?q=KB968930
|
||||
echo Project is supported only for Windows 7/8/8.1/10/11 and their Server equivalents.
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
|
@ -189,6 +172,33 @@ goto dk_done
|
|||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Check PowerShell
|
||||
|
||||
REM :PStest: $ExecutionContext.SessionState.LanguageMode :PStest:
|
||||
|
||||
cmd /c "%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':PStest:\s*';iex ($f[1])"" | find /i "FullLanguage" %nul1% || (
|
||||
%eline%
|
||||
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode""
|
||||
echo:
|
||||
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | find /i "FullLanguage" %nul1% && (
|
||||
echo Failed to run Powershell command but Powershell is working.
|
||||
echo:
|
||||
cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { if ($i.displayName -notlike '*windows*') { $n += $i.displayName } }; if ($n) { Write-Host ('Installed 3rd party Antivirus might be blocking the script - ' + ($n -join ', ')) -ForegroundColor White -BackgroundColor Blue }"""
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||
) || (
|
||||
echo PowerShell is not working. Aborting...
|
||||
echo If you have applied restrictions on Powershell then undo those changes.
|
||||
echo:
|
||||
set fixes=%fixes% %mas%fix_powershell
|
||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%fix_powershell"
|
||||
)
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Elevate script as admin and pass arguments and preventing loop
|
||||
|
||||
%nul1% fltmc || (
|
||||
|
@ -201,58 +211,6 @@ goto dk_done
|
|||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Check PowerShell
|
||||
|
||||
::pstst $ExecutionContext.SessionState.LanguageMode :pstst
|
||||
|
||||
for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}" %nul6%') do (set tstresult=%%a)
|
||||
|
||||
if /i not "%tstresult%"=="FullLanguage" (
|
||||
%eline%
|
||||
echo: %tstresult%
|
||||
cmd /c "%psc% $ExecutionContext.SessionState.LanguageMode"
|
||||
|
||||
REM check LanguageMode
|
||||
|
||||
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | 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
|
||||
)
|
||||
|
||||
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...
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
|
||||
REM check antivirus and other errors
|
||||
|
||||
echo PowerShell is not working properly. Aborting...
|
||||
cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { if ($i.displayName -notlike '*windows*') { $n += $i.displayName } }; if ($n) { Write-Host ('Installed 3rd party Antivirus might be blocking the script - ' + ($n -join ', ')) -ForegroundColor White -BackgroundColor Blue }"""
|
||||
echo:
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Disable QuickEdit and launch from conhost.exe to avoid Terminal app
|
||||
|
||||
if %winbuild% GEQ 17763 (
|
||||
|
@ -263,33 +221,34 @@ set terminal=
|
|||
|
||||
:: Check if script is running in Terminal app
|
||||
|
||||
set r1=$TB = [AppDomain]::CurrentDomain.DefineDynamicAssembly(4, 1).DefineDynamicModule(2, $False).DefineType(0);
|
||||
set r2=%r1% [void]$TB.DefinePInvokeMethod('GetConsoleWindow', 'kernel32.dll', 22, 1, [IntPtr], @(), 1, 3).SetImplementationFlags(128);
|
||||
set r3=%r2% [void]$TB.DefinePInvokeMethod('SendMessageW', 'user32.dll', 22, 1, [IntPtr], @([IntPtr], [UInt32], [IntPtr], [IntPtr]), 1, 3).SetImplementationFlags(128);
|
||||
set d1=%r3% $hIcon = $TB.CreateType(); $hWnd = $hIcon::GetConsoleWindow();
|
||||
set d2=%d1% echo $($hIcon::SendMessageW($hWnd, 127, 0, 0) -ne [IntPtr]::Zero);
|
||||
|
||||
if defined terminal (
|
||||
set lines=0
|
||||
for /f "skip=2 tokens=2 delims=: " %%A in ('mode con') do if "!lines!"=="0" set lines=%%A
|
||||
if !lines! GEQ 100 set terminal=
|
||||
%psc% "%d2%" %nul2% | find /i "True" %nul1% && set terminal=
|
||||
)
|
||||
|
||||
if defined ps32onArm goto :skipQE
|
||||
if %_unattended%==1 goto :skipQE
|
||||
for %%# in (%_args%) do (if /i "%%#"=="-qedit" goto :skipQE)
|
||||
|
||||
:: Relaunch to disable QuickEdit in the current session and use conhost.exe instead of the Terminal app
|
||||
:: This code disables QuickEdit for the current cmd.exe session without making permanent registry changes
|
||||
:: It is included because clicking on the script window can pause execution, causing confusion that the script has stopped due to an error
|
||||
|
||||
set resetQE=1
|
||||
reg query HKCU\Console /v QuickEdit %nul2% | find /i "0x0" %nul1% && set resetQE=0
|
||||
reg add HKCU\Console /v QuickEdit /t REG_DWORD /d 0 /f %nul1%
|
||||
|
||||
if defined terminal (
|
||||
start conhost.exe "!_batf!" %_args% -qedit
|
||||
start reg add HKCU\Console /v QuickEdit /t REG_DWORD /d %resetQE% /f %nul1%
|
||||
exit /b
|
||||
) else if %resetQE% EQU 1 (
|
||||
start cmd.exe /c ""!_batf!" %_args% -qedit"
|
||||
start reg add HKCU\Console /v QuickEdit /t REG_DWORD /d %resetQE% /f %nul1%
|
||||
exit /b
|
||||
set "launchcmd=start conhost.exe %psc%"
|
||||
) else (
|
||||
set "launchcmd=%psc%"
|
||||
)
|
||||
|
||||
:: Disable QuickEdit in current session
|
||||
|
||||
set "d1=$t=[AppDomain]::CurrentDomain.DefineDynamicAssembly(4, 1).DefineDynamicModule(2, $False).DefineType(0);"
|
||||
set "d2=$t.DefinePInvokeMethod('GetStdHandle', 'kernel32.dll', 22, 1, [IntPtr], @([Int32]), 1, 3).SetImplementationFlags(128);"
|
||||
set "d3=$t.DefinePInvokeMethod('SetConsoleMode', 'kernel32.dll', 22, 1, [Boolean], @([IntPtr], [Int32]), 1, 3).SetImplementationFlags(128);"
|
||||
set "d4=$k=$t.CreateType(); $b=$k::SetConsoleMode($k::GetStdHandle(-10), 0x0080);"
|
||||
|
||||
%launchcmd% "%d1% %d2% %d3% %d4% & cmd.exe '/c' '!_PSarg! -qedit'" && (exit /b) || (set terminal=1)
|
||||
:skipQE
|
||||
|
||||
::========================================================================================================================================
|
||||
|
@ -298,18 +257,12 @@ exit /b
|
|||
|
||||
set -=
|
||||
set old=
|
||||
set pingp=
|
||||
set upver=%masver:.=%
|
||||
|
||||
for %%A in (
|
||||
activ%-%ated.win
|
||||
mass%-%grave.dev
|
||||
) do if not defined pingp (
|
||||
for /f "delims=[] tokens=2" %%B in ('ping -n 1 %%A') do (
|
||||
if not "%%B"=="" (set old=1& set pingp=1)
|
||||
for /f "delims=[] tokens=2" %%C in ('ping -n 1 updatecheck%upver%.%%A') do (
|
||||
if not "%%C"=="" set old=
|
||||
)
|
||||
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 activ%-%ated.win') do (
|
||||
if not "%%#"=="" set old=1
|
||||
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 updatecheck%upver%.activ%-%ated.win') do (
|
||||
if not "%%#"=="" set old=
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -532,13 +485,6 @@ mode 125, 32
|
|||
)
|
||||
title Fix Licensing ^(ClipSVC ^+ SPP ^+ OSPP^)
|
||||
|
||||
if %winbuild% EQU 6001 (
|
||||
%eline%
|
||||
echo This option is not supported on Windows Vista SP1.
|
||||
echo Upgrade to Windows Vista SP2.
|
||||
goto :at_back
|
||||
)
|
||||
|
||||
echo:
|
||||
echo %line%
|
||||
echo:
|
||||
|
@ -555,7 +501,7 @@ echo - Clear ClipSVC, SPP and OSPP licenses.
|
|||
echo - Fix permissions of SPP tokens folder and registries.
|
||||
echo - Trigger the repair option for Office.
|
||||
echo:
|
||||
call :dk_color2 %_White% " - " %Blue% "Apply this option only when it is necessary."
|
||||
call :dk_color2 %_White% " - " %Red% "Apply this option only when it is necessary."
|
||||
echo:
|
||||
echo %line%
|
||||
echo:
|
||||
|
@ -719,19 +665,19 @@ echo [No Error Found]
|
|||
)
|
||||
|
||||
echo:
|
||||
echo Stopping %_slser% service...
|
||||
%psc% Stop-Service %_slser% -force %nul%
|
||||
echo Stopping sppsvc service...
|
||||
%psc% Stop-Service sppsvc -force %nul%
|
||||
|
||||
set w=
|
||||
set _sppint=
|
||||
for %%# in (SppEx%w%tComObj.exe %_slexe%) do (reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" %nul% && (set _sppint=1))
|
||||
for %%# in (SppEx%w%tComObj.exe sppsvc.exe) do (reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" %nul% && (set _sppint=1))
|
||||
if defined _sppint (
|
||||
echo:
|
||||
echo Removing SPP IFEO registry keys...
|
||||
for %%# in (SppE%w%xtComObj.exe %_slexe%) do (reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" /f %nul%)
|
||||
for %%# in (SppE%w%xtComObj.exe sppsvc.exe) do (reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" /f %nul%)
|
||||
)
|
||||
|
||||
if %winbuild% LSS 9200 if not defined _vis (
|
||||
if %winbuild% LSS 9200 (
|
||||
REM Fix issues caused by Update KB971033 in Windows 7
|
||||
REM https://support.microsoft.com/help/4487266
|
||||
echo:
|
||||
|
@ -750,7 +696,6 @@ del /f /q %SysPath%\7B296FB0-376B-497e-B012-9C450E1B7327-*.C7483456-A289-439d-81
|
|||
|
||||
:: Delete registry keys that are not deleted by activation scripts
|
||||
|
||||
if not defined _vis (
|
||||
echo:
|
||||
echo Cleaning some licensing-related registry keys...
|
||||
%nul% reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "ServiceSessionId" /f
|
||||
|
@ -758,7 +703,6 @@ echo Cleaning some licensing-related registry keys...
|
|||
%nul% reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "PolicyValuesArray" /f
|
||||
%nul% reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f
|
||||
%nul% reg delete "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform\data" /f
|
||||
)
|
||||
|
||||
echo:
|
||||
call :scandat delete
|
||||
|
@ -770,13 +714,9 @@ call :dk_color %Red% "Failed to delete .dat files."
|
|||
echo:
|
||||
)
|
||||
|
||||
if defined _vis (
|
||||
%psc% Start-Service %_slser% %nul%
|
||||
)
|
||||
|
||||
echo:
|
||||
echo Reinstalling system licenses...
|
||||
%psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul%
|
||||
%psc% "Stop-Service sppsvc -force; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul%
|
||||
if %errorlevel% NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul%
|
||||
if %errorlevel% EQU 0 (
|
||||
echo [Successful]
|
||||
|
@ -793,7 +733,7 @@ call :dk_color %Red% "Failed to rebuild tokens.dat file."
|
|||
echo tokens.dat file was rebuilt successfully.
|
||||
)
|
||||
|
||||
if %winbuild% LSS 9200 if not defined _vis (
|
||||
if %winbuild% LSS 9200 (
|
||||
sc config sppuinotify start= demand
|
||||
)
|
||||
|
||||
|
@ -874,12 +814,12 @@ set _86=HKLM\SOFTWARE\Wow6432Node\Microsoft\Office
|
|||
reg query %_68%\14.0\CVH /f Click2run /k %nul% && (set "c2r14_68=Office 14.0 C2R x86/x64" & set "c2r14repair68=")
|
||||
reg query %_86%\14.0\CVH /f Click2run /k %nul% && (set "c2r14_86=Office 14.0 C2R x86" & set "c2r14repair86=")
|
||||
|
||||
for /f "skip=2 tokens=2*" %%a in ('"reg query %_86%\14.0\Common\InstallRoot /v Path" %nul6%') do if exist "%%b\*Picker.dll" (set "msi14_86=Office 14.0 MSI x86" & call :getrepairsetup msi14repair86 14)
|
||||
for /f "skip=2 tokens=2*" %%a in ('"reg query %_68%\14.0\Common\InstallRoot /v Path" %nul6%') do if exist "%%b\*Picker.dll" (set "msi14_68=Office 14.0 MSI x86/x64" & call :getrepairsetup msi14repair68 14)
|
||||
for /f "skip=2 tokens=2*" %%a in ('"reg query %_86%\15.0\Common\InstallRoot /v Path" %nul6%') do if exist "%%b\*Picker.dll" (set "msi15_86=Office 15.0 MSI x86" & call :getrepairsetup msi15repair86 15)
|
||||
for /f "skip=2 tokens=2*" %%a in ('"reg query %_68%\15.0\Common\InstallRoot /v Path" %nul6%') do if exist "%%b\*Picker.dll" (set "msi15_68=Office 15.0 MSI x86/x64" & call :getrepairsetup msi15repair68 15)
|
||||
for /f "skip=2 tokens=2*" %%a in ('"reg query %_86%\16.0\Common\InstallRoot /v Path" %nul6%') do if exist "%%b\*Picker.dll" (set "msi16_86=Office 16.0 MSI x86" & call :getrepairsetup msi16repair86 16)
|
||||
for /f "skip=2 tokens=2*" %%a in ('"reg query %_68%\16.0\Common\InstallRoot /v Path" %nul6%') do if exist "%%b\*Picker.dll" (set "msi16_68=Office 16.0 MSI x86/x64" & call :getrepairsetup msi16repair68 16)
|
||||
for /f "skip=2 tokens=2*" %%a in ('"reg query %_86%\14.0\Common\InstallRoot /v Path" %nul6%') do if exist "%%b\EntityPicker.dll" (set "msi14_86=Office 14.0 MSI x86" & call :getrepairsetup msi14repair86 14)
|
||||
for /f "skip=2 tokens=2*" %%a in ('"reg query %_68%\14.0\Common\InstallRoot /v Path" %nul6%') do if exist "%%b\EntityPicker.dll" (set "msi14_68=Office 14.0 MSI x86/x64" & call :getrepairsetup msi14repair68 14)
|
||||
for /f "skip=2 tokens=2*" %%a in ('"reg query %_86%\15.0\Common\InstallRoot /v Path" %nul6%') do if exist "%%b\EntityPicker.dll" (set "msi15_86=Office 15.0 MSI x86" & call :getrepairsetup msi15repair86 15)
|
||||
for /f "skip=2 tokens=2*" %%a in ('"reg query %_68%\15.0\Common\InstallRoot /v Path" %nul6%') do if exist "%%b\EntityPicker.dll" (set "msi15_68=Office 15.0 MSI x86/x64" & call :getrepairsetup msi15repair68 15)
|
||||
for /f "skip=2 tokens=2*" %%a in ('"reg query %_86%\16.0\Common\InstallRoot /v Path" %nul6%') do if exist "%%b\EntityPicker.dll" (set "msi16_86=Office 16.0 MSI x86" & call :getrepairsetup msi16repair86 16)
|
||||
for /f "skip=2 tokens=2*" %%a in ('"reg query %_68%\16.0\Common\InstallRoot /v Path" %nul6%') do if exist "%%b\EntityPicker.dll" (set "msi16_68=Office 16.0 MSI x86/x64" & call :getrepairsetup msi16repair68 16)
|
||||
|
||||
for /f "skip=2 tokens=2*" %%a in ('"reg query %_86%\15.0\ClickToRun /v InstallPath" %nul6%') do if exist "%%b\root\Licenses\ProPlus*.xrm-ms" (set "c2r15_86=Office 15.0 C2R x86" & call :getc2rrepair c2r15repair86 integratedoffice.exe)
|
||||
for /f "skip=2 tokens=2*" %%a in ('"reg query %_68%\15.0\ClickToRun /v InstallPath" %nul6%') do if exist "%%b\root\Licenses\ProPlus*.xrm-ms" (set "c2r15_68=Office 15.0 C2R x86/x64" & call :getc2rrepair c2r15repair68 integratedoffice.exe)
|
||||
|
@ -1359,13 +1299,13 @@ function InstallLicenseArr($Str) {
|
|||
ForEach ($x in $a) {InstallLicenseFile "$x"}
|
||||
}
|
||||
function InstallLicenseDir($Loc) {
|
||||
Get-ChildItem $Loc -Recurse -Filter *.xrm-ms | ForEach-Object {InstallLicenseFile $_.FullName}
|
||||
dir $Loc *.xrm-ms -af -s | select -expand FullName | % {InstallLicenseFile "$_"}
|
||||
}
|
||||
function ReinstallLicenses() {
|
||||
$Paths = @("$env:SysPath\oem", "$env:SysPath\licensing", "$env:SysPath\spp\tokens")
|
||||
foreach ($Path in $Paths) {
|
||||
if (Test-Path $Path) { InstallLicenseDir "$Path" }
|
||||
}
|
||||
$Oem = "$env:SysPath\oem"
|
||||
$Spp = "$env:SysPath\spp\tokens"
|
||||
InstallLicenseDir "$Spp"
|
||||
If (Test-Path $Oem) {InstallLicenseDir "$Oem"}
|
||||
}
|
||||
:xrm:
|
||||
|
||||
|
@ -1379,7 +1319,6 @@ for %%# in (
|
|||
%SysPath%\spp\store\
|
||||
%SysPath%\spp\store\2.0\
|
||||
%Systemdrive%\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform\
|
||||
%Systemdrive%\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareLicensing\
|
||||
) do (
|
||||
|
||||
if %1==check (
|
||||
|
@ -1455,40 +1394,13 @@ $key.SetAccessControl($acl)
|
|||
|
||||
::========================================================================================================================================
|
||||
|
||||
:dk_color
|
||||
|
||||
if %_NCS% EQU 1 (
|
||||
echo %esc%[%~1%~2%esc%[0m
|
||||
) else if exist %ps% (
|
||||
%psc% write-host -back '%1' -fore '%2' '%3'
|
||||
) else if not exist %ps% (
|
||||
echo %~3
|
||||
)
|
||||
exit /b
|
||||
|
||||
:dk_color2
|
||||
|
||||
if %_NCS% EQU 1 (
|
||||
echo %esc%[%~1%~2%esc%[%~3%~4%esc%[0m
|
||||
) else if exist %ps% (
|
||||
%psc% write-host -back '%1' -fore '%2' '%3' -NoNewline; write-host -back '%4' -fore '%5' '%6'
|
||||
) else if not exist %ps% (
|
||||
echo %~3 %~6
|
||||
)
|
||||
exit /b
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:dk_done
|
||||
|
||||
echo:
|
||||
if %_unattended%==1 timeout /t 2 & exit /b
|
||||
|
||||
if defined fixes (
|
||||
call :dk_color %White% "Follow ALL the ABOVE blue lines. "
|
||||
call :dk_color2 %Blue% "Press [1] to Open Support Webpage " %Gray% " Press [0] to Ignore"
|
||||
choice /C:10 /N
|
||||
if !errorlevel!==2 exit /b
|
||||
if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#))
|
||||
)
|
||||
|
||||
|
@ -1499,7 +1411,26 @@ choice /c 0 /n
|
|||
call :dk_color %_Yellow% "Press any key to %_exitmsg%..."
|
||||
pause %nul1%
|
||||
)
|
||||
exit /b
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:dk_color
|
||||
|
||||
if %_NCS% EQU 1 (
|
||||
echo %esc%[%~1%~2%esc%[0m
|
||||
) else (
|
||||
%psc% write-host -back '%1' -fore '%2' '%3'
|
||||
)
|
||||
exit /b
|
||||
|
||||
:dk_color2
|
||||
|
||||
if %_NCS% EQU 1 (
|
||||
echo %esc%[%~1%~2%esc%[%~3%~4%esc%[0m
|
||||
) else (
|
||||
%psc% write-host -back '%1' -fore '%2' '%3' -NoNewline; write-host -back '%4' -fore '%5' '%6'
|
||||
)
|
||||
exit /b
|
||||
|
||||
::========================================================================================================================================
|
||||
|
@ -1508,16 +1439,10 @@ exit /b
|
|||
|
||||
:dk_setvar
|
||||
|
||||
set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe
|
||||
set psc=%ps% -nop -c
|
||||
set psc=powershell.exe
|
||||
set winbuild=1
|
||||
for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G
|
||||
|
||||
set _slexe=sppsvc.exe& set _slser=sppsvc
|
||||
if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc)
|
||||
if %winbuild% LSS 7600 if exist "%SysPath%\SLsvc.exe" (set _slexe=SLsvc.exe& set _slser=SLsvc)
|
||||
if %_slexe%==SLsvc.exe set _vis=1
|
||||
|
||||
set _NCS=1
|
||||
if %winbuild% LSS 10586 set _NCS=0
|
||||
if %winbuild% GEQ 10586 reg query "HKCU\Console" /v ForceV2 %nul2% | find /i "0x0" %nul1% && (set _NCS=0)
|
||||
|
|
43
README.md
43
README.md
|
@ -6,54 +6,43 @@
|
|||
|
||||
<hr>
|
||||
|
||||
## How to Activate Windows / Office?
|
||||
## Download / How to use it?
|
||||
|
||||
### Method 1 - PowerShell (Windows 8 and later) ❤️
|
||||
|
||||
1. **Open PowerShell**
|
||||
To do that, press the Windows key + X, then select PowerShell or Terminal.
|
||||
|
||||
2. **Copy and paste the code below, then 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
|
||||
```
|
||||
Alternatively, you can use the following (this will be deprecated in the future):
|
||||
Alternatively, you can use the following (It will be deprecated in the future.)
|
||||
```
|
||||
irm https://massgrave.dev/get | iex
|
||||
```
|
||||
|
||||
3. You will see the activation options.
|
||||
Press 1 HWID for Windows activation.
|
||||
Press 2 Ohook for Office activation.
|
||||
|
||||
4. 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.
|
||||
|
||||
---
|
||||
|
||||
### Method 2 - Traditional (Windows Vista and later)
|
||||
### Method 2 - Traditional (Windows 7 and later)
|
||||
|
||||
<details>
|
||||
<summary>Click here to view</summary>
|
||||
<summary>Click here for info</summary>
|
||||
|
||||
1. Download the file using one of the links below:
|
||||
1. Download the file using the links provided below.
|
||||
`https://github.com/massgravel/Microsoft-Activation-Scripts/archive/refs/heads/master.zip`
|
||||
or
|
||||
`https://git.activated.win/massgrave/Microsoft-Activation-Scripts/archive/master.zip`
|
||||
2. Right-click on the downloaded zip file and extract it.
|
||||
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.
|
||||
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.
|
||||
|
||||
</details>
|
||||
|
||||
---
|
||||
|
||||
- **[Office for macOS](https://massgrave.dev/office_for_mac)**
|
||||
- To run the scripts in unattended mode, check [here](https://massgrave.dev/command_line_switches).
|
||||
|
||||
---
|
||||
|
||||
### Not working ❓
|
||||
|
||||
- If you are **unable to launch MAS** using the PowerShell method, please refer to **Method 2** listed above.
|
||||
|
@ -70,9 +59,11 @@ or
|
|||
|
||||
---
|
||||
|
||||
To run the scripts in unattended mode, check [here](https://massgrave.dev/command_line_switches).
|
||||
|
||||
```
|
||||
Latest Version: 3.2
|
||||
Release date: 6-May-2025
|
||||
Latest Version: 3.0
|
||||
Release date: 14-Feb-2025
|
||||
```
|
||||
|
||||
### [Troubleshooting / Help](https://massgrave.dev/troubleshoot)
|
||||
|
|
Loading…
Add table
Reference in a new issue