It’s been a while since the last update on this script. I admit that. Better late than never, I guess.
This update brings a slight improvement to the looks of the toast notifications, and (almost) definitely removes the option for the end-user to disable the notifications as well.
Also, I was wondering about naming the script differently. The script surely works with Windows 11 too, but seeing the entire toast framework was introduced with Windows 10, and Windows 11 behind the scenes is still appearing as version 10.0, I will stick with the current name.
- 2.3.0 – Added the Register-CustomNotificationApp function
- – This function retrieves the value of the CustomNotificationApp option from the config.xml
- – The function then uses this name, to create a custom app for doing the notification.
- – This will reflect in the shown toast notification, instead of Software Center or PowerShell
- – This also creates the custom notifcation app with a prevention from disabling the toast notifications via the UI
The addition of the new option to create a custom notification app, requires you to update your existing config.xml files. The changes to the config.xml file is highlighted below, and the results are shown in the picture above.
The magic lies within this function in the script. Bits and pieces are borrowed from Mr. Trevor Jones @ https://smsagent.blog.
What I do differently, is to write the details into HKCU, so the script – once running in user context – is able to write to the relevant area of registry.
I also add an icon to the notification app, which in this scenario is a small cogwheel. See the header-image for the exact illustration.
Prevention of disabling Toast Notifications
The (almost) definitely prevention from disabling the toast notifications, comes from the ‘ShowInSettings’ DWORD value in registry. Almost because this is written to HKCU, and users with knowledge of registry, can obviously modify this themselves.
This is the area of registry, which the script creates automatically for you, based on the content of the config.xml.
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.