Show-ADTInstallationPrompt

Displays a message window with any title, message and various optional buttons in the style of ADT branding.

In the options you set the position and behavior of the window, define the alignment of the displayed text and the desired buttons and their texts. The value of the pressed button is stored in a variable if required.

This command maps the 'Show-InstallationPrompt' function from the PowerShell App Deployment Toolkit.


Settings:

  • Title
    Text that will be displayed in the title bar of the message window. If no title is specified, the name of the package is used. If you want to display a message without a title text, enter a space here.
  • Message
    Text that will be displayed in the message window. You can format the text with line breaks.
  • Show as Topmost window
    Defines that the message window always remains in the foreground and is thus visible throughout, regardless of other open windows.
  • Keep position
    Defines whether the position of the message window is reset to the center of the screen after a defined time has elapsed. The interval can be customized in the AppDeployToolkitConfig.xml file in the <InstallationPrompt_PersistInterval> element. The default value is 60 seconds.
  • Do not wait for response
    If the option is enabled, there will be no wait for a return from the message window. The script execution will continue directly.
  • Minimize windows
    Specifies whether other windows should be minimized when the message is displayed.
  • Terminate script (seconds)
    Defines after how many seconds the execution of the script should be terminated. If this option is not activated, the value specified in the AppDeployToolkitConfig.xml in the <InstallationUI_Timeout> element is used. The default value is 6900 seconds. (1 hour and 55 minutes).
  • Message alignment
    Sets the alignment of the message text. The following options are available:
    • Left
    • Center (default option)
    • Right
  • Icon
    Determines if and if so, which icon is displayed in the notification. The following options are available:
    • Application
    • Exclamation        
    • Error
    • Question
    • Hand
    • Information
    • None (default option)
    • Shield
    • Asterisk
    • Warning
    • WinLogo
  • Button texts
    Determines which buttons are displayed and defines their labels. The following buttons can be enabled:
    • Left
    • Middle
    • Right
  • Return variable
    Optional - name of a variable containing the value of the pressed button. The value corresponds to the button text of the pressed button. Specify only the variable name, not the $ sign and curly braces.


Example:

The following example creates a message window to ask the user for the desired time for a restart after a successful system update. The user's selection is stored in the _Returncode variable for further use.


Corresponds to ADT function:


See also: