1

When a users logs out of their computer, I would like a way of displaying a message to them asking if they remembered to set their out of office and email forwarding, I'd like to give them the chance to cancel their logout if they need to go back in to Outlook and do this.

I have tried using a logout vbscript which traps the answer to a Yes / No question but the shell command "shutdown -a" doesn't work as I think the process is too far gone.

Is there a way to either customize the standard "Are you sure you wish to log off?" message showing the reminder or intercept the Start - Shutdown/ Log Off process? I am open to different ways of doing this, it doesn't have to be a vbscript.

My environment is Windows 2003 servers and Win XP Pro clients.

Thanks in advance.

1 Answer 1

0

You cannot stop a logoff that is already in process.

It might be possible to detect that the "Log Off Windows" window is open, but this is down the evil magic path. There is no way to do the same when the user runs logoff, rwinsta, shutdown, pulls the plug...


(When I click "Log off", I expect Windows to close the session. If the user has forgotten about this particular customization, he may accidentially leave it at the confirmation box, which someone else could cancel and then access the user's session, including files and running programs. On the other hand, this could be avoided by a very short timeout.)

3
  • From the state the computer is in when the logout script runs, I had a feeling there was no coming back from it. I don't really understand the purpose of "shutdown -a" then.
    – Yeodave
    Commented Mar 22, 2011 at 16:21
  • @Yeodave: It's for aborting shutdowns scheduled with shutdown -s -t 42 (time is in seconds). Commented Mar 22, 2011 at 16:27
  • Or just shutdowns that haven't gotten past some particular point. Slower computers or computers with a lot of apps running that must respond to the shutdown request can also be stopped with the shutdown -a regardless of whether or not the shutdown was initiated using shutdown -t... . Commented Jun 22, 2011 at 14:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .