WM_ENDSESSION: See if its a restart or shutdown

From: Thomas Johansen (SPAM)
Date: 12/03/04


Date: Fri, 3 Dec 2004 10:39:25 +0100

Hi

I need my Windows Service to know when the system is shutting down. But it
has allso to know if its a reboot or a shutdown !!!

Is there any way of see this ?? I could use the WM_ENDSESSION and then see
if its a restart or shutdown

I need to tell some eksternal equipment, connect on the COM port, that the
PC is shutting down of restarted !!!
Thomas



Relevant Pages

  • RE: Remove "Shutdown" command from w2k PCs but enable restart
    ... would have to field these calls instead of their users able to reboot on ... chase after them to only restart a system at night. ... I use the command line shutdown for the few machines that I have removed ... I also adjusted the bios power on options to deal with a power outage .. ...
    (Focus-Microsoft)
  • Re: After reboot, cant use admin Terminal Server on SBS 2003
    ... I like is to schedule a reboot an hour out, using the "shutdown" command. ... restart will restore your access. ...
    (microsoft.public.windows.server.sbs)
  • Re: Shutting down windows NT remotely (without winnt toolkit)?
    ... Shutting down windows NT remotely? ... agent to automatically enter the password upon startup. ... shutdown; 3) reboot. ...
    (Vuln-Dev)
  • Re: Restarting Suse 9.0
    ... > Suse froze up on me and I have no clue how to restart it. ... > shutdown is an unrecognized command ... login as root to do reboot or shutdown. ...
    (alt.os.linux.suse)
  • Re: THE SYSTEM KEEP SHUTTIND DOWN
    ... Are you getting this messages before the reboot? ... "This system is shutting down. ... Please save all work in progress and log ... This shutdown was initiated by NT Authority/System." ...
    (microsoft.public.windowsxp.security_admin)

Loading