Placing time limits on user login accounts

B

Bri

Hi -
We run a small project giving free computer and internet access to people at
our drop-in centre. What we would like to do is limit the time each person
has after they have logged in, to say an hour at a time, after which the
person will automatically be logged out, so that someone else can have a
turn.

We are using two Windows 2000 machines and two XP machines. I have looked
at the admin tools in each but cannot find a way of doing it there. Is there
anyway it can be done, or are there any (preferably free) programs which
would enable us to do this?

Any advice on this would be much appreciated.
Thanks,
Brian.
 
P

Pegasus \(MVP\)

Bri said:
Hi -
We run a small project giving free computer and internet access to people
at our drop-in centre. What we would like to do is limit the time each
person has after they have logged in, to say an hour at a time, after
which the person will automatically be logged out, so that someone else
can have a turn.

We are using two Windows 2000 machines and two XP machines. I have looked
at the admin tools in each but cannot find a way of doing it there. Is
there anyway it can be done, or are there any (preferably free) programs
which would enable us to do this?

Any advice on this would be much appreciated.
Thanks,
Brian.

Here is one way of doing it: Use the Tasch Scheduler to run the
following batch file once every five minutes:
#1 @echo off
#2 for /F "delims=\ tokens=2" %%a in ('c:\Tools\psloggedon.exe ^| find /i
"%ComputerName%"') do set name=%%a
#3 if not exist c:\Logs md c:\Logs
#4 if not exist c:\Logs\%name%.bat (
#5 echo set elapsed=5 > c:\Logs\%name%.bat
#6 goto :eof
#7 )
#8
#9 call c:\Logs\%name%.bat
#10 set /a elapsed=%elapsed% + 5
#11 echo set elapsed=%elapsed% > c:\Logs\%name%.bat
#12 if %elapsed%==55 net send %name% Warning: This machine will reboot in 5
minutes. Please log off now!
#13 if %elapsed%==60 (
#14 net send %name% Warning: This machine will reboot in 1 minute. Please
log off now!
#15 echo shutdown -r -f -t 60
#16 )

Please note:
- You must run the task under an admin account, not the
user's account.
- You must turn on the "Messenger" service on each PC.
- Don't retype this batch file - use copy & paste instead.
- You must unwrap the lines in the batch file above, using the
line numbers as a guide. You must also remove the line numbers.
- You must remove the word "echo" in line #15 to activate the reboot.
- The syntax for shutdown.exe is different for Win2000 PCs.
- You can get the file c:\Tools\psloggedon.exe from www.sysinternals.com.
- You must place this batch file into the All Users\Startup folder
in order to reset the counter:
@echo off
if exist c:\Logs\*.bat del c:\Logs\*.bat
 
B

Bri

Pegasus -Thanks very much for your reply. I'll give it a try tomorrow when
I'm at the project again.
Regards,
Brian.
 

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