?
Solved

Log off a locked computer after a certain period of time

Posted on 2006-07-17
8
Medium Priority
?
1,085 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: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 500 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

If you build your web application in Visual Studio you'll get at least a few binaries, or .DLL, files in your bin folder. However, there is more compiling to be done. Normally this would happen when an ASP.NET resource within the web site is request…
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
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…
Suggested Courses
Course of the Month13 days, 22 hours left to enroll

809 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