How-To Geek

Create Shutdown / Restart / Lock Icons in Windows 7 or Vista

If you dislike the new Windows Vista shutdown menu, you are probably in the majority. An alternative option is to create icons that will let you shut down, lock, or restart your computer without having to mess with that stupid popup menu.

Of course, Windows 7 makes the shutdown menu a lot better, but if you want a shortcut elsewhere or to assign a hotkey, this should help you out.

This tip is nothing new, and probably very old hat to most of the advanced geeks reading this feed. I’ve been asked this question so many times in the last month that I decided to finally just write it up for everybody.

First right-click on the desktop, choose New and then Shortcut.


In the shortcut location box, you’ll need to enter the correct command, which I’ve listed for you below.


Shutdown Computer

Shutdown.exe -s -t 00

Restart Computer

Shutdown.exe -r -t 00

Lock Workstation

Rundll32.exe User32.dll,LockWorkStation

Hibernate Computer

rundll32.exe PowrProf.dll,SetSuspendState

Sleep Computer

rundll32.exe powrprof.dll,SetSuspendState 0,1,0

When you’ve clicked next on the above dialog, you’ll be asked to name the shortcut. Probably best to name it according to the right function.


After you click Finish, you should now have a new icon that you can double-click to immediately shutdown, restart, or lock your computer.

Change Shortcut Icon

The default icon is really ugly, and if you want to have separate shortcuts for each function you might want to change the icon. Right-click on the icon and choose properties.


Click the Change Icon button, and then you can pick from the available icons in the system, or you can use the Browse button to pick an icon you downloaded off the web.


Note that you can drag them to your quick launch bar if you’d prefer to have them there.

And so ends the tale of the shutdown icons…

Lowell Heddings, better known online as the How-To Geek, spends all his free time bringing you fresh geekery on a daily basis. You can follow him on if you'd like.

  • Published 11/1/07

Comments (74)

  1. Dirk

    Thanx ! Great help for the less advanced geeks :-)

  2. Sherry


  3. Dan

    I don’t think these tips apply to just Vista. They should work in XP as well.

  4. Thilak

    Ok.. that will certainly help me. Similarly, can I create shortcut icon for hibernating?

  5. Enigma

    same as the lock workstation one except you use rundll32.exe PowrProf.dll, SetSuspendState for hibernate

  6. The Geek


    Thanks! I’ll add that one to the article.

  7. Enigma

    You might want to remove the space from it EG rundll32.exe PowrProf.dll,SetSuspendState

  8. Mike Watkins

    I’ve recently updated to Vista, and it’s been running fine except that it doesn’t
    allow me to use the ‘scan’ function fully for my All-in-one HP 2175. I loaded
    the original HP drivers which resulted in the system hanging so I removed them.
    Subsequently, if I leave a programme running on Vista (e.g anti-virus) on
    completion, Vista hibernates and on re-start the screen remains blank. Ctrl-Alt-Dlt
    doesn’t work and nor does anything else. Consequently I have to do power-off and
    restart thru’ blue screen. Any suggestions would be welcomed.

  9. Wm

    Thanks, I needed that (slap). There seems to be some discrepancy between your picture and the printed examples. Shutdown -s -t 01 or Shutdown.exe -s -t 00

  10. vietgiau, vo

    Thanks for your useful topic

  11. anon

    rundll32.exe powrprof.dll,SetSuspendState 0,1,0
    doesn’t work on my laptop that has Hybirid Hibernation off.
    How do I issue a sleep command in this case?

  12. anon

    To be exact it puts the laptop in Hibernation, and not in Sleep mode…

  13. Matt Bennett

    By the way this only works if you are admin or have admin rights to the computer you use it on. This does not work on a network machine with poweruser access. I don’t understand how i can click start menu, shutdown and restart. I can not setup a task to automaticaly reboot the computer at a specified time.(needed for nightly backup)it tells me that you do not have privileges to do this.

    Any comments would be appreciated.

    Thank you for your time!

  14. Aleeve

    lock is also done by auto shortcut: win+l

  15. Natovr

    nice… but I set the shutdown button to hibernate. I rarely shut down except to restart. I use the start menu for that :p Locking, I use windows key and L (at the same time). For sleep, I close my laptop screen, but I just lock if it’s plugged in. it doesn’t sleep when it’s plugged in ;)

  16. Jacob

    Or you can change the “Sleep Button” to “Shutdown Button”:

    go to “Control Panels” > “Power Options”
    “Change a plan’s settings”
    “Change Advanced Power Settings”
    “Power Buttons and Lid”
    “Start Menu Power Button”
    Change to “Shutdown”

  17. Joe Beaulaurier

    Would love to know where to find all the appropriate icons. Restart and sleep for example cannot be had within “…\system32\shell32.dll.”

  18. Bob

    Thanks, this really helped out a lot. It was a pain in the ass before!

  19. Leroy

    Where can I find the Restart icon?

  20. Will

    I typed in the links for the shortcuts and still says cannot be found.

  21. Catto

    Hey Now HowTo,

    This is just a great post. I’ve used this tip a few months back for shutdown. Now I find myself using this so much that I’m back for the hibernate shortcut. Very useful.

    Thanks for the info,

  22. Christovski

    @ Jacob “Or you can change the “Sleep Button” to “Shutdown Button” ”

    You made my day; that’s been bugging me since I switched to Vista. Thanks!

  23. jole

    have same problem as “anon”
    both sleep and hibernate comands put my laptop into hibernate mod. and i want it to be sleep.
    how can i fix that?

  24. Mary Hinge

    Here is a simpler solution! Use this gadget in the sidebar called “Vista Shutdown Control”

    Download from the link below, works perfectly!! Enjoy

  25. Tapesh


  26. andy

    I have Vista and i need i icons on my desktop arranged in a certain order. Every time i shut down the icons go back to some random order. Any way to fix this problem. Thanks so much.

  27. DAVE

    right click desktop n pick sort by “and tick something besides name”
    mine actually dont have “any checked” n i have icons along the bottom in windows vista n reboot n thley stay there “but once in a while playing games n changin screen resolution can mess up my icons “but had a program for xp im lookin into seeing if can get for vista that locked “my icons n let me save layout…and then if got messed up ya could click recycle bin
    n pick “a choice to reset to how they was “or save as are now”

  28. mishow

    how ican stop all attention
    and other qustion ” when i will do any thing the system ask me are
    you allow or cancel”
    do you have any method for this?

    with best regard!

  29. Johnny

    Thanks that was successful, but Can I remove the old one shutdown, restart, lock, etc menu? if “yes” I want them be remove if you have idea.


  30. Fred...

    Verry nice work! Thank you! 10/10 for you!

  31. kas

    Fantastic but can you create one for the log off?

  32. sachin

    great for when you want to sleep from remote desktop. thanks!

  33. Stuart

    I agree with Anon…the sleep command you listed seems to Hibernate. Via this method I have to hit the power button to start it up. Via the Built-in Win7 Sleep menu selection the keyboard can wake it.

  34. mayank madhur

    The above trick i tried in window XP, but unfortunately its not working.
    could you please help me.

    with warm regards,
    mayank madhur

  35. Claude

    If the sleep command hibernates the computer, just turn off hibernation: type “powercfg -h off” at the command prompt.

  36. archie

    MY Dell Inspiron under Win 7
    goes into HIBERNATE
    NOT sleep when I use your suggested command:

    rundll32.exe powrprof.dll,SetSuspendState 0,1,0

    Anyone know the correct code sequence for SLEEP ????

  37. Helen

    LogOff: (for someone ask about it above)
    Apply for Windows 7 (Vista maybe same, not sure ‘coz I don’t use it for quite long time)

    shutdown.exe /l /t 0 /F

    TurnOff (Windows 7) – personally in my PC it act like “shutdown /s /t 0 /F”, but post here ‘coz MS provides /p so it has to got some meaning…

    shutdown.exe /p /F

  38. Helen

    Even Hypernate can be done via shutdown /h /F without touch to rundll32.exe and PowerManagerment library PowrProf.dll… (for Windows 7, not sure about other.)

  39. Sunny

    I tried everything and could not make windows 7 to sleep on click of a shortcut key but then i created a macro on keyboard to repeat same sequence as i do when i manually put computer to sleep. it worked.

  40. Neva

    Just got a new computer w/Vista – also great help for us senior geeks. That said, am a long time keyboard user to and w/XP could go down w/Ctrl+Esc+U. Doesn’t work w/Vista. Can I tie the Desktop icon now with a keyboard function? Thanks.

  41. Seif

    I have a small lock on my icons what is this? and how can I get rid of it? please anyone tells me

  42. 0r1g1n

    For vista do something use the ” / ” instead of ” – “

  43. Bry

    sleep option doesnt work! it hibernates instead. i am using WIN 7 ULTIMATE

  44. Bry


    make a batch file for sleep. this should work…

    @echo off
    powercfg -h off
    rundll32.exe powrprof.dll,SetSuspendState 0,1,0
    powercfg -h on

  45. alex

    I have auto-hotkey too! [picture 1]

  46. bomis

    actualy i fked up my self to do that ….
    WTF -NOT working ((((
    trying every day …..

  47. Georgia

    I used to have one for my Windows XP..
    I’ve lost it due to the tech guy doing a clean install recently.

    Please post one for me to use.

    Thanks bunches.

  48. Sundi

    one note about using Hibernate via shutdown.exe that someone mentioned earlier–
    Careful using the -F switch, which will “force”/close all of your running applications before going into hibernate, which IMO takes away the purpose of using hibernate. I use hibernate so that I can just leave programs open and power the computer down (not use sleep mode)

  49. Krishnamoorthi

    Hai! I’m Krish.I see the website and this is very useful one.Thank You…..

  50. max

    The sleep icon isn’t working on windows 7? It just puts my laptop in to hibernation…

    And if you want all the normal icons the file path is %SystemRoot%\system32\SHELL32.dll

  51. kapil pipaliya

    Don’t use this long method. Only simply press Ctrl + Alt + End and Click Restart.
    –Thank you
    Kapil Pipaliya

  52. Dan

    You cant create an icon for the lock shortcut

  53. Elmer BeFuddled

    Thanks to the wonder of the T’Interweb, this came up as the first hit whilst I was having a “Blonde Moment” and couldn’t remember how to create a re-start shortcut.

    Thanks HTG

  54. will taylor

    can u create a abort code for the shutdown… i have one witch u can not click off its a fake joke trojan(harmless!!)

  55. Christopher Orrick

    thanks this helped me loads!!!

  56. agnieszka


    try stardock fences.

  57. Uewd

    To hibernate PC on Vista and 7, you can only type: shutdown -h

  58. someone

    tank u

  59. Tech

    I’ve used the desktop batch script to shutdown mi pc since I had win xp. Now that I changed to win 7 I use it too and it works (but not fine), because i’ve noticed that when I use it, the system doesn’t save the desktop configuration, so i have to shut down the pc the standard way.

  60. ap

    i got how to make the icon…but how could you make a personalized message that comes while shutting down

  61. wheelie

    The sleep command doesn’t work. It just puts the computer into hibernation

  62. John


  63. Faith

    Dear Geeks,
    I love your site! I use many of your tips…….
    & learn something new everyday here ..
    Keep on Geekin Me . Faith

  64. j-rok

    how about a ‘switch user’ code ???
    plz & thx

  65. Saurabh


    This work good on normal win7

    I have installed vmware 7.1 on my win 7 and now it takes too much time to shutdown, My USB internet does not work with if i connected it in between the win7 running, i have poweroff everytime and restart with my USB connected then only my USB internet works

    Win 7 is not getting shutdown quickly
    USB internet does not work if i connected when win 7 is already running.

    pls help

  66. LawaBoy

    Hi all,

    I just need to add that the “Lock” command will not work if you are on a domain. I’ve tried alot of stuff to make this work, but it seems that as long as the nettwork admins have deactivated the “Lock” for the computer(s). You cannot use the “run” command or hotkeys (windows + L).

    If anyone at all knows how to get around this problem, please post. :D

  67. david

    it dunt work, it asks me to add remote computer name

  68. toetoeaung

    thanks a lot!!!!

  69. venkata ramana

    this could be nice facility for people learning ABC’s of compters…..
    thnks for ur great work…..

  70. d.a. miller

    Your “shutdown”, “restart”, etc, HANG on my Win7-64bit. But so does Win7 shutdown, restart, hibernate.
    Is there something to get around the WORM called WINDOWS? I now have only reset key and power switch.

    By the way, I reinstalled Win last week after need to reformat C:, plus Norton 360.

  71. Salvatore

    Where do you find those commands? I’ve been looking for a shortcut to rotate screen (I know how to do it, I would just prefer a shortcut), if I could find the command for it, it would be much easier. Thanks in advance,


  72. AZAZ

    Dear Geeks,
    I love your site!
    AFTER RESTART the created shortcut icons for shutdown and restart disapear?
    can you help me

  73. adams

    how to remove shortcut,and save your machine safe without formating or rebooting your machine

  74. shaan

    If you dislike the new Windows Vista shutdown menu, you are probably in the majority. An alternative option is to create icons that will let you shut down, lock, or restart your computer without having to mess with that stupid popup menu.

More Articles You Might Like

Enter Your Email Here to Get Access for Free:

Go check your email!