If this is called during a shutdown then exception code 1115 is throw.

This commit is contained in:
Taliesin Sisson 2017-08-10 11:14:52 +01:00
parent 2a444198f2
commit 820d80852c
1 changed files with 5 additions and 0 deletions

View File

@ -32,6 +32,11 @@ if (ShuttingDown) {
exit 2
}
if ($LASTEXITCODE -eq 1115) {
# A system shutdown is in progress
exit 2
}
# Remove the pending reboot we just created above
if ($LASTEXITCODE -eq 0) {
. shutdown.exe -a