Solved

Log off a locked computer after a certain period of time

Posted on 2006-07-17
8
1,055 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 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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
2 windows xp desktops computer 8 150
windows xp sp3 too old to do anything?  How to update it? 24 115
Clone HDD in RAID1 10 130
Windows startup/shutdown date/time log 7 141
Migration of Exchange mailbox can be done with the ExProfre.exe tool. But at times, when the ExProfre.exe tool migrates the Exchange Server user profile, it results in numerous synchronization problems. Synchronization error messages appear in the e…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
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…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

770 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