Skip to content

Instantly share code, notes, and snippets.

@felubra
Last active January 12, 2018 00:47
Show Gist options
  • Save felubra/ec834598a2fa01840945e4a52151d310 to your computer and use it in GitHub Desktop.
Save felubra/ec834598a2fa01840945e4a52151d310 to your computer and use it in GitHub Desktop.
Bring the 'Shutdown Windows' dialog
/**
*
* Disclaimer: This is JScript *not* JavaSript. This is intended to be used in Windows.
*
* This will bring the 'legacy' Shutdown Dialog. Since Windows 10 Fall Creator's Update,
* Windows will restore running apps after a restart or shutdown. Turning off or
* restarting Windows via the 'legacy' dialog forces Windows to the old behaviour.
*
*/
(new ActiveXObject("Shell.Application")).ShutdownWindows();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment