Check if cmd.exe is working

This commit is contained in:
WindowsAddict 2025-02-02 20:15:17 +05:30
parent 8c960a8ea7
commit 5586db326b

View File

@ -77,6 +77,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