You could edit the function in AppDeployToolkitMain.ps1 but it might not work.
In the Show-WelcomePrompt
function, when the timer runs out it clicks the [Continue] button itself using $buttonContinue.PerformClick()
:
## If the countdown is complete, close the application(s) or continue
If ($countdownTime -le $currentTime) {
If ($forceCountdown -eq $true) {
Write-Log -Message 'Countdown timer has elapsed. Force continue.' -Source ${CmdletName}
$buttonContinue.PerformClick()
}
Else {
Write-Log -Message 'Close application(s) countdown timer has elapsed. Force closing application(s).' -Source ${CmdletName}
If ($buttonCloseApps.CanFocus) { $buttonCloseApps.PerformClick() }
Else { $buttonContinue.PerformClick() }
}
}
Else {
# Update the form
$labelCountdown.Text = [string]::Format('{0}:{1:d2}:{2:d2}', $remainingTime.Days * 24 + $remainingTime.Hours, $remainingTime.Minutes, $remainingTime.Seconds)
}
you could try to hide it and hope it can still click it by adding this to the ## Button Continue
section:
$buttonContinue.Visibility = 'hidden'
If that doesn’t let the timeout work, you could change the colors of the [Continue] button to match that of $formWelcome
and hope the users don’t figure out the deception.