Discussion Locked

Timed logoff of remote XP PC

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I am wanting to automatically log off a remote Windows XP user at a regular time each night (he forgets constantly to do it himself). I've created the following batch file, and scheduled it to run at the appropriate time each evening, but no matter what I do, the delay time is NOT recognized. As soon as the schedule task is invoked, the logoff process begins immediately with no delay. I'd like the logoff warn to appear on the user's screen for 5 minutes just in case anyone is using the PC when the task gets triggered, but like I said, the PC just logs off right away.

Here's the batch file that I've created:

REM ***This batch file is to auto-logoff this PC @ 8:00 PM each night***
@echo off
shutdown -l -f -t 300 -C "8:00 PM LOGOFF"
pause

Any suggestions?

3 replies

by abridgman

The -l option superseeds all other option and does it immediately. You can use the -r option which will reboot the machine and when the user gets back in the morning it will be at his login prompt

by shanna

Thanks very much.... that's what I suspected regarding the delay, but all the documentation I was able to locate didn't specify that you couldn't attach a delay to the "L" parameter.

You get the points... and my thanks.

This discussion is closed to new replies.