From aed254b96bb1c64076f8ac36ae4d9fd1b34cf3be Mon Sep 17 00:00:00 2001 From: Ben Whitmore <44303264+byteben@users.noreply.github.com> Date: Wed, 22 Jul 2020 16:44:32 +0100 Subject: [PATCH 01/10] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c26f4fb..a874fda 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ http://byteben.com/bb/wp-content/uploads/2020/07/Toast-Example.jpg http://byteben.com/bb/wp-content/uploads/2020/07/Content-Example.jpg -Toast_Notify.ps1 is a simple Toast Notification script designed to be deployed as a package from MEMCM. +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 so Toast Notifications can be changed "on the fly" without having to repackage. To create a custom XML, copy CustomMessage.xml and edit the text you want to display in the toast notification. Reference that file using one of the script parameters. From 7fe5a09cf7a8a8827ae2bb8b314ace1fab423713 Mon Sep 17 00:00:00 2001 From: Ben Whitmore <44303264+byteben@users.noreply.github.com> Date: Wed, 22 Jul 2020 18:26:32 +0100 Subject: [PATCH 02/10] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a874fda..7d7ed90 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Specify the name of the XML file to read. The XML file must exist in the same di Specify the location of the Custom XML file used for the Toast when it is not in the MEMCM package **.EXAMPLE** -Toast_Notify.ps1 -XMLOtherSource "\\fileserverhome\xml\CustomMessage.xml" +Toast_Notify.ps1 -XMLOtherSource "\\\\fileserverhome\xml\CustomMessage.xml" **.EXAMPLE** Toast_Notify.ps1 -XMLSciptDirSource "PhoneSystemProblems.xml" From e8f15c0603394db872dff887b234e0b93347c6f2 Mon Sep 17 00:00:00 2001 From: Ben Whitmore <44303264+byteben@users.noreply.github.com> Date: Wed, 22 Jul 2020 18:31:30 +0100 Subject: [PATCH 03/10] Update README.md --- README.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7d7ed90..9fb3892 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,15 @@ # Toast + +**Screenshots** http://byteben.com/bb/wp-content/uploads/2020/07/Toast-Example.jpg http://byteben.com/bb/wp-content/uploads/2020/07/Content-Example.jpg +**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 will read an XML file on a file share so Toast Notifications can be changed "on the fly" without having to repackage. -To create a custom XML, copy CustomMessage.xml and edit the text you want to display in the toast notification. Reference that file using one of the script parameters. +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. **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. @@ -18,12 +21,14 @@ BadgeImage.jpg HeroImage.jpg CustomMessage.xml** +**Parameters** +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** 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** -Specify the location of the Custom XML file used for the Toast when it is not in the MEMCM package +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** Toast_Notify.ps1 -XMLOtherSource "\\\\fileserverhome\xml\CustomMessage.xml" @@ -35,7 +40,7 @@ Toast_Notify.ps1 -XMLSciptDirSource "PhoneSystemProblems.xml" Toast_Notify.ps1 **Known Issues** -Currently, the images in the XML can only be read from the local files system. This is not an issue if we are deploying the package from MEMCM. Further development will see the ability to convert images to Base64 or host them on a web server. +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** @guyrleech From 4aad364bd2ef8e16f15c7f436e05a1d2544c6966 Mon Sep 17 00:00:00 2001 From: Ben Whitmore <44303264+byteben@users.noreply.github.com> Date: Thu, 23 Jul 2020 07:50:58 +0100 Subject: [PATCH 04/10] Update README.md --- README.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9fb3892..8c425c7 100644 --- a/README.md +++ b/README.md @@ -5,13 +5,15 @@ http://byteben.com/bb/wp-content/uploads/2020/07/Toast-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 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. **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. 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. **.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. -**.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. **.EXAMPLE** + Toast_Notify.ps1 -XMLOtherSource "\\\\fileserverhome\xml\CustomMessage.xml" **.EXAMPLE** + Toast_Notify.ps1 -XMLSciptDirSource "PhoneSystemProblems.xml" **.EXAMPLE** + 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. **Thanks for the help from** + @guyrleech @young_robbo **Community** + 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 From 60ca7e3b0025623a4a7766d2a5ed0603ec8435a9 Mon Sep 17 00:00:00 2001 From: Ben Whitmore <44303264+byteben@users.noreply.github.com> Date: Thu, 23 Jul 2020 08:03:13 +0100 Subject: [PATCH 05/10] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8c425c7..33c3b91 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,9 @@ **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. +The "Toast Notify" solution will pop a notification toast from the system tray in Windows 10 (See Toast-Example.jpg). This project was born out of the desire for me to understand Toast Notifications better and seek t replace a 3rd party desktop notification solution. The titles, texts and action button are customisable via an XML document. + +Toast_Notify.ps1 is a 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. 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. From 24c0a33adbcb019ca8a4ec70e7b6f74b24bef684 Mon Sep 17 00:00:00 2001 From: Ben Whitmore <44303264+byteben@users.noreply.github.com> Date: Thu, 23 Jul 2020 08:03:36 +0100 Subject: [PATCH 06/10] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 33c3b91..a27d774 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ **Description** -The "Toast Notify" solution will pop a notification toast from the system tray in Windows 10 (See Toast-Example.jpg). This project was born out of the desire for me to understand Toast Notifications better and seek t replace a 3rd party desktop notification solution. The titles, texts and action button are customisable via an XML document. +The "Toast Notify" solution will pop a notification toast from the system tray in Windows 10 (See Toast-Example.jpg). This project was born out of the desire for me to understand Toast Notifications better and seek to replace a 3rd party desktop notification solution. The titles, texts and action button are customisable via an XML document. Toast_Notify.ps1 is a 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. From 364ddff0c4753b909023e6e38e0587915c6eabd9 Mon Sep 17 00:00:00 2001 From: Ben Whitmore <44303264+byteben@users.noreply.github.com> Date: Thu, 23 Jul 2020 08:10:21 +0100 Subject: [PATCH 07/10] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a27d774..e8921c3 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ The following files should be present in the Script Directory when you create th **Toast_Notify.ps1 BadgeImage.jpg -HeroImage.jpg +HeroImage.jpg (364 x 180px, 3MB Normal Connection / 1MB Metered Connection) CustomMessage.xml** **Parameters** From 58b2997f33657e46de14ef99968895d56b3c2c92 Mon Sep 17 00:00:00 2001 From: Ben Whitmore <44303264+byteben@users.noreply.github.com> Date: Thu, 23 Jul 2020 08:11:37 +0100 Subject: [PATCH 08/10] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e8921c3..c975b08 100644 --- a/README.md +++ b/README.md @@ -22,9 +22,11 @@ The following files should be present in the Script Directory when you create th **Toast_Notify.ps1 BadgeImage.jpg -HeroImage.jpg (364 x 180px, 3MB Normal Connection / 1MB Metered Connection) +HeroImage.jpg (364 x 180px, 3MB Normal Connection / 1MB Metered Connection) CustomMessage.xml** +More on Toast Content can be found here:- https://docs.microsoft.com/en-us/windows/uwp/design/shell/tiles-and-notifications/adaptive-interactive-toasts + **Parameters** 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. From 7a1371453095c103f30eb2768bb3498c9d938b36 Mon Sep 17 00:00:00 2001 From: Ben Whitmore <44303264+byteben@users.noreply.github.com> Date: Thu, 23 Jul 2020 08:12:51 +0100 Subject: [PATCH 09/10] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c975b08..367ba3b 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,8 @@ BadgeImage.jpg HeroImage.jpg (364 x 180px, 3MB Normal Connection / 1MB Metered Connection) CustomMessage.xml** -More on Toast Content can be found here:- https://docs.microsoft.com/en-us/windows/uwp/design/shell/tiles-and-notifications/adaptive-interactive-toasts +More information and Toast Content guidelines can be found at:- +https://docs.microsoft.com/en-us/windows/uwp/design/shell/tiles-and-notifications/toast-ux-guidance **Parameters** 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. From bd8a40bd810157bc44f994f25cca71dc6f64578d Mon Sep 17 00:00:00 2001 From: Ben Whitmore <44303264+byteben@users.noreply.github.com> Date: Thu, 23 Jul 2020 08:15:13 +0100 Subject: [PATCH 10/10] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 367ba3b..86cd8bf 100644 --- a/README.md +++ b/README.md @@ -63,5 +63,7 @@ Currently, the images in the XML can only be read from the local file system. Th **Community** 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 don't believe in reinventing the wheel, part of me was saying "Use Martin's Script", but I challenged myself to learn how Windows Toasts work from the ground up - so this project was a labour of love for me. I have enjoyed the ride so far. + + If you have any comments, feedback or would like to contribute - please don't be shy!