Windows 10 Toast Notification Script Update: Run ConfigMgr Software Updates directly from the action button

Introduction

It’s here! The new and delicious version of my Windows 10 Toast Notification Script. The script is now being on version 2.0.0.

  • First off, a huge thank you to Chad Brower for his incredible contributions to this new version. Most of the new functionality here, is a direct incorporation of Chad’s work (yet I end up spending 20 hours+ on deciphering and rewriting code, testing functionality, writing blog and updating documentation. I learned a ton!). πŸ™‚

This new version, obviously brings the option to run Software (Feature) Updates directly from the action button in the toast notification, but also removes the need to manually, and outside of the script, to create the custom protocols and scripts (those enabling you, to run anything custom from the toast notification action button).

Find all the nifty details down below.

What’s New

** Most of the work done in version 2.0.0 is done by Chad Brower // @Brower_Cha on Twitter.

I have added the additional protocols/scripts and rewritten some minor things, as well as added support for dynamic deadline retrieval for software updates. Stuff has been rewritten to suit my understanding and thoughts of the script. **

  • 2.0.0 – Huge changes to how this script handles custom protocols
    • Added Support for Custom Actions/Protocols within the script under user context removing the need for that to be run under SYSTEM/ADMIN
      • <Option Name=”Action” Value=”ToastRunUpdateID:” />
      • <Option Name=”Action” Value=”ToastRunPackageID:” />
      • <Option Name=”Action” Value=”ToastRunApplicationID:” />
      • <Option Name=”Action” Value=”ToastReboot:” />
    • Added Support to dynamically create Custom Action Scripts to support Custom Protocols
    • Added Support for Software (Feature) Updates : Searches for an update and will store in variable
    • Added new XML Types for Software Updates:
      • <Option Name=”RunUpdateID” Enabled=”True” Value=”3012973″ />
      • <Option Name=”RunUpdateTitle” Enabled=”True” Value=”Version 1909″ />
    • Added support for getting deadline date/time dynamically for software updates
      • Configure DynamicDeadline with the UpdateID

Config.xml

The config.xml files comes with 3 new options:

  • RunUpdateID
  • RunUpdateTitle
  • CreateScriptsAndProtocols

RunUpdateID and RunUpdateTitle

To enable the script to run Software Updates directly from the action button, configure RunUpdateID to Enabled=”True” and specify the relevant KB-Article ID(without the KB) in the Value field: Value=”4561600″.

You can go into more detail and configure RunUpdateTitle to Enabled=”True” and specify parts of the title of the update. This is to cater for, if several updates within the same KB-article is deployed to the device.

You can find both the Article ID and the Title from within the Configuration Manager console:

CreateScriptsAndProtocols

This new option is indeed huge, and will ease the pain in creating custom scripts and protocols, when using the Toast Notification Script with some of the built-in features. However, if you want the toast notification to do something entirely different, you will still need to create those yourself.

If you want the script to create the scripts and protocols for you, simply configure CreateScriptsAndProtocols to Enabled=”True”.

NOTE: I made this optional via the config.xml intentional. One might find the creation of scripts and protocols too intrusive and perhaps have the scripts/protocols created by other means.

Protocols

Scripts

DynamicDeadline

This option is not new, but instead it has been updated to support getting deadline details for Software (Feature) Updates.

To use this option with Software Updates, configure DynamicDeadline to Enabled=”True” and configure the Value to the Article ID of the software update in question.

<Option Name=”DynamicDeadline” Enabled=”True” Value=”4561600” />

Documentation

Lo’ and behold. I have updated the documentation for the Windows 10 Toast Notification Script. A new revision is included in the download below.

At the time of writing, I’m not sure if I miss out on any important details. If I do, please drop a comment on https://www.imab.dk/windows-10-toast-notification-script/.

Download

Again, the script has moved away from TechNet Gallery intoΒ 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.

ENJOY ?

