A new version of the Windows 10 Toast Notification Script is here. The script is now being on version 2.2.0.
This version brings the option to run the script and thus display toast notifications coming from SYSTEM context.
A requirement has been so far, that the script is being run with the logged on user’s credentials. This is still recommended, but for scenarios where this is not possible, like running this with a task sequence (task sequences always run as local system), this new ability will give you the option to display toast notification for the logged on user, even if coming from local system context.
The work done here, with running the script under SYSTEM, is entirely done by Andrew. Thank you!
Also, with a built-in prevention of having multiple toast notifications being displayed in a row, the script is now also better at handling the re-run behavior in ConfigMgr. Having multiple toast notification displayed in a row, is something that can happen, if a device misses a deployment schedule. The nature of ConfigMgr is to catch up on the missed schedule, and this can lead to multiple toast notifications being displayed.
- 2.2.0 – Added built-in prevention of having multiple toast notifications to be displayed in a row
- – This is something that can happen, if a device misses a schedule in ConfigMgr
- – The nature of ConfigMgr is to catch up on the missed schedule, and this can lead to multiple toast notifications being displayed
- Added the ability to run the script coming from SYSTEM context
- – This has proven to only work with packages/programs/task sequences and when testing with psexec
- – Running the script in SYSTEM, with the script feature in configmgr and proactive remediations in Intune, still yields unexpected results
The config.xml files comes with 1 new option. In order for you to take advantages of this new ability, updating your config.xml files is therefore required:
- <Option Name=”LimitToastToRunEveryMinutes” Enabled=”True” Value=”5″ />
Enabling LimitToastToRunEveryMinutes and configuring the value (in minutes), prevents the toast notification from being displayed again within the configured time.
This option is created, in order to prevent multiple toast notifications of the same appearance, from being displayed in a row.
When invoking the script with psexec as SYSTEM, the log file moves into a new directory in: C:\Windows\System32\config\systemprofile\AppData\Roaming\ToastNotificationScript
The log file now indicates when coming from SYSTEM as well as indicates if the script has run too recently. See below illustration:
Download everything from GitHub here: https://github.com/imabdk/Toast-Notification-Script
If any questions, please leave them down below and I am happy to assist with any issues.