File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Sources/Winget-AutoUpdate Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -358,8 +358,8 @@ if (Test-Network) {
358358 $rebootDelay = 60
359359 Write-ToLog " Reboot delay adjusted to minimum 60 seconds" " Yellow"
360360 }
361-
362- $shutdownMessage = if ($ModsResult.Message ) { $ModsResult.Message } else { " WAU Mods requested a system reboot" }
361+
362+ $shutdownMessage = if ($ModsResult.Message ) { $ModsResult.Message } else { " WAU Mods requested a system reboot in $rebootDelay seconds " }
363363 & shutdown / r / t $rebootDelay / c $shutdownMessage
364364 Write-ToLog " System restart scheduled in $rebootDelay seconds" " Yellow"
365365 $exitCode = if ($ModsResult.ExitCode ) { $ModsResult.ExitCode } else { 3010 } # Default to "Restart required"
Original file line number Diff line number Diff line change 2727 - "Continue" : Continue with normal WAU execution (default behavior)
2828 - "Abort" : Abort WAU execution completely
2929 - "Rerun" : Re-run WAU (equivalent to legacy exit code 1)
30- - "Reboot" : Restart the system immediately
30+ - "Reboot" : Restart the system with delay and notification to end user
3131
3232 Available LogLevels:
3333 - "White" : Default/normal message
6464 # Example 3: Request reboot after checks
6565 $result = @{
6666 Action = "Reboot"
67- Message = "System requires restart before updates"
67+ Message = "The system needs to reboot within 5 minutes`nbefore WAU updates can be performed. "
6868 LogLevel = "Red"
6969 ExitCode = 3010
7070 RebootDelay = 300 # Optional: Delay before rebooting (default is 300 seconds)
You can’t perform that action at this time.
0 commit comments