Community Tool: SCConfigMgr Idle Notification
At first, happy new year 2019 to you all!
I have been thinking what topic would be my first blog post of year 2019, maybe something about ConfigMgr or Intune? Turns out, neither! In these two days, I have been make a idle notification/action tool, because I have some needs log off user from machine if user is not using it for xx minutes, it needs to have popup notifications, custom text, time out features, and most important: Do some actions, example log off the user. Basically this is useful for public use machines or shared PCs, Kiosk PCs.
So here I am, making my own tool again. This is how it looks like:
How does it work
After installation, it puts SCConfigMgr Idle Notification.lnk shortcut in folder C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp, when user logon, it runs SCConfigMgr Idle Notification.exe in background, it checks idle status every 10 seconds. After installation, you have to log off then log in again, so that SCConfigMgr Idle Notification.exe will automatically start. Based on your configuration, it will popup a custom notification when reach to xx minutes idle time, this notification will stay on your desktop xx minutes unless you click OK. Idle time will be reset to 0 if someone use mouse or keyboard.
What this tool can do and how to configure it
There are 10 configurable properties in this tool, all the properties are stored in settings.xml file, which can be found in installation folder. Default installation path in Windows 10 64bit is C:\Program Files (x86)\SCConfigMgr\SCConfigMgr Idle Notification
Well, title is tile, by default it is SCConfgMgr
You can configure your own image, it supports max. 300 x 80 pixels jpg file. You must copy the file to same installation folder as this tool, configure property IMAGEFILE value to your logo image file name. Default logo image is our SCConfigMgr banner.
Here you can configure idle time in minutes. Default is 5. I have hard coded that check each 10 seconds idle status, so there are some delays.
This is the text saying This computer has not been used for 5 minutes, you will be logged off soon. If you wish to continue use it, please click ‘OK’
NOTE: Please don’t input too much characters, otherwise it will push log off time and OK button out of notification box.
This is how long popup notification will stays on your desktop by minutes. Default is 2.
This is the text saying Log off time, details of log off time is calculated in the app, I made this property just in case you want to change it to your local language.
I was originally only want log off the user, but I didn’t hard coded this one, you can configure other commands. Default is shutdown.exe /l /f, this command will force log off current user.
You can use this configure what time do you want it checks idle time, example if you want starts at 8am, use value 480, calculate 8 time 60 minutes, so it’s 480. Default is 0
You can use PowerShell calculate this value as well, example:
# 8AM (New-TimeSpan -Hours 8).TotalMinutes # 5PM (New-TimeSpan -Hours 17).TotalMinutes
Use this property configure how long do you it checks idle time since StartTime. Example, you want configure it check idle time from 8am to 5pm, configure STARTTIMEMINUTES as 480, DURATIONMINUTES 540. Default is 1440
You can use PowerShell calculate this values as well, example
# from 8AM to 5PM (New-TimeSpan -Hours (17-8)).TotalMinutes # from 10PM to next day 8AM (New-TimeSpan -Hours (24-22+8)).TotalMinutes
Default is False, if set it to True, it will detect locked status, and it will not do anything if user locked the machine. But if user locked the machine after idle notification appears and didn’t choose OK, it will still log off the user.
Default is True, if PowerPoint SlidesShow is on, it will not anything. However, if user start SlideShow after notification appear and didn’t choose OK, it will still log off the user. Set it to False if you don’t want the dectection
How to install
- Option 1: Very easy, you can run the msi directly with all default properties, of course it comes with our SCConfigMgr banner
- Option 2: Use properties during installation. Example:
msiexec.exe /i "SCConfigMgr Idle Notification.msi" TITLE="Your company name" IDLETIMEMINUTES=10
- Option 3: Modify settings.xml file, then copy it to installation folder.
What is next?
I have only tested action notepad.exe and shutdown.exe /l /f, I don’t know if it can work with other commands. For now, fonts, colors are hard coded, I might make them as properties later. So please give feedback and give it a try, hope you like it.
You can download this tool from TechNet: Click here
Version 1.0.6 (Jan.25.2019) Fixed a bug that body text property was not applied.
Version 1.0.5 (Jan.11.2019) Added property DETECTSLIDESHOW. Default is True, if PowerPoint SlidesShow is on, it will not anything. However, if user start SlideShow after notification appear and didn’t choose OK, it will still log off the user. Set it to False if you don’t want the dectection
Version 1.0.4 (Jan.10.2019) Added Padding in textbox, so that text are not in the edge of textbox
Version 1.0.3 (Jan.10.2019) Added property DETECTLOCK, Default is True, it will not do anything if user locked the machine. However, if user locked the machine after notification appear and didn’t choose OK, it will still log off the user. Set it to False iif you don’t want the dectection
Version 1.0.1 (Jan.10.2019) Added two properties, can now use between time frames
Version 1.0.0 (Jan.09.2019) First version.
Sandy is an Enterprise Mobility MVP since 2018. She has been working in the IT industry since 2009, primarily dealing with device management solution planning and implementation. Sandy has worked with SCCM, MDT, Group Policy, software packaging, problem solving. Sandy currently works for a large Finnish company with several thousand endpoints as system architect. In 2016, Sandy founded the https://thesccm.com blog and is now a guest blogger on SCConfigMgr.