Start Menu Log Off Command Change RRS feed

  • Question

  • Does anyone know which command Windows runs when someone clicks Log Off from the start menu?  And, where is this command configured?  The shortcut obviously calls something.

    I ask because I want to change the log off command to do a restart instead of a log off.

    Monday, September 8, 2014 3:39 AM

All replies

  • LInk 1

    HOpe This LInk Help YOu 


    • Proposed as answer by DushYant P Monday, September 8, 2014 10:16 AM
    • Unproposed as answer by John Deakons Tuesday, September 9, 2014 2:49 AM
    Monday, September 8, 2014 10:15 AM
  • Thanks but that link covers remote log off for an RDS session.
    Tuesday, September 9, 2014 2:51 AM
  • Hi,

    The command for Windows client to log off is:

    shutdown -l

    and for restart is:

    shutdown -s

    Kate Li
    TechNet Community Support

    • Marked as answer by Roger Lu Wednesday, September 17, 2014 9:35 AM
    • Unmarked as answer by John Deakons Thursday, September 18, 2014 11:13 AM
    Wednesday, September 10, 2014 1:04 PM
  • Thanks, but to clarify what I'm looking for:

    When a user clicks Start | Log Off, Windows takes an action to log the user off. Windows runs a command which is defined somewhere.

    What is that command and where is that command defined within Windows?

    If Windows runs "shutdown -l" then where is that defined? If it's defined somewhere then it can be modified to do something other than "shutdown -l."

    Thursday, September 18, 2014 11:18 AM