title: Planned shutdown of the computer with a custom message
body: <p>Is it possible to perform a delayed shutdown of the computer using an API function that displays a &quot;you are about to exit&quot; message, similar to performing a <code>shutdown /s /t xx /c &quot;xxxxxxxx&quot;</code> when the shutdown is scheduled for less than a minute?</p>
  <p>MSDN's documentation on InitiateSystemShutdown says so:</p>
  <blockquote>
  <p>If <code>dwTimeout</code> is not zero, <code>InitiateSystemShutdown</code> displays a dialog
  box on the specified computer. The dialog box displays the name of the
  user who called the function, displays the message specified by the
  <code>lpMessage</code> parameter, and prompts the user to log off. The dialog box
  beeps when it is created and remains on top of other windows in the
  system. The dialog box can be moved but not closed. A timer counts
  down the remaining time before a forced shutdown.</p>
  </blockquote>
  <p>It does not so much fit what I am looking for...</p>