Logoff User After Idle

By | 2017-09-27

Recently, there was a request for our team to implement a new security requirement for workstations. Specifically, If a user remains logged in, but is idle for a specific period of time, that user should be logged out. 

After consulting the interwebs for a few minutes, all I could find were hacky solutions using vbscript, PowerShell, task scheduler, or screensavers that may or may not work. I don’t need weird, chained together items. I just need something that works.

Concept

So, I cracked open my favorite Rapid Application Development (RAD) environment, and built something that fits the bill.  I had a few requirements, though.

  • No installation – I don’t need a setup program, which makes deployment and update just a bit easier.
  • No dependencies – Deploying this program to any version of Windows should just work. No support libraries needed, not even .Net.
  • No interface – The program should run transparently to the user, except when the warning dialog appears.
  • Configurable idle time –  Default to five minutes (300 seconds), but accept any number of seconds.
  • Configurable warning time – Default to one minute (60 seconds), displays the warning banner and countdown at a configurable time before logoff.

The program that I’ve put together meets all the criteria above. By utilizing API calls that are standard across the Windows product line, the program will run anywhere. Heck, it might even work in WINE, but I haven’t tried it.

Further, no DLLs or other extras need to be distributed with it. No registering of random DLLs or any of that.

Update:

I’ve created a short guide which shows how to utilize SIC in an Active Directory domain environment, through the use of Group Policy Objects (GPO).

The guide can be found here.

Special Instructions

Warning #1

This program will forcefully log off the currently logged on user. It is possible for the user to lose anything they were working on that was not saved.

You have been warned. Neither I nor anyone affiliated with this site is responsible for the use or misuse of this software. It is provided free of charge, and there are no requirements for payment of any kind.

Warning #2

If you choose to download this software from anywhere else, you run the risk of acquiring malware, viruses, spyware, ransomware, or whatever else nasties are running around on the internet. There are no features to hack, no limitations crack, and no special features to unlock. It’s free, and this is the only version.

This program is no longer maintained.

I’ll leave it available here, but I won’t be adding or modifying it any further.

Author: dwirch

Derek Wirch is a seasoned IT professional with an impressive career dating back to 1986. He brings a wealth of knowledge and hands-on experience that is invaluable to those embarking on their journey in the tech industry.

Leave a Reply

Your email address will not be published. Required fields are marked *

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