Display a User Notification in an Intune Win32 Application

I recently had the joy of migrating an Adobe application from ConfigMgr to Intune, and one of the requirements we needed to add was a user notification that prompted the user to close any M365 apps if they were running as they’ve been known to cause the installation to fail. Since this is not a native capability, I decided to create a little self-contained C# app that can be packaged with the install and some PS wrapper code to invoke the notification.

Here’s a couple of quick examples:

Its pretty simple – you can pass it two arguments on the command line – the notification title, and the notification text.

If you’re deploying an app in SYSTEM context, then obviously you need a mechanism to display something in the user context. There’s more than one way to do that, but I opted for a simple scheduled task running as “Users” to avoid any additional dependencies. The wrapper script takes care of creating, running and cleaning up the resources of the scheduled task allowing you to just provide the title and text for the notification.

The app can be used for other code projects too where a simple notification is required. One advantage over using toast notifications to the same effect is that the notification persists and you have full control over how long you want it to display for.

You can find the app and some example wrapper code for using it in my GitHub repo:

https://github.com/SMSAgentSoftware/Win32AppUserNotification/tree/main

One thought on “Display a User Notification in an Intune Win32 Application

Comments are closed.