diff options
Diffstat (limited to 'get')
| -rw-r--r-- | get | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -27,7 +27,9 @@ $prefix = "@::: $rand `r`n" $content = $prefix + $response
Set-Content -Path $FilePath -Value $content
-Start-Process $FilePath $ScriptArgs -Wait
+# Set ComSpec variable for current session in case its corrupt in the system
+$env:ComSpec = "$env:SystemRoot\system32\cmd.exe"
+Start-Process cmd.exe "/c """"$FilePath"" $ScriptArgs""" -Wait
$FilePaths = @("$env:TEMP\MAS*.cmd", "$env:SystemRoot\Temp\MAS*.cmd")
foreach ($FilePath in $FilePaths) { Get-Item $FilePath | Remove-Item }
|
