From 1849dd307500503bd5447daa13c5693017522b3d Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Thu, 31 Oct 2024 06:00:02 +0530 Subject: Show 3rd party AV list when Powershell check fails --- MAS/Separate-Files-Version/Change_Windows_Edition.cmd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'MAS/Separate-Files-Version/Change_Windows_Edition.cmd') diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd index e34a61c..9e6287b 100644 --- a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd @@ -177,7 +177,8 @@ 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. -call :dk_color %Blue% "Check if your antivirus is blocking the script." +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" -- cgit v1.2.3