diff options
| author | WindowsAddict | 2025-08-03 20:35:13 +0000 |
|---|---|---|
| committer | WindowsAddict | 2025-08-03 20:35:13 +0000 |
| commit | 904e96d748045bec1c3f5bb4eba2373b47be5777 (patch) | |
| tree | beb30a20a021e570157d1a739464f075be0b5688 /MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd | |
| parent | 5e2cc4f5cf79d55f0302bffdb439544480b24d88 (diff) | |
| download | Microsoft-Activation-Scripts-904e96d748045bec1c3f5bb4eba2373b47be5777.zip | |
Check .NET corruption
Diffstat (limited to 'MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd')
| -rw-r--r-- | MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 25bd54a..fa782c2 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -207,7 +207,7 @@ goto dk_done if exist "%Systemdrive%\Users\WDAGUtilityAccount" (
sc query gcs | find /i "RUNNING" %nul% && (
%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:
goto dk_done
@@ -310,8 +310,24 @@ REM check Powershell core version cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && (
echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting...
+echo:
+set fixes=%fixes% %mas%in-place_repair_upgrade
+call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
+goto dk_done
+)
+
+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
@@ -330,7 +346,7 @@ echo PowerShell is not working properly. Aborting... if /i "!tstresult2!"=="FullLanguage" (
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:
sc query sense | find /i "RUNNING" %nul% && (
echo Installed Antivirus - Microsoft Defender for Endpoint
|
