Solved

Log off a locked computer after a certain period of time

Posted on 2006-07-17
8
1,036 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
  • 3
  • 3
  • 2
8 Comments
 
LVL 23

Expert Comment

by:DanCh99
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
 
LVL 23

Expert Comment

by:DanCh99
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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 23

Expert Comment

by:DanCh99
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Are you unable to synchronize your OST (Offline Storage Table) file with Microsoft Exchange Server? Is your OST file exceeding 2 GB size limit? In Microsoft Outlook 2002 and earlier versions, there is a 2 GB size limit for the OST file. If the file …
It is only natural that we all want our PCs to be in good working order, improved system performance, so that is exactly how programs are advertised to entice. They say things like:            •      PC crashes? Get registry cleaner to repair it!    …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

758 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now