Update README.md

This commit is contained in:
Ben Whitmore 2020-07-23 07:50:58 +01:00 committed by GitHub
parent e8f15c0603
commit 4aad364bd2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,12 +6,14 @@
http://byteben.com/bb/wp-content/uploads/2020/07/Content-Example.jpg http://byteben.com/bb/wp-content/uploads/2020/07/Content-Example.jpg
**Description** **Description**
Toast_Notify.ps1 is a simple Toast Notification script designed to be deployed as a package from MEMCM. The "Set and forget" mentality of packages works really well because we don't need to specify a detection method once the script has run. Toast_Notify.ps1 is a simple Toast Notification script designed to be deployed as a package from MEMCM. The "Set and forget" mentality of packages works really well because we don't need to specify a detection method once the script has run.
Toast_Notify.ps1 will read an XML file on a file share or from the same directory. If the XML is stored on a fileservr, theo Toast Notifications can be changed "on the fly" without having to repackage the script. Toast_Notify.ps1 will read an XML file on a file share or from the same directory. If the XML is stored on a fileservr, theo Toast Notifications can be changed "on the fly" without having to repackage the script.
To create a custom XML, copy CustomMessage.xml and edit the text you want to display in the toast notification. Place the modified XML in the script directory or on a fileserver. Call your custom file using one of the script parameters below. To create a custom XML, copy CustomMessage.xml and edit the text you want to display in the toast notification. Place the modified XML in the script directory or on a fileserver. Call your custom file using one of the script parameters below.
**Points to Consider** **Points to Consider**
I am using an existing app in Windows to call the Toasts. This script creates two buttons in the Toast, "Details" and "Dismiss". Cicking details is designed to take the user to an internal Service Desk announcement page. For that reason, **MSEdge** works really well because the Toast Action launches the browser in the foreground. Oh, you will need MSEdge installed on your client computers for this to work. I am using an existing app in Windows to call the Toasts. This script creates two buttons in the Toast, "Details" and "Dismiss". Cicking details is designed to take the user to an internal Service Desk announcement page. For that reason, **MSEdge** works really well because the Toast Action launches the browser in the foreground. Oh, you will need MSEdge installed on your client computers for this to work.
The following files should be present in the Script Directory when you create the package in MEMCM:- The following files should be present in the Script Directory when you create the package in MEMCM:-
@ -25,28 +27,36 @@ CustomMessage.xml**
You should specify either XMLScriptSourceDir **or** XMLOtherSource parameters but not both. If you specify no parameter the script will read the CustomMessage.xml in the script root. You should specify either XMLScriptSourceDir **or** XMLOtherSource parameters but not both. If you specify no parameter the script will read the CustomMessage.xml in the script root.
**.PARAMETER XMLScriptDirSource** **.PARAMETER XMLScriptDirSource**
Specify the name of the XML file to read. The XML file must exist in the same directory as Toast_Notify.ps1. If no parameter is passed, it is assumed the XML file is called CustomMessage.xml. Specify the name of the XML file to read. The XML file must exist in the same directory as Toast_Notify.ps1. If no parameter is passed, it is assumed the XML file is called CustomMessage.xml.
**.PARAMETER XMLOtherSource** **.PARAMETER XMLOtherSource**
Specify the location of the Custom XML file used for the Toast when it is not the same directory as Toast_Notify.ps1 e.g the full UNC path to the XML file. Specify the location of the Custom XML file used for the Toast when it is not the same directory as Toast_Notify.ps1 e.g the full UNC path to the XML file.
**.EXAMPLE** **.EXAMPLE**
Toast_Notify.ps1 -XMLOtherSource "\\\\fileserverhome\xml\CustomMessage.xml" Toast_Notify.ps1 -XMLOtherSource "\\\\fileserverhome\xml\CustomMessage.xml"
**.EXAMPLE** **.EXAMPLE**
Toast_Notify.ps1 -XMLSciptDirSource "PhoneSystemProblems.xml" Toast_Notify.ps1 -XMLSciptDirSource "PhoneSystemProblems.xml"
**.EXAMPLE** **.EXAMPLE**
Toast_Notify.ps1 Toast_Notify.ps1
**Known Issues** **Known Issues**
Currently, the images in the XML can only be read from the local file system. This is not an issue if we are deploying the package from MEMCM. Currently, the images in the XML can only be read from the local file system. This is not an issue if we are deploying the package from MEMCM.
**Thanks for the help from** **Thanks for the help from**
@guyrleech @guyrleech
@young_robbo @young_robbo
**Community** **Community**
Seriously check our Martin Bentsson's work on Toasts. It is very comprehensive. https://www.imab.dk/windows-10-toast-notification-script/ Seriously check our Martin Bentsson's work on Toasts. It is very comprehensive. https://www.imab.dk/windows-10-toast-notification-script/
I challenged myself to learn how Windows Toasts work so this was a labour of love for me. I have enjoyed the ride so far I challenged myself to learn how Windows Toasts work so this was a labour of love for me. I have enjoyed the ride so far