From fde9ff93b332bf0ba2358e660e6abd64fb1edfde Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sun, 2 Feb 2025 20:15:26 +0530 Subject: [PATCH] Check if cmd.exe is working --- index.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/index.html b/index.html index 283c1f1..4f71b54 100644 --- a/index.html +++ b/index.html @@ -72,6 +72,10 @@ Set-Content -Path $FilePath -Value "@::: $rand `r`n$response" CheckFile $FilePath $env:ComSpec = "$env:SystemRoot\system32\cmd.exe" +$chkcmd = & $env:ComSpec /c "echo CMD is working" +if ($chkcmd -notcontains "CMD is working") { + Write-Warning "cmd.exe is not working.`nReport this issue at https://massgrave.dev/troubleshoot" +} Start-Process -FilePath $env:ComSpec -ArgumentList "/c """"$FilePath"" $args""" -Wait CheckFile $FilePath