17 thoughts on “Windows 10 Toast Notification Script Update: Run ConfigMgr Software Updates directly from the action button”

  1. I first want to say this is fantastic and will help me roll out the feature updates.
    Is there something I’m missing to stop the toast notification to display after a application is installed? For example: I have O365 Apps deployed to a user collection along with the toast notification package. Everything works but after O365 is installed the notification will still show up on the user device unless someone manually monitors the collection to remove said user.

    Reply
    • Hi Nick, I received your email. I’m not sure when deploying to users like that. The script and configmgr is just doing what you’re telling it to do. If you run the script on a schedule, everyday, the members of your collection will get the toast notification everyday. It’s not really related to the script or configmgr. I would really stick to deploying this to device collections, as you have a chance to move devices in and out, based on hardware inventory.

      Reply
  2. Hi Martin,

    Excellent write up!!! amazed by these ideas of doing something which i was never aware of..
    I need help in applying….
    GOAL:
    I’m trying to create a toast message to users and display whenever a patch is released and ask the user to click the ok button to take the user to software center -updates
    Completed: edited the XML file and pics to match my env and its working fine locally
    Issue: we are in MECM 2002(2006). I want to run this as a script option(new in 2006) with PowerShell and want to run against collections. Tried so many things, and now not sure how to achieve the same.
    Should i copy the folder to user locations & call this .ps1? also how to achieve this…now in the verge of giving up with this toast idea. Please help

    Reply
    • Hey, I’m kinda confused by your ConfigMgr versions. Are you running the script from Intune in a tenant attached scenario? Either way, the script feature in ConfigMgr runs in SYSTEM context. That doesn’t work with the toast notification script. It needs the current user’s context. So your option is to stick with a package/program as documented in the docs or somehow get into invoking the current user’s context coming from system (it is possible, but I haven’t had the need) πŸ™‚

      Reply
  3. Hi Martin,

    Thank you for your swift reply. Sorry for the confusion. Version is 2006.No Intune or any tenant is attached.
    I was pushing the script in system context it seems.Let me try with the package option and get back to you.
    Once again thank you for your great support!!!

    Reply
  4. Also,can you please point exactly to your articles where you mentioned about orhow to package this..(Like a step by step).
    Am a noob in sccm but would really love to understand how this works..because it will solve a lot of problems for us if we are sending notifications to user. Am failing in the configmgr packaging area.

    Reply
    • I’m sorry, I don’t explain in detail how a package and program is created. There’s not much to it, right click in the console, point to source files, create a program (that I mention in the docs), distribute content and deploy the program running the toast notification as the logged on user πŸ™‚

      Reply
      • Thanks Martin…I tried so many ways…Didn’t work as i expected. I might be missing something.
        So Finally I pushed the files via GPO to all users PC and then i created a scheduled task to run the script executing from that folder!!!
        It looks awesome and got many more requests from different departments to execute such notifications for users!!

        Thank you Once again!!!!!

        Reply
  5. Is there a way to move the Snooze dropdown box so it’s not on top of action button?
    I got a user trying to snooze it for 8 hours, which is on the top of Upgrade and accidentally clicked twice, which triggered the upgrade πŸ™‚

    Reply
  6. Hi Martin, I have a question again :), using your script for an IPU and my question is, if a user clicks on the dismiss button, I cant find the setting to make this popup says every 2 hours or so to the end users until they press the upgrade button as I have named it, can this be controlled through client settings or? thanks Robert

    Reply
    • Right. If you want the toast notification to pop up every 2 hours, you configure the program in ConfigMgr to run every 2 hours. Now, once the device has upgraded to the targeted OS (defined in the config.xml), the toast notification will not show. Also, I’m personally deploying the toast notification to a collection only consisting of the devices I really want the toast notification. When the device has upgraded, it moves out of the collection where the toast notification is deployed to run every 2 hours.

      Reply
      • Awesome, I did that already with the deployment schedule :).. I will query the device collection so once its upgraded successfully, it removes the device from the collection, happy days thanks again

        Reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.