User lockout and then Auto Logoff

P

Peter Parker

I need to make our XP Pro workstations Lock after a certain amount of time
(say 10 min) and then after a certain amount of time of inactivity logoff
(say 8 hours). I know how to the screensaver password protect that's easy.
The only thing I found for the Auto logoff is winexit.scr but I can't set
the time that long (28800 sec). Is there a way to do this in a two tier
process? By this use the normal screensaver lock that just before the logoff
time comes up give like a two minute warning countdown? Also need to do
force app termination
 
P

purplehaz

Yup, no prob.
First you need to make a shortcut to log off with the time coutdown warning.
Create a new shortcut and point it here:
%windir%\System32\SHUTDOWN.exe -l -t 120 -c "Windows will Log Off in 2
minutes. Close any open programs."

You can change the time to any seconds you want and customize the message as
well.
Then create a scheduled task with your desired idle time(8 hours) and have
it run the log off shortcut at the idle time.

So you can use the screen saver to lock the workstation, then the scheduled
task will run the log off shortcut at the desired idle time you set.

BTW - you can also create a shortcut for locking the work station if you
don't want to use the screen saver. It's shortcut would point to:
%windir%\System32\rundll32.exe user32.dll,LockWorkStation
 
D

Derek Melber [MVP]

I could really use this myself. How do you create a scheduled task based on
idle time? Also, if the user comes back at 7 hours and 45 minutes, will they
only have 15 minutes to use their computer? If not, how do you configure the
task to stop, if the computer is no longer idle?
 
P

purplehaz

After you create the scheduled task (choose any time to run when first
setting it up, like run at logon), it will then ask you if you want to go
into the advanced options, check the box and click finish. Once in the
advanced options you can choose idle under the schedule tab. Set it to idle
and the timeout you want.
(FYI - you can get into the advanced options for a task by right clicking on
it and choose properties)
Once the computer is not used for a minute or so the timer starts. If it
gets to 8 hours the task runs, if the user comes back and just moves the
mouse before the timeout period, then the timer stops and resets to zero and
waits for idle again to start counting again.
 
P

Peter Parker

Thanks, for the quick reply. The only problem I set arising the mouse
movement resting the timer (this would also effect the lock out too). Since
most new optical mouse are more sensitive to a desk getting bumped. I do
like the included option for scheduled lockout too.
 
P

purplehaz

You're welcome. At my house the optical mouse comes into play cause I have a
stand alone desk that can be moved if bumbed, so yes that can happen, but at
work I have a countertop/desk mounted to the wall so it does not move and
the mouse never gets bumped.
 
T

Torgeir Bakken (MVP)

purplehaz said:
Yup, no prob.
First you need to make a shortcut to log off with the time coutdown warning.
Create a new shortcut and point it here:
%windir%\System32\SHUTDOWN.exe -l -t 120 -c "Windows will Log Off in 2
minutes. Close any open programs."

You can change the time to any seconds you want and customize the message as
well.
Then create a scheduled task with your desired idle time(8 hours) and have
it run the log off shortcut at the idle time.

Hi

Note that it looks like WinXP's shutdown.exe utility is not able to log
off another user than the one user that is defined as the "task" user.
Use e.g. Sysinternals's psshutdown.exe utility to overcome this. More
about this here (and a example on using SCHTASKS.exe to create the
task as well):

http://groups.google.com/[email protected]
 
P

Peter Parker

The only other problem I see now is the task needs to be run as (user &
password). Since we have to change passwords atleast every 90 days this is a
problem. Or am I doing something wrong?
 
T

Torgeir Bakken (MVP)

Peter said:
The only other problem I see now is the task needs to be run as (user &
password). Since we have to change passwords atleast every 90 days this is a
problem. Or am I doing something wrong?

Hi

If you don't change the password on the administrator user, use that
user. Alternatively, create a user with a fixed password for just
this task.

Note that it looks like WinXP's shutdown.exe utility is not able to log
off another user than the one user that is defined as the "task" user.
Use e.g. Sysinternals's psshutdown.exe utility to overcome this. More
about this here (and a example on using SCHTASKS.exe to create the
task as well):

http://groups.google.com/[email protected]
 
P

purplehaz

I use it with user/password and when I change my password (every 30 days) I
just change the password on the task at the same time.
 
T

Torgeir Bakken (MVP)

Peter said:
How do you do this on (30+) machines? Is there a way to make it a service?

Hi

I suggest you create a user with a fixed password for just this task (but
see my link in my other post in this thread about the issue the builtin
shutdown.exe have with this).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top