PDA

View Full Version : User lockout and then Auto Logoff


Peter Parker
February 17th 04, 03:47 PM
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

purplehaz
February 17th 04, 04:03 PM
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

Peter Parker wrote:
> 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

Derek Melber [MVP]
February 17th 04, 04:03 PM
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?

--
Derek Melber

"purplehaz" > wrote in message
...
> 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
>
> Peter Parker wrote:
> > 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
>
>

purplehaz
February 17th 04, 05:23 PM
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.

Derek Melber [MVP] wrote:
> 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?
>
>
> "purplehaz" > wrote in message
> ...
>> 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
>>
>> Peter Parker wrote:
>>> 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

Peter Parker
February 17th 04, 07:41 PM
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.


"purplehaz" > wrote in message
...
> 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
>
> Peter Parker wrote:
> > 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
>
>

purplehaz
February 17th 04, 08:02 PM
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.

Peter Parker wrote:
> 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.
>
>
> "purplehaz" > wrote in message
> ...
>> 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
>>
>> Peter Parker wrote:
>>> 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

Torgeir Bakken (MVP)
February 17th 04, 08:23 PM
"Derek Melber [MVP]" wrote:

> I could really use this myself. How do you create a scheduled task based on
> idle time?

Hi

You can create it with e.g. SCHTASKS.exe, more here:



--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter

Torgeir Bakken (MVP)
February 17th 04, 08:24 PM
purplehaz wrote:

> 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):




--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter

Peter Parker
February 18th 04, 01:22 PM
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?

"Peter Parker" > wrote in message
...
> 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.
>
>
> "purplehaz" > wrote in message
> ...
> > 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
> >
> > Peter Parker wrote:
> > > 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
> >
> >
>
>

Torgeir Bakken (MVP)
February 18th 04, 01:43 PM
Peter Parker wrote:

> 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):





--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter

purplehaz
February 18th 04, 02:21 PM
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.

Peter Parker wrote:
> 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?
>
> "Peter Parker" > wrote in message
> ...
>> 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.
>>
>>
>> "purplehaz" > wrote in message
>> ...
>>> 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
>>>
>>> Peter Parker wrote:
>>>> 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

Peter Parker
February 23rd 04, 02:05 PM
How do you do this on (30+) machines? Is there a way to make it a service?

"purplehaz" > wrote in message
...
> 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.
>
> Peter Parker wrote:
> > 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?
> >
> > "Peter Parker" > wrote in message
> > ...
> >> 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.
> >>
> >>
> >> "purplehaz" > wrote in message
> >> ...
> >>> 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
> >>>
> >>> Peter Parker wrote:
> >>>> 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
>
>

Torgeir Bakken (MVP)
February 23rd 04, 02:26 PM
Peter Parker wrote:

> purplehaz wrote:
> > 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.
>
> 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).


--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter

Google