PADT – User Interface

With PowerShell Application Deployment Toolkit, it is possible to use a user interface (GUI).

The “Installation Prompt” displays a window with a button allowing the user to launch himself the installation and a countdown to enforce the installation after timeout.

The “Installation Welcome” displays a window informing the user that some applications must be closed before proceeding to the installation. These applications will be blocked during all the installation process to avoid the user to launch them during installation.

The “Installation Progress” displays a screen during the installation process (“Installation in progress…)

The final “Installation Prompt” informs the installation process is completed.

 

##*===============================================
##* PRE-INSTALLATION
##*===============================================
[string]$installPhase = 'Pre-Installation'

## Set the current time + 1 hour
$COUNTDOWN_TIME = Get-Date
$COUNTDOWN_TIME = $COUNTDOWN_TIME.AddHours(1)
$COUNTDOWN_TIME = $COUNTDOWN_TIME.ToShortTimeString()

## Show Welcome Message
Show-InstallationPrompt -Title 'Flash Player Update' -Message "SECURITY UPDATE `n`n A Flash Player security update is required on your computer. `n`n Your Internet browser will be closed when the installation starts. `n`n Please click OK to launch the update, otherwise it will be automatically started in 1 hour, at $COUNTDOWN_TIME. `n`n No reboot will be required." -ButtonRightText 'OK' -Timeout 3600 -ExitOnTimeout $false -Icon Information

## Show CloseApp Message, close Internet Explorer, Firefox and Chrome if necessary and avoid to launch them during installation
Show-InstallationWelcome -CloseApps 'iexplore,firefox,chrome' -PersistPrompt -BlockExecution -MinimizeWindows $false -ForceCloseAppsCountdown 600

## Show Progress Message (with the default message)
Show-InstallationProgress 




##*===============================================
##* INSTALLATION 
##*===============================================
[string]$installPhase = 'Installation' 




##*===============================================
##* POST-INSTALLATION
##*===============================================
[string]$installPhase = 'Post-Installation'
 
 
## Display a message at the end of the install
Show-InstallationPrompt -Message "Installation completed." -ButtonRightText 'OK' -Icon Information -NoWait 

 

To bypass the GUI, launch the exe using the following command:

“Deploy-Application.exe” -Deploymode “NonInteractive”