Update New-ToastNotification.ps1

Reboot button action do not install updates pending reboot.

See https://github.com/imabdk/Toast-Notification-Script/issues/30
This commit is contained in:
kheldorn 2022-04-07 16:09:22 +02:00 committed by GitHub
parent 9064a66938
commit e0c1f9329d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -946,7 +946,7 @@ exit 0
}
try {
$GetCustomScriptPath = $PathInfo.FullName
[String]$Script = 'shutdown /r /t 0 /d p:0:0 /c "Toast Notification Reboot"'
[String]$Script = 'USOClient.exe RestartDevice ResumeUpdate && shutdown.exe /r /t 0 /d p:0:0 /c "Toast Notification Reboot"'
if (-NOT[string]::IsNullOrEmpty($Script)) {
Out-File -FilePath $GetCustomScriptPath -InputObject $Script -Encoding ASCII -Force
}