Skip to content

Commit fc87ed2

Browse files
committed
Ensure DialogExpiryDuration is never less than a specified countdown.
Fixes PSAppDeployToolkit#2222.
1 parent 4fe4625 commit fc87ed2

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/PSAppDeployToolkit/Public/Show-ADTInstallationWelcome.ps1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,6 +1127,10 @@ function Show-ADTInstallationWelcome
11271127
if ($CloseProcessesCountdown -gt 0)
11281128
{
11291129
$dialogOptions.Add('CountdownDuration', [System.TimeSpan]::FromSeconds($CloseProcessesCountdown))
1130+
if ($CloseProcessesCountdown -ge $adtConfig.UI.DefaultTimeout)
1131+
{
1132+
$dialogOptions.DialogExpiryDuration = [System.TimeSpan]::FromSeconds($CloseProcessesCountdown + 60)
1133+
}
11301134
}
11311135
}
11321136
if ($PersistPrompt)
@@ -1136,6 +1140,10 @@ function Show-ADTInstallationWelcome
11361140
if (($PSBoundParameters.ContainsKey('ForceCloseProcessesCountdown') -or $PSBoundParameters.ContainsKey('ForceCountdown')) -and !$dialogOptions.ContainsKey('CountdownDuration'))
11371141
{
11381142
$dialogOptions.Add('CountdownDuration', [System.TimeSpan]::FromSeconds($CloseProcessesCountdown))
1143+
if ($CloseProcessesCountdown -ge $adtConfig.UI.DefaultTimeout)
1144+
{
1145+
$dialogOptions.DialogExpiryDuration = [System.TimeSpan]::FromSeconds($CloseProcessesCountdown + 60)
1146+
}
11391147
}
11401148
if ($HideCloseButton -and ($AllowDefer -or !$dialogOptions.ContainsKey('CountdownDuration')))
11411149
{

0 commit comments

Comments
 (0)