.Net ramblings
# Tuesday, 09 August 2005
FIX: Server 2003 won't shutdown because of 'logged on users'
i encountered problems trying to shut down or reboot my windows server 2003 while logged in via remote desktop.  i initiate a shut down from the start up menu, and it logs me off and quits the RD session, but doesn't power off.  If i try and connect in again with RD, it shows me a blank screen on the server for a few seconds, and then quits with no error message.

if i try running "shutdown -s" then i click OK to the message that the computer is shutting down in 30 seconds, but it never does. system log entry: "Application popup: System Shutdown : The system is shutting down. Please save all work in progress and log off. Any unsaved changes will be lost. "

finally, if i push the power button it doesn't complete the shut down either. (i have 'shutdown' selected in power management for when the button is pressed).  i do see an event ID 26 in the system log at the time i pressed the button, with the message 'Application popup: Windows : Other people are logged on to this computer. Shutting down Windows might cause them to lose data. Do you want to continue shutting down?'.  this is a bit useless because the server has no mouse/keyboard/monitor, and i have no way to interact that message except using remote desktop (which doesn't even show that message on screen if i am logged in via RD), and i want to force a software shutdown without being asked questions i can't answer!

finally i found a work around to use the command line tool shutdown.exe with some more severe arguments.  This saves my raid array re-synching from hard-resets.

To Reboot:
shutdown.exe -r /t 10 /d p:1:1 /c "Maintenance, Planned"
To Shutdown:
shutdown.exe -s /t 10 /d p:1:1 /c "Maintenance, Planned"

Tuesday, 09 August 2005 09:31:10 (GMT Daylight Time, UTC+01:00)  #    Comments [2]  Windows Server

Friday, 18 August 2006 05:34:52 (GMT Daylight Time, UTC+01:00)
EnableDefaultReply Is what is needed to bypass the problem with shutdown with users connected, I finally figured it out. I can reset ans shutdown a remote PC by right clicking on the taskbar and using the task manager that is almost as easy as a shortcut amd it works fine. however is someone needs to shutdown the server and they do not have the remote desktop password or any way to connect to the XP machine - no mouse/keyboard/monitor then use this page to enable default reply worked for me to allow me to turn the server off by hitting the power button and it powers the Server all the way down and loggs off the connected users.

To set up your system to automatically reply to a message box without displaying it

In the HKLM\System\CurrentControlSet\Control registry key, create a new key named Error Message Instrument.
Under the Error Message Instrument key, add the values of type REG_DWORD from the following table.Value Data Description
EnableDefaultReply 0x00000001 Enables the Enable Default Reply feature
I didnt bother to log the events so hopefully it doesnt cause me to much trouble but I can laways enable that later.
Wednesday, 30 December 2009 15:33:55 (GMT Standard Time, UTC+00:00)
Or you should simply use the integrated tool (or RK) tsshutdn.exe ! :)
This tool designed for Terminal Servers allows to close all the users's session before initiating the real shutdown.
It also resolve the problems when the Terminal Servers services are down after reboot (service hang at startup due to a failed session stop).


Please login with either your OpenID above, or your details below.
Home page

Comment (Some html is allowed: a@href@title, strike) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

[Captcha]Enter the code shown (prevents robots):

Live Comment Preview