GLADIATOR@MSFT

Adventures in Desktop, Application, and User State Virtualization

Windows 8: Shutdown, Logoff, and Restart

Windows 8: Shutdown, Logoff, and Restart

  • Comments 4
  • Likes

I’ve noticed that there has been a lot of adjustments and learning curves to Windows 8 – from both consumer and enterprise customers.
Moving from a Start Menu to a Start Screen seems like a significant paradigm shift at first, but once you start working with Windows 8 on a standard laptop or PC, you will find that once you get your desktop and taskbar re-customized with your pinned preferences and shortcuts, the experience for desktop, taskbar, and file exploration is very similar with some subtle enhancements.

For those who are using touch devices, such as the Surface or the Samsung Series tablets, the Start screen is very user-friendly and quite simple to navigate. It is an interface optimized for the touch screen experience. But for those of us (including myself) who are using Windows 8 on a traditional PC or laptop without a touch screen, there will be a simple, short learning curve. One that took me all of 24 hours to adjust to the new screen. One of the first things I noticed was the fact that there was not a default visible key on the start screen for Shutdown, Logoff and Reboot. So I decided to do what a lot of my peers were doing: a little customization! If you would like to
find Log Off, Shutdown, and Restart options added to your modern UI, you can do so with this convenient little script. Just follow these simple steps:

1.)   Open up Notepad on your Windows 8 machine.

2.)   Paste the following code into your document

set WshShell = WScript.CreateObject("WScript.Shell")

strStartMenu = WshShell.SpecialFolders("StartMenu")

set oShellLink = WshShell.CreateShortcut(strStartMenu & "\Shutdown.lnk")

oShellLink.TargetPath = "%systemroot%\System32\shutdown.exe"

oShellLink.Arguments = "-s -t 0"

oShellLink.WindowStyle = 1

oShellLink.IconLocation = "%systemroot%\System32\shell32.dll,27"

oShellLink.Description = "Shutdown Computer (Power Off)"

oShellLink.WorkingDirectory = "%systemroot%\System32\"

oShellLink.Save

Set oShellLink = Nothing

set oShellLink = WshShell.CreateShortcut(strStartMenu & "\Log Off.lnk")

oShellLink.TargetPath = "%systemroot%\System32\shutdown.exe"

oShellLink.Arguments = "-l"

oShellLink.WindowStyle = 1

oShellLink.IconLocation = "%systemroot%\System32\shell32.dll,44"

oShellLink.Description = "Log Off (Switch User)"

oShellLink.WorkingDirectory = "%systemroot%\System32\"

oShellLink.Save

Set oShellLink = Nothing

set oShellLink = WshShell.CreateShortcut(strStartMenu & "\Restart.lnk")

oShellLink.TargetPath = "%systemroot%\System32\shutdown.exe"

oShellLink.Arguments = "-r -t 0"

oShellLink.WindowStyle = 1

oShellLink.IconLocation = "%systemroot%\System32\shell32.dll,176"

oShellLink.Description = "Restart Computer (Reboot)"

oShellLink.WorkingDirectory = "%systemroot%\System32\"

oShellLink.Save

Set oShellLink = Nothing

Wscript.Echo "Created Shutdown, Restart and Log Off buttons in your Programs Menu. You can now pin them to the Start Screen of your Windows 8 computer."

3.)   Save the file as Button.vbs on to your desktop.

4.)   Close Notepad.

5.)   Navigate to your Windows Desktop. NOTE: there is a tile on your desktop for it.

6.)   Double-click on the button.vbs file to execute the script, and click “OK” on the message.

7.)   Press the Windows key and VOILA! You will find Log Off, Shutdown and Restart icons added on the Windows 8 Modern Desktop.

Comments
  • Nice :-)

  • This is unbelievable.  Do you really expect the average user to do this.

  • nice work

  • Good job!

    one thing... I just want to add is that once you guys run the script and the shortcuts are created, then you can pin it to the taskbar of your desktop, pretty cool... just right click on the shortcut and select "pin to taskbar"

    Thank you - Mr. Steve.

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment