Solved

Log off a locked computer after a certain period of time

Posted on 2006-07-17
8
1,074 Views
Last Modified: 2008-01-09
I've been searching the net for a software or a tool that would log off a locked computer after a certain time but came up with nothing usable this far.

There's plenty of tools for logging off a user after a predefined time of inactivity, such as winexit.scr which comes with the windows server 2003 resource kit, but these don't match my requirements.

The tool should log off the user after a period of time that the computer is _locked_. So if the user locks the computer it would log it off after say 15 minutes. All the tools I've found don't come with this feature, they log the user off after the defined time no matter if the computer is locked or not.

Any suggestions for this?
0
Comment
Question by:helppari
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
8 Comments
 
LVL 23

Expert Comment

by:Danny Child
ID: 17123089
psshutdown with the -o switch will force a logoff of the user, and the -f switch will force apps to close (possibly losing unsaved documents).
http://www.sysinternals.com/Utilities/PsShutdown.html

Not sure how you're gonna detect when a PC is locked though...

and short of running this in a scripted loop to test the pc every 5 mins or so, I can't think of a good way to apply it.
0
 
LVL 24

Accepted Solution

by:
Kenneniah earned 250 total points
ID: 17123377
Best way I can think of offhand would be to use schtasks in combination with screen saver policy.
Basically you'd set group policy to have the screen saver run after 15 mins (or whatever time you want) of inactivity and lock the workstation. Then you'd use schtasks with the /ONIDLE to schedule shutdown.exe or psshutdown after 30mins of idle time.

This wouldn't do exactly what you want, but what it would work as in the following.
If user walks away from workstation, after 15 mins, computer would lock, then 15mins later would logoff.
If user locks the workstation, 30 mins later user would log off.

It's not based solely on Locked time, but might come close to what you desire.
0
 

Author Comment

by:helppari
ID: 17128734
Thanks for your answers. Psshutdown seems to be a capable tool of logging the user out.

Still, I'd need the logoff to base on the time the computer has been locked, not for the time of inactivity. Is there really no way to do this?

0
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
LVL 23

Expert Comment

by:Danny Child
ID: 17129094
doesn't the time of being locked = the time of inactivity, by definition?  Or are you considering background processes that run while a pc may be locked?
0
 
LVL 23

Expert Comment

by:Danny Child
ID: 17129163
To add to Kenneniah's top info above, here's a link on schtasks.exe

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/schtasks.mspx?mfr=true
0
 

Author Comment

by:helppari
ID: 17133318
The time of being locked can very well be equal to the time of the computer to be locked but not necessarily. Say a user follows the lesson or reads a book in front of the computer and because of that doesn't touch the computer for a while.

This is why I'd need the logoff to base on the time of the computer being locked.  
0
 
LVL 24

Expert Comment

by:Kenneniah
ID: 17138249
Not built into Windows XP at least. It doesn't have a timer for how long the workstation has been locked. Vista's Task Scheduler has triggers that can be set, including "On workstation lock", but unfortunately this does not exist in XP or 2003.

I'm not aware of any third party schedulers that have this ability, but it's always possible there is one out there.
0
 

Author Comment

by:helppari
ID: 17145273
Ok. I'll have to manage with these then. Thanks guys.
0

Featured Post

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are 2 things you must have in order to connect to the internet behind a router, The "Gateway IP" of the router, which is usually something like 192.168.xxx.1, I've seen routers with default values of: 192.168.0.1, 192.168.1.1, 192.168.11.1, …
Issue: Unstable cursor in Windows XP and Windows runs extremely slow in that any click will bring up the Hour glass (sometimes for several seconds before giving you what you want) . Troubleshooting Process and the FINAL FIX: This issue see…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question