Compare commits

...

5 Commits

  1. 82
      MAS/All-In-One-Version-KL/MAS_AIO.cmd
  2. 71
      MAS/Separate-Files-Version/Activators/HWID_Activation.cmd
  3. 71
      MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd
  4. 71
      MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd
  5. 71
      MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd
  6. 82
      MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd
  7. 71
      MAS/Separate-Files-Version/Change_Office_Edition.cmd
  8. 71
      MAS/Separate-Files-Version/Change_Windows_Edition.cmd
  9. 71
      MAS/Separate-Files-Version/Extract_OEM_Folder.cmd
  10. 71
      MAS/Separate-Files-Version/Troubleshoot.cmd

82
MAS/All-In-One-Version-KL/MAS_AIO.cmd

@ -180,40 +180,55 @@ goto dk_done
::======================================================================================================================================== ::========================================================================================================================================
:: Elevate script as admin and pass arguments and preventing loop
%nul1% fltmc || (
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b
%eline%
echo This script needs admin rights.
echo Right click on this script and select 'Run as administrator'.
goto dk_done
)
::========================================================================================================================================
:: Check PowerShell :: Check PowerShell
REM :PStest: $ExecutionContext.SessionState.LanguageMode :PStest: ::pstst $ExecutionContext.SessionState.LanguageMode :pstst
for /f "delims=" %%a in ('cmd /c "%psc% ""if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}""" %nul6%') do (set tstresult=%%a)
cmd /c "%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':PStest:\s*';iex ($f[1])"" | find /i "FullLanguage" %nul1% || ( if /i not "%tstresult%"=="FullLanguage" (
%eline% %eline%
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" echo %tstresult%
echo: cmd /c "%psc% $ExecutionContext.SessionState.LanguageMode"
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | find /i "FullLanguage" %nul1% && (
echo Failed to run Powershell command but Powershell is working. REM check LanguageMode
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 }""" cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && (
echo: %eline%
set fixes=%fixes% %mas%troubleshoot echo FullLanguage mode not found in PowerShell. Aborting...
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 If you have applied restrictions on Powershell then undo those changes.
echo: echo:
set fixes=%fixes% %mas%fix_powershell set fixes=%fixes% %mas%fix_powershell
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%fix_powershell" call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%fix_powershell"
)
goto dk_done goto dk_done
) )
::======================================================================================================================================== REM check Powershell core version
:: Elevate script as admin and pass arguments and preventing loop 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
)
%nul1% fltmc || ( REM check antivirus and other errors
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b
%eline% echo PowerShell is not working properly. Aborting...
echo This script needs admin rights. 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 Right click on this script and select 'Run as administrator'. echo:
set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
goto dk_done goto dk_done
) )
@ -265,12 +280,18 @@ set "d4=$k=$t.CreateType(); $b=$k::SetConsoleMode($k::GetStdHandle(-10), 0x0080)
set -= set -=
set old= set old=
set pingp=
set upver=%masver:.=% set upver=%masver:.=%
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 activ%-%ated.win') do ( for %%A in (
if not "%%#"=="" set old=1 activ%-%ated.win
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 updatecheck%upver%.activ%-%ated.win') do ( mass%-%grave.dev
if not "%%#"=="" set old= ) 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=
)
) )
) )
@ -4037,9 +4058,13 @@ REM Windows8.1
REM WindowsServer2012/2012R2 REM WindowsServer2012/2012R2
55b1dd2d-2209-4ea0-a805-06298bad25b3_Server-ESU-Year3[1-3y]_-ServerDatacenter-ServerDatacenterCore-ServerDatacenterV-ServerDatacenterVCore-ServerStandard-ServerStandardCore-ServerStandardV-ServerStandardVCore- 55b1dd2d-2209-4ea0-a805-06298bad25b3_Server-ESU-Year3[1-3y]_-ServerDatacenter-ServerDatacenterCore-ServerDatacenterV-ServerDatacenterVCore-ServerStandard-ServerStandardCore-ServerStandardV-ServerStandardVCore-
REM Windows10 REM Windows10
83d49986-add3-41d7-ba33-87c7bfb5c0fb_Client-ESU-Year3[1-3y]_-Education-EducationN-Enterprise-EnterpriseN-Professional-ProfessionalEducation-ProfessionalEducationN-ProfessionalN-ProfessionalWorkstation-ProfessionalWorkstationN-ServerRdsh- f520e45e-7413-4a34-a497-d2765967d094_Client-ESU-Year1_-Education-EducationN-Enterprise-EnterpriseN-Professional-ProfessionalEducation-ProfessionalEducationN-ProfessionalN-ProfessionalWorkstation-ProfessionalWorkstationN-ServerRdsh-
1043add5-23b1-4afb-9a0f-64343c8f3f8d_Client-ESU-Year2_-Education-EducationN-Enterprise-EnterpriseN-Professional-ProfessionalEducation-ProfessionalEducationN-ProfessionalN-ProfessionalWorkstation-ProfessionalWorkstationN-ServerRdsh-
83d49986-add3-41d7-ba33-87c7bfb5c0fb_Client-ESU-Year3_-Education-EducationN-Enterprise-EnterpriseN-Professional-ProfessionalEducation-ProfessionalEducationN-ProfessionalN-ProfessionalWorkstation-ProfessionalWorkstationN-ServerRdsh-
0b533b5e-08b6-44f9-b885-c2de291ba456_Client-ESU-Year6[4-6y]_-Education-EducationN-Enterprise-EnterpriseN-Professional-ProfessionalEducation-ProfessionalEducationN-ProfessionalN-ProfessionalWorkstation-ProfessionalWorkstationN-ServerRdsh- 0b533b5e-08b6-44f9-b885-c2de291ba456_Client-ESU-Year6[4-6y]_-Education-EducationN-Enterprise-EnterpriseN-Professional-ProfessionalEducation-ProfessionalEducationN-ProfessionalN-ProfessionalWorkstation-ProfessionalWorkstationN-ServerRdsh-
4dac5a0c-5709-4595-a32c-14a56a4a6b31_Client-IoT-ESU-Year3[1-3y]_-IoTEnterprise- b8527af1-5389-447c-9a88-2d1691ea33d3_Client-IoT-ESU-Year1_-IoTEnterprise-
7b76ee02-0a75-4f08-85d5-bd0feadad0c0_Client-IoT-ESU-Year2_-IoTEnterprise-
4dac5a0c-5709-4595-a32c-14a56a4a6b31_Client-IoT-ESU-Year3_-IoTEnterprise-
f69e2d51-3bbd-4ddf-8da7-a145e9dca597_Client-IoT-ESU-Year6[4-6y]_-IoTEnterprise- f69e2d51-3bbd-4ddf-8da7-a145e9dca597_Client-IoT-ESU-Year6[4-6y]_-IoTEnterprise-
) do ( ) do (
for /f "tokens=1-3 delims=_" %%A in ("%%#") do ( for /f "tokens=1-3 delims=_" %%A in ("%%#") do (
@ -4740,8 +4765,7 @@ mode 100, 30
title Remove TSforge Activation %masver% title Remove TSforge Activation %masver%
echo: echo:
echo TSforge activation doesn't modify any Windows component. echo TSforge activation doesn't modify any Windows components and doesn't install any new files.
echo TSforge activation doesn't install any new file in the system.
echo: echo:
echo Instead, it appends data to one of data files used by Software Protection Platform. echo Instead, it appends data to one of data files used by Software Protection Platform.
echo: echo:

71
MAS/Separate-Files-Version/Activators/HWID_Activation.cmd

@ -219,40 +219,55 @@ goto dk_done
::======================================================================================================================================== ::========================================================================================================================================
:: Elevate script as admin and pass arguments and preventing loop
%nul1% fltmc || (
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b
%eline%
echo This script needs admin rights.
echo Right click on this script and select 'Run as administrator'.
goto dk_done
)
::========================================================================================================================================
:: Check PowerShell :: Check PowerShell
REM :PStest: $ExecutionContext.SessionState.LanguageMode :PStest: ::pstst $ExecutionContext.SessionState.LanguageMode :pstst
for /f "delims=" %%a in ('cmd /c "%psc% ""if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}""" %nul6%') do (set tstresult=%%a)
cmd /c "%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':PStest:\s*';iex ($f[1])"" | find /i "FullLanguage" %nul1% || ( if /i not "%tstresult%"=="FullLanguage" (
%eline% %eline%
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" echo %tstresult%
echo: cmd /c "%psc% $ExecutionContext.SessionState.LanguageMode"
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | find /i "FullLanguage" %nul1% && (
echo Failed to run Powershell command but Powershell is working. REM check LanguageMode
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 }""" cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && (
echo: %eline%
set fixes=%fixes% %mas%troubleshoot echo FullLanguage mode not found in PowerShell. Aborting...
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 If you have applied restrictions on Powershell then undo those changes.
echo: echo:
set fixes=%fixes% %mas%fix_powershell set fixes=%fixes% %mas%fix_powershell
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%fix_powershell" call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%fix_powershell"
)
goto dk_done goto dk_done
) )
::======================================================================================================================================== REM check Powershell core version
:: Elevate script as admin and pass arguments and preventing loop 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
)
%nul1% fltmc || ( REM check antivirus and other errors
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b
%eline% echo PowerShell is not working properly. Aborting...
echo This script needs admin rights. 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 Right click on this script and select 'Run as administrator'. echo:
set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
goto dk_done goto dk_done
) )
@ -304,12 +319,18 @@ set "d4=$k=$t.CreateType(); $b=$k::SetConsoleMode($k::GetStdHandle(-10), 0x0080)
set -= set -=
set old= set old=
set pingp=
set upver=%masver:.=% set upver=%masver:.=%
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 activ%-%ated.win') do ( for %%A in (
if not "%%#"=="" set old=1 activ%-%ated.win
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 updatecheck%upver%.activ%-%ated.win') do ( mass%-%grave.dev
if not "%%#"=="" set old= ) 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=
)
) )
) )

71
MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd

@ -222,40 +222,55 @@ goto dk_done
::======================================================================================================================================== ::========================================================================================================================================
:: Elevate script as admin and pass arguments and preventing loop
%nul1% fltmc || (
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b
%eline%
echo This script needs admin rights.
echo Right click on this script and select 'Run as administrator'.
goto dk_done
)
::========================================================================================================================================
:: Check PowerShell :: Check PowerShell
REM :PStest: $ExecutionContext.SessionState.LanguageMode :PStest: ::pstst $ExecutionContext.SessionState.LanguageMode :pstst
for /f "delims=" %%a in ('cmd /c "%psc% ""if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}""" %nul6%') do (set tstresult=%%a)
cmd /c "%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':PStest:\s*';iex ($f[1])"" | find /i "FullLanguage" %nul1% || ( if /i not "%tstresult%"=="FullLanguage" (
%eline% %eline%
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" echo %tstresult%
echo: cmd /c "%psc% $ExecutionContext.SessionState.LanguageMode"
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | find /i "FullLanguage" %nul1% && (
echo Failed to run Powershell command but Powershell is working. REM check LanguageMode
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 }""" cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && (
echo: %eline%
set fixes=%fixes% %mas%troubleshoot echo FullLanguage mode not found in PowerShell. Aborting...
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 If you have applied restrictions on Powershell then undo those changes.
echo: echo:
set fixes=%fixes% %mas%fix_powershell set fixes=%fixes% %mas%fix_powershell
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%fix_powershell" call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%fix_powershell"
)
goto dk_done goto dk_done
) )
::======================================================================================================================================== REM check Powershell core version
:: Elevate script as admin and pass arguments and preventing loop 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
)
%nul1% fltmc || ( REM check antivirus and other errors
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b
%eline% echo PowerShell is not working properly. Aborting...
echo This script needs admin rights. 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 Right click on this script and select 'Run as administrator'. echo:
set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
goto dk_done goto dk_done
) )
@ -307,12 +322,18 @@ set "d4=$k=$t.CreateType(); $b=$k::SetConsoleMode($k::GetStdHandle(-10), 0x0080)
set -= set -=
set old= set old=
set pingp=
set upver=%masver:.=% set upver=%masver:.=%
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 activ%-%ated.win') do ( for %%A in (
if not "%%#"=="" set old=1 activ%-%ated.win
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 updatecheck%upver%.activ%-%ated.win') do ( mass%-%grave.dev
if not "%%#"=="" set old= ) 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=
)
) )
) )

71
MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd

@ -212,40 +212,55 @@ goto dk_done
::======================================================================================================================================== ::========================================================================================================================================
:: Elevate script as admin and pass arguments and preventing loop
%nul1% fltmc || (
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b
%eline%
echo This script needs admin rights.
echo Right click on this script and select 'Run as administrator'.
goto dk_done
)
::========================================================================================================================================
:: Check PowerShell :: Check PowerShell
REM :PStest: $ExecutionContext.SessionState.LanguageMode :PStest: ::pstst $ExecutionContext.SessionState.LanguageMode :pstst
for /f "delims=" %%a in ('cmd /c "%psc% ""if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}""" %nul6%') do (set tstresult=%%a)
cmd /c "%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':PStest:\s*';iex ($f[1])"" | find /i "FullLanguage" %nul1% || ( if /i not "%tstresult%"=="FullLanguage" (
%eline% %eline%
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" echo %tstresult%
echo: cmd /c "%psc% $ExecutionContext.SessionState.LanguageMode"
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | find /i "FullLanguage" %nul1% && (
echo Failed to run Powershell command but Powershell is working. REM check LanguageMode
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 }""" cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && (
echo: %eline%
set fixes=%fixes% %mas%troubleshoot echo FullLanguage mode not found in PowerShell. Aborting...
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 If you have applied restrictions on Powershell then undo those changes.
echo: echo:
set fixes=%fixes% %mas%fix_powershell set fixes=%fixes% %mas%fix_powershell
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%fix_powershell" call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%fix_powershell"
)
goto dk_done goto dk_done
) )
::======================================================================================================================================== REM check Powershell core version
:: Elevate script as admin and pass arguments and preventing loop 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
)
%nul1% fltmc || ( REM check antivirus and other errors
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b
%eline% echo PowerShell is not working properly. Aborting...
echo This script needs admin rights. 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 Right click on this script and select 'Run as administrator'. echo:
set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
goto dk_done goto dk_done
) )
@ -297,12 +312,18 @@ set "d4=$k=$t.CreateType(); $b=$k::SetConsoleMode($k::GetStdHandle(-10), 0x0080)
set -= set -=
set old= set old=
set pingp=
set upver=%masver:.=% set upver=%masver:.=%
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 activ%-%ated.win') do ( for %%A in (
if not "%%#"=="" set old=1 activ%-%ated.win
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 updatecheck%upver%.activ%-%ated.win') do ( mass%-%grave.dev
if not "%%#"=="" set old= ) 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=
)
) )
) )

71
MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd

@ -241,40 +241,55 @@ goto dk_done
::======================================================================================================================================== ::========================================================================================================================================
:: Elevate script as admin and pass arguments and preventing loop
%nul1% fltmc || (
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b
%eline%
echo This script needs admin rights.
echo Right click on this script and select 'Run as administrator'.
goto dk_done
)
::========================================================================================================================================
:: Check PowerShell :: Check PowerShell
REM :PStest: $ExecutionContext.SessionState.LanguageMode :PStest: ::pstst $ExecutionContext.SessionState.LanguageMode :pstst
for /f "delims=" %%a in ('cmd /c "%psc% ""if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}""" %nul6%') do (set tstresult=%%a)
cmd /c "%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':PStest:\s*';iex ($f[1])"" | find /i "FullLanguage" %nul1% || ( if /i not "%tstresult%"=="FullLanguage" (
%eline% %eline%
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" echo %tstresult%
echo: cmd /c "%psc% $ExecutionContext.SessionState.LanguageMode"
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | find /i "FullLanguage" %nul1% && (
echo Failed to run Powershell command but Powershell is working. REM check LanguageMode
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 }""" cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && (
echo: %eline%
set fixes=%fixes% %mas%troubleshoot echo FullLanguage mode not found in PowerShell. Aborting...
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 If you have applied restrictions on Powershell then undo those changes.
echo: echo:
set fixes=%fixes% %mas%fix_powershell set fixes=%fixes% %mas%fix_powershell
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%fix_powershell" call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%fix_powershell"
)
goto dk_done goto dk_done
) )
::======================================================================================================================================== REM check Powershell core version
:: Elevate script as admin and pass arguments and preventing loop 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
)
%nul1% fltmc || ( REM check antivirus and other errors
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b
%eline% echo PowerShell is not working properly. Aborting...
echo This script needs admin rights. 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 Right click on this script and select 'Run as administrator'. echo:
set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
goto dk_done goto dk_done
) )
@ -326,12 +341,18 @@ set "d4=$k=$t.CreateType(); $b=$k::SetConsoleMode($k::GetStdHandle(-10), 0x0080)
set -= set -=
set old= set old=
set pingp=
set upver=%masver:.=% set upver=%masver:.=%
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 activ%-%ated.win') do ( for %%A in (
if not "%%#"=="" set old=1 activ%-%ated.win
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 updatecheck%upver%.activ%-%ated.win') do ( mass%-%grave.dev
if not "%%#"=="" set old= ) 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=
)
) )
) )

82
MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd

@ -247,40 +247,55 @@ goto dk_done
::======================================================================================================================================== ::========================================================================================================================================
:: Elevate script as admin and pass arguments and preventing loop
%nul1% fltmc || (
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b
%eline%
echo This script needs admin rights.
echo Right click on this script and select 'Run as administrator'.
goto dk_done
)
::========================================================================================================================================
:: Check PowerShell :: Check PowerShell
REM :PStest: $ExecutionContext.SessionState.LanguageMode :PStest: ::pstst $ExecutionContext.SessionState.LanguageMode :pstst
for /f "delims=" %%a in ('cmd /c "%psc% ""if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}""" %nul6%') do (set tstresult=%%a)
cmd /c "%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':PStest:\s*';iex ($f[1])"" | find /i "FullLanguage" %nul1% || ( if /i not "%tstresult%"=="FullLanguage" (
%eline% %eline%
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" echo %tstresult%
echo: cmd /c "%psc% $ExecutionContext.SessionState.LanguageMode"
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | find /i "FullLanguage" %nul1% && (
echo Failed to run Powershell command but Powershell is working. REM check LanguageMode
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 }""" cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && (
echo: %eline%
set fixes=%fixes% %mas%troubleshoot echo FullLanguage mode not found in PowerShell. Aborting...
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 If you have applied restrictions on Powershell then undo those changes.
echo: echo:
set fixes=%fixes% %mas%fix_powershell set fixes=%fixes% %mas%fix_powershell
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%fix_powershell" call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%fix_powershell"
)
goto dk_done goto dk_done
) )
::======================================================================================================================================== REM check Powershell core version
:: Elevate script as admin and pass arguments and preventing loop 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
)
%nul1% fltmc || ( REM check antivirus and other errors
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b
%eline% echo PowerShell is not working properly. Aborting...
echo This script needs admin rights. 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 Right click on this script and select 'Run as administrator'. echo:
set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
goto dk_done goto dk_done
) )
@ -332,12 +347,18 @@ set "d4=$k=$t.CreateType(); $b=$k::SetConsoleMode($k::GetStdHandle(-10), 0x0080)
set -= set -=
set old= set old=
set pingp=
set upver=%masver:.=% set upver=%masver:.=%
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 activ%-%ated.win') do ( for %%A in (
if not "%%#"=="" set old=1 activ%-%ated.win
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 updatecheck%upver%.activ%-%ated.win') do ( mass%-%grave.dev
if not "%%#"=="" set old= ) 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=
)
) )
) )
@ -735,9 +756,13 @@ REM Windows8.1
REM WindowsServer2012/2012R2 REM WindowsServer2012/2012R2
55b1dd2d-2209-4ea0-a805-06298bad25b3_Server-ESU-Year3[1-3y]_-ServerDatacenter-ServerDatacenterCore-ServerDatacenterV-ServerDatacenterVCore-ServerStandard-ServerStandardCore-ServerStandardV-ServerStandardVCore- 55b1dd2d-2209-4ea0-a805-06298bad25b3_Server-ESU-Year3[1-3y]_-ServerDatacenter-ServerDatacenterCore-ServerDatacenterV-ServerDatacenterVCore-ServerStandard-ServerStandardCore-ServerStandardV-ServerStandardVCore-
REM Windows10 REM Windows10
83d49986-add3-41d7-ba33-87c7bfb5c0fb_Client-ESU-Year3[1-3y]_-Education-EducationN-Enterprise-EnterpriseN-Professional-ProfessionalEducation-ProfessionalEducationN-ProfessionalN-ProfessionalWorkstation-ProfessionalWorkstationN-ServerRdsh- f520e45e-7413-4a34-a497-d2765967d094_Client-ESU-Year1_-Education-EducationN-Enterprise-EnterpriseN-Professional-ProfessionalEducation-ProfessionalEducationN-ProfessionalN-ProfessionalWorkstation-ProfessionalWorkstationN-ServerRdsh-
1043add5-23b1-4afb-9a0f-64343c8f3f8d_Client-ESU-Year2_-Education-EducationN-Enterprise-EnterpriseN-Professional-ProfessionalEducation-ProfessionalEducationN-ProfessionalN-ProfessionalWorkstation-ProfessionalWorkstationN-ServerRdsh-
83d49986-add3-41d7-ba33-87c7bfb5c0fb_Client-ESU-Year3_-Education-EducationN-Enterprise-EnterpriseN-Professional-ProfessionalEducation-ProfessionalEducationN-ProfessionalN-ProfessionalWorkstation-ProfessionalWorkstationN-ServerRdsh-
0b533b5e-08b6-44f9-b885-c2de291ba456_Client-ESU-Year6[4-6y]_-Education-EducationN-Enterprise-EnterpriseN-Professional-ProfessionalEducation-ProfessionalEducationN-ProfessionalN-ProfessionalWorkstation-ProfessionalWorkstationN-ServerRdsh- 0b533b5e-08b6-44f9-b885-c2de291ba456_Client-ESU-Year6[4-6y]_-Education-EducationN-Enterprise-EnterpriseN-Professional-ProfessionalEducation-ProfessionalEducationN-ProfessionalN-ProfessionalWorkstation-ProfessionalWorkstationN-ServerRdsh-
4dac5a0c-5709-4595-a32c-14a56a4a6b31_Client-IoT-ESU-Year3[1-3y]_-IoTEnterprise- b8527af1-5389-447c-9a88-2d1691ea33d3_Client-IoT-ESU-Year1_-IoTEnterprise-
7b76ee02-0a75-4f08-85d5-bd0feadad0c0_Client-IoT-ESU-Year2_-IoTEnterprise-
4dac5a0c-5709-4595-a32c-14a56a4a6b31_Client-IoT-ESU-Year3_-IoTEnterprise-
f69e2d51-3bbd-4ddf-8da7-a145e9dca597_Client-IoT-ESU-Year6[4-6y]_-IoTEnterprise- f69e2d51-3bbd-4ddf-8da7-a145e9dca597_Client-IoT-ESU-Year6[4-6y]_-IoTEnterprise-
) do ( ) do (
for /f "tokens=1-3 delims=_" %%A in ("%%#") do ( for /f "tokens=1-3 delims=_" %%A in ("%%#") do (
@ -1438,8 +1463,7 @@ mode 100, 30
title Remove TSforge Activation %masver% title Remove TSforge Activation %masver%
echo: echo:
echo TSforge activation doesn't modify any Windows component. echo TSforge activation doesn't modify any Windows components and doesn't install any new files.
echo TSforge activation doesn't install any new file in the system.
echo: echo:
echo Instead, it appends data to one of data files used by Software Protection Platform. echo Instead, it appends data to one of data files used by Software Protection Platform.
echo: echo:

71
MAS/Separate-Files-Version/Change_Office_Edition.cmd

@ -172,40 +172,55 @@ goto dk_done
::======================================================================================================================================== ::========================================================================================================================================
:: Elevate script as admin and pass arguments and preventing loop
%nul1% fltmc || (
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b
%eline%
echo This script needs admin rights.
echo Right click on this script and select 'Run as administrator'.
goto dk_done
)
::========================================================================================================================================
:: Check PowerShell :: Check PowerShell
REM :PStest: $ExecutionContext.SessionState.LanguageMode :PStest: ::pstst $ExecutionContext.SessionState.LanguageMode :pstst
for /f "delims=" %%a in ('cmd /c "%psc% ""if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}""" %nul6%') do (set tstresult=%%a)
cmd /c "%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':PStest:\s*';iex ($f[1])"" | find /i "FullLanguage" %nul1% || ( if /i not "%tstresult%"=="FullLanguage" (
%eline% %eline%
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" echo %tstresult%
echo: cmd /c "%psc% $ExecutionContext.SessionState.LanguageMode"
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | find /i "FullLanguage" %nul1% && (
echo Failed to run Powershell command but Powershell is working. REM check LanguageMode
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 }""" cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && (
echo: %eline%
set fixes=%fixes% %mas%troubleshoot echo FullLanguage mode not found in PowerShell. Aborting...
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 If you have applied restrictions on Powershell then undo those changes.
echo: echo:
set fixes=%fixes% %mas%fix_powershell set fixes=%fixes% %mas%fix_powershell
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%fix_powershell" call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%fix_powershell"
)
goto dk_done goto dk_done
) )
::======================================================================================================================================== REM check Powershell core version
:: Elevate script as admin and pass arguments and preventing loop 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
)
%nul1% fltmc || ( REM check antivirus and other errors
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b
%eline% echo PowerShell is not working properly. Aborting...
echo This script needs admin rights. 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 Right click on this script and select 'Run as administrator'. echo:
set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
goto dk_done goto dk_done
) )
@ -257,12 +272,18 @@ set "d4=$k=$t.CreateType(); $b=$k::SetConsoleMode($k::GetStdHandle(-10), 0x0080)
set -= set -=
set old= set old=
set pingp=
set upver=%masver:.=% set upver=%masver:.=%
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 activ%-%ated.win') do ( for %%A in (
if not "%%#"=="" set old=1 activ%-%ated.win
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 updatecheck%upver%.activ%-%ated.win') do ( mass%-%grave.dev
if not "%%#"=="" set old= ) 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=
)
) )
) )

71
MAS/Separate-Files-Version/Change_Windows_Edition.cmd

@ -177,40 +177,55 @@ goto dk_done
::======================================================================================================================================== ::========================================================================================================================================
:: Elevate script as admin and pass arguments and preventing loop
%nul1% fltmc || (
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b
%eline%
echo This script needs admin rights.
echo Right click on this script and select 'Run as administrator'.
goto dk_done
)
::========================================================================================================================================
:: Check PowerShell :: Check PowerShell
REM :PStest: $ExecutionContext.SessionState.LanguageMode :PStest: ::pstst $ExecutionContext.SessionState.LanguageMode :pstst
for /f "delims=" %%a in ('cmd /c "%psc% ""if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}""" %nul6%') do (set tstresult=%%a)
cmd /c "%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':PStest:\s*';iex ($f[1])"" | find /i "FullLanguage" %nul1% || ( if /i not "%tstresult%"=="FullLanguage" (
%eline% %eline%
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" echo %tstresult%
echo: cmd /c "%psc% $ExecutionContext.SessionState.LanguageMode"
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | find /i "FullLanguage" %nul1% && (
echo Failed to run Powershell command but Powershell is working. REM check LanguageMode
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 }""" cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && (
echo: %eline%
set fixes=%fixes% %mas%troubleshoot echo FullLanguage mode not found in PowerShell. Aborting...
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 If you have applied restrictions on Powershell then undo those changes.
echo: echo:
set fixes=%fixes% %mas%fix_powershell set fixes=%fixes% %mas%fix_powershell
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%fix_powershell" call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%fix_powershell"
)
goto dk_done goto dk_done
) )
::======================================================================================================================================== REM check Powershell core version
:: Elevate script as admin and pass arguments and preventing loop 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
)
%nul1% fltmc || ( REM check antivirus and other errors
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b
%eline% echo PowerShell is not working properly. Aborting...
echo This script needs admin rights. 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 Right click on this script and select 'Run as administrator'. echo:
set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
goto dk_done goto dk_done
) )
@ -262,12 +277,18 @@ set "d4=$k=$t.CreateType(); $b=$k::SetConsoleMode($k::GetStdHandle(-10), 0x0080)
set -= set -=
set old= set old=
set pingp=
set upver=%masver:.=% set upver=%masver:.=%
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 activ%-%ated.win') do ( for %%A in (
if not "%%#"=="" set old=1 activ%-%ated.win
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 updatecheck%upver%.activ%-%ated.win') do ( mass%-%grave.dev
if not "%%#"=="" set old= ) 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=
)
) )
) )

71
MAS/Separate-Files-Version/Extract_OEM_Folder.cmd

@ -171,40 +171,55 @@ goto done2
::======================================================================================================================================== ::========================================================================================================================================
:: Elevate script as admin and pass arguments and preventing loop
%nul1% fltmc || (
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b
%eline%
echo This script needs admin rights.
echo Right click on this script and select 'Run as administrator'.
goto done2
)
::========================================================================================================================================
:: Check PowerShell :: Check PowerShell
REM :PStest: $ExecutionContext.SessionState.LanguageMode :PStest: ::pstst $ExecutionContext.SessionState.LanguageMode :pstst
for /f "delims=" %%a in ('cmd /c "%psc% ""if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}""" %nul6%') do (set tstresult=%%a)
cmd /c "%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':PStest:\s*';iex ($f[1])"" | find /i "FullLanguage" %nul1% || ( if /i not "%tstresult%"=="FullLanguage" (
%eline% %eline%
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" echo %tstresult%
echo: cmd /c "%psc% $ExecutionContext.SessionState.LanguageMode"
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | find /i "FullLanguage" %nul1% && (
echo Failed to run Powershell command but Powershell is working. REM check LanguageMode
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 }""" cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && (
echo: %eline%
set fixes=%fixes% %mas%troubleshoot echo FullLanguage mode not found in PowerShell. Aborting...
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 If you have applied restrictions on Powershell then undo those changes.
echo: echo:
set fixes=%fixes% %mas%fix_powershell set fixes=%fixes% %mas%fix_powershell
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%fix_powershell" call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%fix_powershell"
)
goto done2 goto done2
) )
::======================================================================================================================================== REM check Powershell core version
:: Elevate script as admin and pass arguments and preventing loop 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
)
%nul1% fltmc || ( REM check antivirus and other errors
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b
%eline% echo PowerShell is not working properly. Aborting...
echo This script needs admin rights. 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 Right click on this script and select 'Run as administrator'. echo:
set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
goto done2 goto done2
) )
@ -256,12 +271,18 @@ set "d4=$k=$t.CreateType(); $b=$k::SetConsoleMode($k::GetStdHandle(-10), 0x0080)
set -= set -=
set old= set old=
set pingp=
set upver=%masver:.=% set upver=%masver:.=%
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 activ%-%ated.win') do ( for %%A in (
if not "%%#"=="" set old=1 activ%-%ated.win
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 updatecheck%upver%.activ%-%ated.win') do ( mass%-%grave.dev
if not "%%#"=="" set old= ) 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=
)
) )
) )

71
MAS/Separate-Files-Version/Troubleshoot.cmd

@ -172,40 +172,55 @@ goto dk_done
::======================================================================================================================================== ::========================================================================================================================================
:: Elevate script as admin and pass arguments and preventing loop
%nul1% fltmc || (
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b
%eline%
echo This script needs admin rights.
echo Right click on this script and select 'Run as administrator'.
goto dk_done
)
::========================================================================================================================================
:: Check PowerShell :: Check PowerShell
REM :PStest: $ExecutionContext.SessionState.LanguageMode :PStest: ::pstst $ExecutionContext.SessionState.LanguageMode :pstst
for /f "delims=" %%a in ('cmd /c "%psc% ""if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}""" %nul6%') do (set tstresult=%%a)
cmd /c "%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':PStest:\s*';iex ($f[1])"" | find /i "FullLanguage" %nul1% || ( if /i not "%tstresult%"=="FullLanguage" (
%eline% %eline%
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" echo %tstresult%
echo: cmd /c "%psc% $ExecutionContext.SessionState.LanguageMode"
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | find /i "FullLanguage" %nul1% && (
echo Failed to run Powershell command but Powershell is working. REM check LanguageMode
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 }""" cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && (
echo: %eline%
set fixes=%fixes% %mas%troubleshoot echo FullLanguage mode not found in PowerShell. Aborting...
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 If you have applied restrictions on Powershell then undo those changes.
echo: echo:
set fixes=%fixes% %mas%fix_powershell set fixes=%fixes% %mas%fix_powershell
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%fix_powershell" call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%fix_powershell"
)
goto dk_done goto dk_done
) )
::======================================================================================================================================== REM check Powershell core version
:: Elevate script as admin and pass arguments and preventing loop 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
)
%nul1% fltmc || ( REM check antivirus and other errors
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b
%eline% echo PowerShell is not working properly. Aborting...
echo This script needs admin rights. 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 Right click on this script and select 'Run as administrator'. echo:
set fixes=%fixes% %mas%troubleshoot
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
goto dk_done goto dk_done
) )
@ -257,12 +272,18 @@ set "d4=$k=$t.CreateType(); $b=$k::SetConsoleMode($k::GetStdHandle(-10), 0x0080)
set -= set -=
set old= set old=
set pingp=
set upver=%masver:.=% set upver=%masver:.=%
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 activ%-%ated.win') do ( for %%A in (
if not "%%#"=="" set old=1 activ%-%ated.win
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 updatecheck%upver%.activ%-%ated.win') do ( mass%-%grave.dev
if not "%%#"=="" set old= ) 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=
)
) )
) )

Loading…
Cancel
Save