Windows 7 Embedded - How to setup inactivity automatic logoff ???


Limp Gawd
Oct 17, 2011
I have been Googling and researching this for an hour. All the software out there (1) not free, though not a major issue, but (2) terms of agreements and licensing does not allow for installing to more than one machine. We will be having several deployments.

Through my Googling and research, I found that there was one question often asked: why do you need to do this?

Allow me to tell you why: HR needs a machine that people will use to apply for a position. For obvious security reasons, the session needs to be logged out of automatically after an inactivity of 30-60 seconds.

Screen saver will not work because that does not log you off. It is critical that all programs be forcibly closed and terminated and that no data from the previous session can be potentially discovered accidentally by another applicant.

I could have the Thin Client reboot automatically, but you have to factor in that it will take approximately 7 minutes to fully reboot to Desktop (these Thin Clients use a low performance flash chip for their storage -- it's just how HP builds their Thin Clients). This would be unacceptable, and would mean a person is more likely to sit down to a Thin Client that is in the process of rebooting than one that is ready for an applicant to do their thing.

This is an HP t5740e Thin Client with the latest WES7 image. WES7 is virtually identical to full blown Windows 7, unlike Windows XP Embedded.
May work with a screensaver; except the screensaver will really just basically be a bat file, saved with a SCR extension.

Open Notepad:

shutdown /l /f

save as "logoff.scr" and place in System32 (I think?)
Change screensaver to logoff.scr
Haven't tried this, but for those looking for a solution give this a shot.

WinExit is widely reported to not work on Vista/7 at all. However, AutoIt tool looks like it might work -- for those looking for a solution give this a shot.

I broke it to my boss before I checked this thread for responses my research situation and how I am unable to find a workable solution. He got on to me and had me order as many $5 licenses we needed to AutoLogoff (

In the mean time, I have proposed a paid offer to my friend in Sweden to write me a program that has a single and required parameter /t:<seconds>, inactivity being defined as 15 seconds of no user input activity (and then /t is engaged), when /t is engaged to popup a simple non-intrusive text overlay "Automatic log-off in <seconds> seconds due to inactivity" in the bottom right hand corner of the screen, and when /t expires simply log the current Windows user session off. I can't believe there isn't a freeware program out there that perform this simple function.

Using Microsoft's Task Scheduler would work -- but Microsoft has a cycle time of 15 minutes before Scheduled Tasks are checked, meaning that you'd have to wait 15 minutes before your "1 minute idle time logoff" schedule would be triggered. That's the only reason why I can't use Microsoft's built-in Task Scheduler. In addition, both from my experience and reports from other people via my research, scheduling the usage of shutdown.exe to perform a log off doesn't always work.

A program like the one I described that I proposed with payment to my friend would be excellent on Thin Clients. Why? Because even if someone tampers with the device, all it takes it rebooting the device and everything is reset to the way you had the Thin Client setup due to the Write-Filter that prevents changes from being persistent.

Binary: (8KB)
Binary + Source + license.txt: (15KB)


InactiveLogoff.exe <seconds>

InactiveLogoff.exe 30

Recommended Usage:
Place the executable in any location, such as %windir%. Create a shortcut, modify the execution line to include the time parameter of your desired length, and place the shortcut in All Users --> Program Files --> Startup folder.

Description of Function:
Inactivity is defined as 15 seconds of not moving the mouse, hitting anything on the keyboard, or any input from the user. That is when this countdown timer of specified time (in seconds) begins. When inactivity is true, a small non-intrusive overlay text message appears in the bottom right hand corner of the screen saying &#8220;Automatic log-off in <seconds> seconds due to idling&#8221;. All it takes is any user input to make that go away and reset the timeout. When the specified time (in seconds) expires, the current Windows user session is logged off and brought back to the Welcome screen. This program is able to operate under plain user accounts that do not have Administrative or Power User privileges.

This software licenses under Creative Commons Attribution 3.0 Unported (, which means you are free to share (to copy, distribute and transmit the work), free to remix (to adapt the work), and to make commercial use of the work. Don't take credit that isn't yours. This program was coded by Richard Hartfield of under the hire of myself Joshua Szanto. You can use this software for commercial, academic, personal & private use.

Thanks to Richard from for producing this program for $100.
Last edited: