Add shutdown/restart tiles to the start screen

Discussion in 'Windows 8' started by the3fan, Dec 28, 2012.

  1. the3fan

    the3fan MDL Novice

    Mar 3, 2010
    1
    7
    0
    From Winbeta:

    Simply copy the following code into a new txt file and rename it to whatever you like, just add the .vbs to the file extension. For example: shutdown.vbs. Once this is done, simply double click the script and it will create the tiles for you. If you are unable to create a .vbs document, make sure you have "show file names extensions" enabled in Folder Options within Windows 8.

    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 "Shutdown, Restart and Log Off buttons have been created. You can now pin them to the Start Screen of your Windows 8 computer (if they are not already there)."
     
  2. SOCRATE_MMXII

    SOCRATE_MMXII MDL Expert

    Jan 25, 2012
    1,034
    315
    60
    So, now I need to learn how to use powershell to create 1 damn shortcut..OUCH!

    P.S. Thank you the3fan for the script. ;)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Garbellano

    Garbellano MDL Addicted

    Aug 13, 2012
    948
    246
    30
    too much for doing what one single line command does... And we got this since day 1 with windows 8. :p:druff:
     
  4. TGNT

    TGNT MDL Junior Member

    Mar 2, 2010
    96
    3
    0
    Just a simple command to create a shortcut.

    Shutdown = Right click the mouse anywhere on desktop, new , shortcut type in shutdown.exe -s -t 00

    Restart = -------------------------------------------------------------------> shutdown.exe -r -t 00
     
  5. hb860

    hb860 MDL Addicted

    May 7, 2010
    990
    1,776
    30
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Tito

    Tito Super Mod / Adviser
    Staff Member

    Nov 30, 2009
    17,383
    15,034
    340
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. SpeedDream

    SpeedDream MDL Addicted

    Feb 20, 2012
    620
    121
    30
    nice script just a minor question, do you know
    how to make the restart green arrow look good as shutdown's icon on start screen?
    i changed the icon to a waiting black circle in same shell32.dll as your green arrow
    happy new year everyone!