PSADT.ToastNotification
Extension for PowerShell App Deployment Toolkit that replace all the windows and dialogs with Toast Notifications with a lot of visual and functional improvements.
Install / Use
/learn @LFM8787/PSADT.ToastNotificationREADME
PSADT.ToastNotification
Extension for PowerShell App Deployment Toolkit that replaces all the windows and dialogs with Toast Notifications with a lot of visual and functional improvements.
Features
- Administrator rights not needed.
- Wraps the original functions, so no script modification needed.
- SYSTEM raised Toast Notifications can interact with logged in no Administrator user.
- Ability to interact with the notifications using events or protocols.
- Can search for closing apps using wildcards.
- Can search for closing apps based on windows title or process path using wildcards.
- Added array of never kill applications (even if added for closing).
- Added array of never block applications (they can be killed but not blocked).
- Limit functions timeout to InstallationUITimeout.
- Ability to use MUI cache applications name if exists.
- Highly customizable Toast Notification visual schemes.
- Dynamically update running applications with icons and extended applications information.
- Fallback to original Windows Forms and dialogs if any error occurs.
- New dedicated strings with multilanguage support.
- Automatically translates compatible buttons in functions.
Disclaimer
- Test the functions before production.
- Make a backup before applying.
- Check the config file options description.
- Run AppDeployToolkitHelp.ps1 for more help and parameter descriptions.
Functions (wrappers) and improvements
Show-InstallationWelcome
-
Now you can search for processes using
likeoperator. If you include any wildcard character, the evaluating operator will be-likeinstead of-eq. The search objectAcroRd*=Adobe Acrobat Readermatches 32/64 bits version of the application, only currently running processes will be added to the$ProcessObjects. See about Comparison Operators - PowerShell | Microsoft Learn. -
For windows title search use
title:...as prefix, if any process window validates the filter it will be added to the$ProcessObjects. Wildcards supported,title:*Adobe*will add any process that is currently running and the title is like*Adobe*. Notitle:...=Application Namesupported. See about Comparison Operators - PowerShell | Microsoft Learn. -
For process path search use
path:...as prefix, all the currently running processes validating the filter will be added to the$ProcessObjects. Wildcards supported,path:$($env:ProgramFiles)\*Office*\*will add any process that is currently running and the path is like$($env:ProgramFiles)\*Office*\*. Nopath:...=Application Namesupported. See about Comparison Operators - PowerShell | Microsoft Learn. -
The closing applications evaluation removes processes that are included in
CriticalProcesses_NeverKill, they won`t be added and a warning appears in console/log:
-
Internal function mechanism is kept for backward compatibility but, if the switch
-PersistPromptis not present, the user can dismiss or close the notification and aTimeoutresult is returned. -
If the
-BlockExecutionswitch is used, any process included inCriticalProcesses_NeverBlockwon`t be added for blocking and a warning appears in console/log:
https://user-images.githubusercontent.com/13755139/218114492-0945ccb6-7de3-4f07-a6b0-2b37b311759a.mp4
</td> <td width="33%">https://user-images.githubusercontent.com/13755139/218115748-3537e7db-c9d9-4138-813c-102d3c8ce890.mp4
</td> <td width="33%">https://user-images.githubusercontent.com/13755139/218121541-5cbe46ca-c5eb-44bf-8095-9fdeb56d1f15.mp4
</td> </tr> </table>Show-BalloonTip
-
Shows a long duration Toast Notification if the
$BalloonTipTimeis greater than10000ms. -
No need to call any external script, the Toast Notification always shows itself like if
$NoWaitwas$true. -
For more options see the Customizable visual style section.
![]()
![]()
![]()
Show-DialogBox
-
The buttons get the translated string using the Data Extraction Extension to match the user language, the
InstallationUI_LanguageOverrideis omitted like original dialog box. -
If the
$Timeoutis bigger than$configInstalltionUITimeoutyou can useLimitTimeoutToInstallationUIconfig option to limit the timeout. -
You can use
ShowAttributionTextconfig option to show a subtle text indicating the auto-dismiss timeout. -
For more options see the Customizable visual style section.
https://user-images.githubusercontent.com/13755139/218116614-dd4f3270-ae05-4b53-9722-4359cd265871.mp4
</td> <td width="50%">![]()
Show-InstallationRestartPrompt
-
The shutdown command calls
shutdown.exe /r /f /t $SilentCountdownSecondsinstead ofRestart-Computersince sometimes the cmdlet does not work. -
Ability to show a warning icon by using
InstallationRestartPrompt_ShowIconconfig option. -
You can use
ShowAttributionTextconfig option to show a subtle text indicating the auto-restart timeout. -
If the parameter
$NoCountdownis$falsethe Toast Notification will show a progress bar with the timeout to auto-restart. -
Closing or dismissing the Toast Notification works like the
Minimizebutton. -
For more options see the Customizable visual style section.
https://user-images.githubusercontent.com/13755139/218117049-cf1282e1-883b-4276-a776-d3ebf6e7634b.mp4
</td> <td width="50%">https://user-images.githubusercontent.com/13755139/218116985-35b297ae-59a4-4300-853a-5995a21b539e.mp4
</td> </tr> </table>Show-InstallationPrompt
-
If the
$Timeoutis bigger than$configInstalltionUITimeoutyou can useLimitTimeoutToInstallationUIconfig option to limit the timeout. -
Asynchronously behavior maintained like original function.
-
You can use
ShowAttributionTextto show a subtle text indicating the auto-dismiss timeout. -
For more options see the Customizable visual style section.
https://user-images.githubusercontent.com/13755139/218117363-970e5911-d05c-42a3-af80-2576c2e273cb.mp4
</td> <td width="50%">https://user-images.githubusercontent.com/13755139/218117418-fca32b08-f578-422e-84e9-f1c56faeca38.mp4
</td> </tr> </table>Show-InstallationProgress
-
Defines the new variable
InstallationProgressFunctionCalledthat works like a switch indicating thatClose-InstallationProgressshould be called. -
You can use
ShowAttributionTextconfig option to show a subtle text indicating the deployment progress message. -
You can use
InstallationProgress_ShowIndeterminateProgressBarconfig option to show an indeterminate progress bar. -
For more options see the Customizable visual style section.
https://user-images.githubusercontent.com/13755139/218117746-49951415-f223-4f23-b874-99bcd6ea8b1a.mp4
</td> <td>https://user-images.githubusercontent.com/13755139/218117926-47b6bd79-f69c-4b2e-a162-f3dd8b1f596e.mp4
</td> </tr> <tr> <td>https://user-images.githubusercontent.com/13755139/218118541-446c5c0a-9de7-4d84-9137-e19a1dba1ae4.mp4
</td> </tr> </table>Internal functions (wrappers) and improvements
Get-RunningProcesses
-
The function has changed, now it receives a
[PSCustomObject[]]as input, backward compatibility kept. -
If any
CriticalProcesses_NeverKillmatches any process name or filters, it won`t be added and a warning appears in console/log:
-
The output object array contains the process name, description, path and company.
Show-WelcomePrompt
-
If you do not like the Continue button string like me, you can use
WelcomePrompt_ReplaceContinueButtonDeploymentTypeand now the text will show the translated strings ofInstall,RepairorUninstallbased on the deployment type of the script. -
