mirror of
https://github.com/massgravel/Microsoft-Activation-Scripts.git
synced 2025-08-04 06:05:45 +02:00
Check .NET corruption
This commit is contained in:
parent
5e2cc4f5cf
commit
904e96d748
10 changed files with 174 additions and 14 deletions
|
@ -249,9 +249,25 @@ REM check Powershell core version
|
||||||
|
|
||||||
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && (
|
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && (
|
||||||
echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting...
|
echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting...
|
||||||
|
echo:
|
||||||
|
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||||
|
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||||
goto dk_done
|
goto dk_done
|
||||||
)
|
)
|
||||||
|
|
||||||
|
REM check if .NET is working properly
|
||||||
|
|
||||||
|
if /i "!tstresult2!"=="FullLanguage" (
|
||||||
|
cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul%
|
||||||
|
if !errorlevel!==3 (
|
||||||
|
echo Windows Powershell failed to load .NET command. Aborting...
|
||||||
|
echo:
|
||||||
|
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||||
|
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||||
|
goto dk_done
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
REM check for Mal-ware that may cause issues with Powershell
|
REM check for Mal-ware that may cause issues with Powershell
|
||||||
|
|
||||||
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
|
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
|
||||||
|
@ -269,7 +285,7 @@ echo PowerShell is not working properly. Aborting...
|
||||||
|
|
||||||
if /i "!tstresult2!"=="FullLanguage" (
|
if /i "!tstresult2!"=="FullLanguage" (
|
||||||
echo:
|
echo:
|
||||||
echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted.
|
echo Your antivirus software might be blocking the script.
|
||||||
echo:
|
echo:
|
||||||
sc query sense | find /i "RUNNING" %nul% && (
|
sc query sense | find /i "RUNNING" %nul% && (
|
||||||
echo Installed Antivirus - Microsoft Defender for Endpoint
|
echo Installed Antivirus - Microsoft Defender for Endpoint
|
||||||
|
|
|
@ -271,9 +271,25 @@ REM check Powershell core version
|
||||||
|
|
||||||
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && (
|
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && (
|
||||||
echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting...
|
echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting...
|
||||||
|
echo:
|
||||||
|
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||||
|
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||||
goto dk_done
|
goto dk_done
|
||||||
)
|
)
|
||||||
|
|
||||||
|
REM check if .NET is working properly
|
||||||
|
|
||||||
|
if /i "!tstresult2!"=="FullLanguage" (
|
||||||
|
cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul%
|
||||||
|
if !errorlevel!==3 (
|
||||||
|
echo Windows Powershell failed to load .NET command. Aborting...
|
||||||
|
echo:
|
||||||
|
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||||
|
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||||
|
goto dk_done
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
REM check for Mal-ware that may cause issues with Powershell
|
REM check for Mal-ware that may cause issues with Powershell
|
||||||
|
|
||||||
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
|
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
|
||||||
|
@ -291,7 +307,7 @@ echo PowerShell is not working properly. Aborting...
|
||||||
|
|
||||||
if /i "!tstresult2!"=="FullLanguage" (
|
if /i "!tstresult2!"=="FullLanguage" (
|
||||||
echo:
|
echo:
|
||||||
echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted.
|
echo Your antivirus software might be blocking the script.
|
||||||
echo:
|
echo:
|
||||||
sc query sense | find /i "RUNNING" %nul% && (
|
sc query sense | find /i "RUNNING" %nul% && (
|
||||||
echo Installed Antivirus - Microsoft Defender for Endpoint
|
echo Installed Antivirus - Microsoft Defender for Endpoint
|
||||||
|
|
|
@ -178,7 +178,7 @@ goto dk_done
|
||||||
if exist "%Systemdrive%\Users\WDAGUtilityAccount" (
|
if exist "%Systemdrive%\Users\WDAGUtilityAccount" (
|
||||||
sc query gcs | find /i "RUNNING" %nul% && (
|
sc query gcs | find /i "RUNNING" %nul% && (
|
||||||
%eline%
|
%eline%
|
||||||
echo Windows Sandbox detected; activation is not required.
|
echo Windows Sandbox detected; activation is not supported.
|
||||||
echo The script cannot run due to missing licensing components. Aborting...
|
echo The script cannot run due to missing licensing components. Aborting...
|
||||||
echo:
|
echo:
|
||||||
goto dk_done
|
goto dk_done
|
||||||
|
@ -270,9 +270,25 @@ REM check Powershell core version
|
||||||
|
|
||||||
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && (
|
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && (
|
||||||
echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting...
|
echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting...
|
||||||
|
echo:
|
||||||
|
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||||
|
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||||
goto dk_done
|
goto dk_done
|
||||||
)
|
)
|
||||||
|
|
||||||
|
REM check if .NET is working properly
|
||||||
|
|
||||||
|
if /i "!tstresult2!"=="FullLanguage" (
|
||||||
|
cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul%
|
||||||
|
if !errorlevel!==3 (
|
||||||
|
echo Windows Powershell failed to load .NET command. Aborting...
|
||||||
|
echo:
|
||||||
|
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||||
|
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||||
|
goto dk_done
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
REM check for Mal-ware that may cause issues with Powershell
|
REM check for Mal-ware that may cause issues with Powershell
|
||||||
|
|
||||||
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
|
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
|
||||||
|
@ -290,7 +306,7 @@ echo PowerShell is not working properly. Aborting...
|
||||||
|
|
||||||
if /i "!tstresult2!"=="FullLanguage" (
|
if /i "!tstresult2!"=="FullLanguage" (
|
||||||
echo:
|
echo:
|
||||||
echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted.
|
echo Your antivirus software might be blocking the script.
|
||||||
echo:
|
echo:
|
||||||
sc query sense | find /i "RUNNING" %nul% && (
|
sc query sense | find /i "RUNNING" %nul% && (
|
||||||
echo Installed Antivirus - Microsoft Defender for Endpoint
|
echo Installed Antivirus - Microsoft Defender for Endpoint
|
||||||
|
|
|
@ -176,7 +176,7 @@ goto dk_done
|
||||||
if exist "%Systemdrive%\Users\WDAGUtilityAccount" (
|
if exist "%Systemdrive%\Users\WDAGUtilityAccount" (
|
||||||
sc query gcs | find /i "RUNNING" %nul% && (
|
sc query gcs | find /i "RUNNING" %nul% && (
|
||||||
%eline%
|
%eline%
|
||||||
echo Windows Sandbox detected; activation is not required.
|
echo Windows Sandbox detected; activation is not supported.
|
||||||
echo The script cannot run due to missing licensing components. Aborting...
|
echo The script cannot run due to missing licensing components. Aborting...
|
||||||
echo:
|
echo:
|
||||||
goto dk_done
|
goto dk_done
|
||||||
|
@ -279,9 +279,25 @@ REM check Powershell core version
|
||||||
|
|
||||||
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && (
|
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && (
|
||||||
echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting...
|
echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting...
|
||||||
|
echo:
|
||||||
|
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||||
|
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||||
goto dk_done
|
goto dk_done
|
||||||
)
|
)
|
||||||
|
|
||||||
|
REM check if .NET is working properly
|
||||||
|
|
||||||
|
if /i "!tstresult2!"=="FullLanguage" (
|
||||||
|
cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul%
|
||||||
|
if !errorlevel!==3 (
|
||||||
|
echo Windows Powershell failed to load .NET command. Aborting...
|
||||||
|
echo:
|
||||||
|
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||||
|
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||||
|
goto dk_done
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
REM check for Mal-ware that may cause issues with Powershell
|
REM check for Mal-ware that may cause issues with Powershell
|
||||||
|
|
||||||
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
|
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
|
||||||
|
@ -299,7 +315,7 @@ echo PowerShell is not working properly. Aborting...
|
||||||
|
|
||||||
if /i "!tstresult2!"=="FullLanguage" (
|
if /i "!tstresult2!"=="FullLanguage" (
|
||||||
echo:
|
echo:
|
||||||
echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted.
|
echo Your antivirus software might be blocking the script.
|
||||||
echo:
|
echo:
|
||||||
sc query sense | find /i "RUNNING" %nul% && (
|
sc query sense | find /i "RUNNING" %nul% && (
|
||||||
echo Installed Antivirus - Microsoft Defender for Endpoint
|
echo Installed Antivirus - Microsoft Defender for Endpoint
|
||||||
|
|
|
@ -207,7 +207,7 @@ goto dk_done
|
||||||
if exist "%Systemdrive%\Users\WDAGUtilityAccount" (
|
if exist "%Systemdrive%\Users\WDAGUtilityAccount" (
|
||||||
sc query gcs | find /i "RUNNING" %nul% && (
|
sc query gcs | find /i "RUNNING" %nul% && (
|
||||||
%eline%
|
%eline%
|
||||||
echo Windows Sandbox detected; activation is not required.
|
echo Windows Sandbox detected; activation is not supported.
|
||||||
echo The script cannot run due to missing licensing components. Aborting...
|
echo The script cannot run due to missing licensing components. Aborting...
|
||||||
echo:
|
echo:
|
||||||
goto dk_done
|
goto dk_done
|
||||||
|
@ -310,9 +310,25 @@ REM check Powershell core version
|
||||||
|
|
||||||
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && (
|
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && (
|
||||||
echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting...
|
echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting...
|
||||||
|
echo:
|
||||||
|
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||||
|
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||||
goto dk_done
|
goto dk_done
|
||||||
)
|
)
|
||||||
|
|
||||||
|
REM check if .NET is working properly
|
||||||
|
|
||||||
|
if /i "!tstresult2!"=="FullLanguage" (
|
||||||
|
cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul%
|
||||||
|
if !errorlevel!==3 (
|
||||||
|
echo Windows Powershell failed to load .NET command. Aborting...
|
||||||
|
echo:
|
||||||
|
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||||
|
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||||
|
goto dk_done
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
REM check for Mal-ware that may cause issues with Powershell
|
REM check for Mal-ware that may cause issues with Powershell
|
||||||
|
|
||||||
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
|
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
|
||||||
|
@ -330,7 +346,7 @@ echo PowerShell is not working properly. Aborting...
|
||||||
|
|
||||||
if /i "!tstresult2!"=="FullLanguage" (
|
if /i "!tstresult2!"=="FullLanguage" (
|
||||||
echo:
|
echo:
|
||||||
echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted.
|
echo Your antivirus software might be blocking the script.
|
||||||
echo:
|
echo:
|
||||||
sc query sense | find /i "RUNNING" %nul% && (
|
sc query sense | find /i "RUNNING" %nul% && (
|
||||||
echo Installed Antivirus - Microsoft Defender for Endpoint
|
echo Installed Antivirus - Microsoft Defender for Endpoint
|
||||||
|
|
|
@ -222,7 +222,7 @@ goto dk_done
|
||||||
if exist "%Systemdrive%\Users\WDAGUtilityAccount" (
|
if exist "%Systemdrive%\Users\WDAGUtilityAccount" (
|
||||||
sc query gcs | find /i "RUNNING" %nul% && (
|
sc query gcs | find /i "RUNNING" %nul% && (
|
||||||
%eline%
|
%eline%
|
||||||
echo Windows Sandbox detected; activation is not required.
|
echo Windows Sandbox detected; activation is not supported.
|
||||||
echo The script cannot run due to missing licensing components. Aborting...
|
echo The script cannot run due to missing licensing components. Aborting...
|
||||||
echo:
|
echo:
|
||||||
goto dk_done
|
goto dk_done
|
||||||
|
@ -337,9 +337,25 @@ REM check Powershell core version
|
||||||
|
|
||||||
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && (
|
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && (
|
||||||
echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting...
|
echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting...
|
||||||
|
echo:
|
||||||
|
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||||
|
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||||
goto dk_done
|
goto dk_done
|
||||||
)
|
)
|
||||||
|
|
||||||
|
REM check if .NET is working properly
|
||||||
|
|
||||||
|
if /i "!tstresult2!"=="FullLanguage" (
|
||||||
|
cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul%
|
||||||
|
if !errorlevel!==3 (
|
||||||
|
echo Windows Powershell failed to load .NET command. Aborting...
|
||||||
|
echo:
|
||||||
|
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||||
|
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||||
|
goto dk_done
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
REM check for Mal-ware that may cause issues with Powershell
|
REM check for Mal-ware that may cause issues with Powershell
|
||||||
|
|
||||||
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
|
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
|
||||||
|
@ -357,7 +373,7 @@ echo PowerShell is not working properly. Aborting...
|
||||||
|
|
||||||
if /i "!tstresult2!"=="FullLanguage" (
|
if /i "!tstresult2!"=="FullLanguage" (
|
||||||
echo:
|
echo:
|
||||||
echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted.
|
echo Your antivirus software might be blocking the script.
|
||||||
echo:
|
echo:
|
||||||
sc query sense | find /i "RUNNING" %nul% && (
|
sc query sense | find /i "RUNNING" %nul% && (
|
||||||
echo Installed Antivirus - Microsoft Defender for Endpoint
|
echo Installed Antivirus - Microsoft Defender for Endpoint
|
||||||
|
|
|
@ -224,9 +224,25 @@ REM check Powershell core version
|
||||||
|
|
||||||
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && (
|
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && (
|
||||||
echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting...
|
echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting...
|
||||||
|
echo:
|
||||||
|
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||||
|
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||||
goto dk_done
|
goto dk_done
|
||||||
)
|
)
|
||||||
|
|
||||||
|
REM check if .NET is working properly
|
||||||
|
|
||||||
|
if /i "!tstresult2!"=="FullLanguage" (
|
||||||
|
cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul%
|
||||||
|
if !errorlevel!==3 (
|
||||||
|
echo Windows Powershell failed to load .NET command. Aborting...
|
||||||
|
echo:
|
||||||
|
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||||
|
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||||
|
goto dk_done
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
REM check for Mal-ware that may cause issues with Powershell
|
REM check for Mal-ware that may cause issues with Powershell
|
||||||
|
|
||||||
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
|
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
|
||||||
|
@ -244,7 +260,7 @@ echo PowerShell is not working properly. Aborting...
|
||||||
|
|
||||||
if /i "!tstresult2!"=="FullLanguage" (
|
if /i "!tstresult2!"=="FullLanguage" (
|
||||||
echo:
|
echo:
|
||||||
echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted.
|
echo Your antivirus software might be blocking the script.
|
||||||
echo:
|
echo:
|
||||||
sc query sense | find /i "RUNNING" %nul% && (
|
sc query sense | find /i "RUNNING" %nul% && (
|
||||||
echo Installed Antivirus - Microsoft Defender for Endpoint
|
echo Installed Antivirus - Microsoft Defender for Endpoint
|
||||||
|
|
|
@ -229,9 +229,25 @@ REM check Powershell core version
|
||||||
|
|
||||||
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && (
|
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && (
|
||||||
echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting...
|
echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting...
|
||||||
|
echo:
|
||||||
|
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||||
|
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||||
goto dk_done
|
goto dk_done
|
||||||
)
|
)
|
||||||
|
|
||||||
|
REM check if .NET is working properly
|
||||||
|
|
||||||
|
if /i "!tstresult2!"=="FullLanguage" (
|
||||||
|
cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul%
|
||||||
|
if !errorlevel!==3 (
|
||||||
|
echo Windows Powershell failed to load .NET command. Aborting...
|
||||||
|
echo:
|
||||||
|
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||||
|
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||||
|
goto dk_done
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
REM check for Mal-ware that may cause issues with Powershell
|
REM check for Mal-ware that may cause issues with Powershell
|
||||||
|
|
||||||
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
|
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
|
||||||
|
@ -249,7 +265,7 @@ echo PowerShell is not working properly. Aborting...
|
||||||
|
|
||||||
if /i "!tstresult2!"=="FullLanguage" (
|
if /i "!tstresult2!"=="FullLanguage" (
|
||||||
echo:
|
echo:
|
||||||
echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted.
|
echo Your antivirus software might be blocking the script.
|
||||||
echo:
|
echo:
|
||||||
sc query sense | find /i "RUNNING" %nul% && (
|
sc query sense | find /i "RUNNING" %nul% && (
|
||||||
echo Installed Antivirus - Microsoft Defender for Endpoint
|
echo Installed Antivirus - Microsoft Defender for Endpoint
|
||||||
|
|
|
@ -240,9 +240,25 @@ REM check Powershell core version
|
||||||
|
|
||||||
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && (
|
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && (
|
||||||
echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting...
|
echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting...
|
||||||
|
echo:
|
||||||
|
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||||
|
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||||
goto done2
|
goto done2
|
||||||
)
|
)
|
||||||
|
|
||||||
|
REM check if .NET is working properly
|
||||||
|
|
||||||
|
if /i "!tstresult2!"=="FullLanguage" (
|
||||||
|
cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul%
|
||||||
|
if !errorlevel!==3 (
|
||||||
|
echo Windows Powershell failed to load .NET command. Aborting...
|
||||||
|
echo:
|
||||||
|
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||||
|
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||||
|
goto done2
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
REM check for Mal-ware that may cause issues with Powershell
|
REM check for Mal-ware that may cause issues with Powershell
|
||||||
|
|
||||||
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
|
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
|
||||||
|
@ -260,7 +276,7 @@ echo PowerShell is not working properly. Aborting...
|
||||||
|
|
||||||
if /i "!tstresult2!"=="FullLanguage" (
|
if /i "!tstresult2!"=="FullLanguage" (
|
||||||
echo:
|
echo:
|
||||||
echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted.
|
echo Your antivirus software might be blocking the script.
|
||||||
echo:
|
echo:
|
||||||
sc query sense | find /i "RUNNING" %nul% && (
|
sc query sense | find /i "RUNNING" %nul% && (
|
||||||
echo Installed Antivirus - Microsoft Defender for Endpoint
|
echo Installed Antivirus - Microsoft Defender for Endpoint
|
||||||
|
|
|
@ -241,9 +241,25 @@ REM check Powershell core version
|
||||||
|
|
||||||
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && (
|
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && (
|
||||||
echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting...
|
echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting...
|
||||||
|
echo:
|
||||||
|
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||||
|
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||||
goto dk_done
|
goto dk_done
|
||||||
)
|
)
|
||||||
|
|
||||||
|
REM check if .NET is working properly
|
||||||
|
|
||||||
|
if /i "!tstresult2!"=="FullLanguage" (
|
||||||
|
cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul%
|
||||||
|
if !errorlevel!==3 (
|
||||||
|
echo Windows Powershell failed to load .NET command. Aborting...
|
||||||
|
echo:
|
||||||
|
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||||
|
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||||
|
goto dk_done
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
REM check for Mal-ware that may cause issues with Powershell
|
REM check for Mal-ware that may cause issues with Powershell
|
||||||
|
|
||||||
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
|
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
|
||||||
|
@ -261,7 +277,7 @@ echo PowerShell is not working properly. Aborting...
|
||||||
|
|
||||||
if /i "!tstresult2!"=="FullLanguage" (
|
if /i "!tstresult2!"=="FullLanguage" (
|
||||||
echo:
|
echo:
|
||||||
echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted.
|
echo Your antivirus software might be blocking the script.
|
||||||
echo:
|
echo:
|
||||||
sc query sense | find /i "RUNNING" %nul% && (
|
sc query sense | find /i "RUNNING" %nul% && (
|
||||||
echo Installed Antivirus - Microsoft Defender for Endpoint
|
echo Installed Antivirus - Microsoft Defender for Endpoint
|
||||||
|
|
Loading…
Add table
Reference in a new issue