If this is called during a shutdown then exception code 1115 is throw.
This commit is contained in:
parent
2a444198f2
commit
820d80852c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue