HOW TO SHUTDOWN, RESTART OR LOG OFF IN WINDOWS 8
The regular approach I this. As there are no “shutdown” buttons in Windows 8, you can switch to the desktop view and press Alt+F4 to bring the Shut Down menu or the other option is that you press the shortcut key Win+C, go to Settings – > Power – > Shut down.
That’s too many steps especially when you are in a dual-boot environment and need to switch from one OS to another.
Wouldn’t it more convenient if you could create simple tiles – like any other metro app – and place them on the Windows 8 desktop so that you can Shut down, Log off or Restart your Windows 8 computer with a simple click (or tap).
this is a simple utility (or rather a script) that will automatically add Shut Down and other related buttons to your Windows 8 screen. There’s no installation required – just download the file to your desktop and double-click to create the various buttons.
here’s the full source code of the VB script in case you are curious to know what it does behind the scenes. It may not be the most efficient piece of code but it will do the trick.
' ' This script will create shortcuts in the Start Menu ' Version: 0.1 ' 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"
0 comments:
Post a Comment