launch exe better

This commit is contained in:
2024-04-22 12:44:11 -04:00
parent 20cefe10b6
commit af90aba365
+3 -1
View File
@@ -22,7 +22,9 @@ Catch { Write-Error "ERROR: could not configure reboot into normal mode" ; Retur
# Configure reboot into Safe Mode with Networking # Configure reboot into Safe Mode with Networking
Write-Output "Configuring system to reboot into Safe Mode with Networking" Write-Output "Configuring system to reboot into Safe Mode with Networking"
Try { "%SystemRoot%\System32\bcdedit.exe" /set {default} safeboot network } $command = "${Env:SystemRoot}\System32\bcdedit.exe"
$params = "/set {default} safeboot network".Split(" ")
Try { & "${command}" $params }
Catch { Write-Error "ERROR: could not configure reboot into safe mode with networking" ; Return } Catch { Write-Error "ERROR: could not configure reboot into safe mode with networking" ; Return }
# Reboot into Safe Mode with Networking # Reboot into Safe Mode with Networking