How to create a shortcut to the Shut Down Windows dialog in Windows 8, Windows 7 and Vista

Since Windows Vista, the classic Shutdown dialog is accessible only with the help of a hotkey. You have to minimize all windows, then click to focus on the Desktop and finally press Alt+F4 to make it appear. Instead, Microsoft offers you an expandable submenu for the "Shutdown" button in the Start Menu of Windows 7 and Windows Vista. Things have changed for the worse again with Windows 8: no more Start Menu, no more quick access to Shutdown functions. Today, I going to show you how it is possible to display the familar classic Shut Down Windows dialog with a single click.

All we need is just the Notepad application. Start it and paste the following text:

Tip: Here's how to tweak your PC to ensure top performance for a specific type of task, be it gaming, document work or something else.

dim objShell
set objShell = CreateObject("shell.application")
objshell.ShutdownWindows
set objShell = nothing

Now select File - Save menu item and type any filename, but it is necessary to add ".vbs" as the file extension.

Tip: You can add the filename and extension inside quotes, so that Notepad does not add ".txt" to the filename that you have typed. Adding it inside quotes will save it as "shutdown.vbs" and not, "shutdown.vbs.txt". See the following image:


Now double click on the file you saved and you will see the old good Shut Down Windows dialog. That's it.

How does it work

There is nothing magical with this trick. Windows provides users with access to a wide variety of objects necessary for running applications and managing the operating system. One of them is the Shell COM object which we have created inside the script. It has a Shutdown method which displays the Shut Down Windows dialog box. Nothing more, nothing less.

Bonus tip: How to pin our Shut Down dialog script to the Taskbar

It is very easy to get it pinned with our latest software: Taskbar Pinner. Just follow the step-by step instructions below:

  1. Create a shortcut to your VBS file and place it anywhere you want.
  2. Change the icon of the shortcut you have created to the one from C:\Windows\System32\Shell32.dll file.
  3. Drag the shortcut file to Taskbar Pinner's main window and drop it. That's all.

    Now you can even safely remove the shortcut you have created at step 1, it is not required anymore.

Download ready-to-use VB script file

Driver Updater

11 thoughts on “How to create a shortcut to the Shut Down Windows dialog in Windows 8, Windows 7 and Vista

  1. deztructo

    You can reduce the vbs to one line:

    CreateObject(“shell.application”).ShutdownWindows

    It is not necessary to put it into a variable and then destroying it at the end. It will be flushed when the vbs is done. Putting it into a variable is useful if you plan on using it again later which you don’t. So it’s completely fine to directly call the object.method.

    Reply
    1. Eduardo

      Don`t work with one line CreateObject(“shell.application”).ShutdownWindows
      error shell .

      for any reason , first is necessary create a variable

      anyone know an explanation ?

      Reply
      1. YsT

        The reason for an error most probably would be some non-basic flavour of double quotes from copy/paste !

        Reply
  2. Daniel

    Or you can insert this into the Win+X menu and voila!

    Reply
  3. QHu91_IT

    Or you can create shortcut with “shutdown.exe /s” for shutdown, “shutdown.exe /r” for reset, etc

    Reply
  4. Brian

    Accessing shutdown from the Charms bar causes a “Hybrid (hibernate) Shutdown”, Using the command “shutdown.exe” causes a traditional full shutdown. Which type of shutdown does the VBS script provided above cause?

    Reply
    1. Sergey Tkachenko Post author

      It provides hybrid shutdown if “fast boot” is enabled.

      Reply
  5. Francesco

    Sergey you’re the master, so many thanx for this!!!

    Reply
  6. perudescargas

    Guys, use this:
    (new ActiveXObject(“Shell.Application”)).ShutdownWindows();
    Works OK! ;)

    Reply
    1. darkmun

      Those who prefer using Powershell, here is the one liner to display the same Shut Down Windows dialog box:

      [PS]> (New-Object -ComObject Shell.Application).ShutdownWindows()

      BTW, the dialog box will not apear when using Remote Desktop (RDP), including using the keyboard shortcut Alt-F4 when the Desktop is in focus.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.