• How to create shutdown, sleep and restart icons for the desktop

    Home » Forums » AskWoody support » Windows » Windows 11 » Windows 11 version 24H2 » How to create shutdown, sleep and restart icons for the desktop

    • This topic has 6 replies, 5 voices, and was last updated 5 months ago.
    Author
    Topic
    #2726588

    In Windows 10 I was able to easily create shutdown, sleep and restart icons for the desktop. I found an instruction on the Dell site on how create a shutdown icon for both Win 10 and Win 11, but the command that they say to use is slightly different than the one I’ve used. And although briefly Googling turned up some instructions for sleep and restart, the difference already mentioned makes me unsure enough that I thought I’d better ask here. (I don’t want to break anything.)

    Here’s the way I created a shutdown icon in Win 10:

    1. Right-click the Desktop
    2. New | Shortcut
    3. Type “Shutdown.exe /s /t 00” — without the quotation marks
    4. Type name of the shortcut | Finish

    For restart and sleep, the method is the same, with slightly different commands, as follows:

    • Restart: Shutdown.exe /r /t 00
    • Sleep: rundll32.exe powrprof.dll,SetSuspendState 0,1,0

    The Dell site is here: https://www.dell.com/support/kbdoc/en-sg/000123375/how-to-create-a-shutdown-button-for-windows-8-or-windows-10

    Notwithstanding the language in the URL, the instructions say that they apply to Win 11. Their command for shutdown is: “shutdown /s /t 0”

    That is, no “.exe” and only a single “0” at the end.

    I’d appreciate advice on the proper way to create all three icons in Windows 11.

    Thanks.

    1 user thanked author for this post.
    Viewing 3 reply threads
    Author
    Replies
    • #2726590

      Windows doesn’t actually require the .exe part of a command for it to run so shutdown or shutdown.exe both work.

      As for the /t 0, the help screen for shutdown.exe shows this:

      /t xxx

      Set the time-out period before shutdown to xxx seconds.
      The valid range is 0-315360000 (10 years), with a default of 30.
      If the timeout period is greater than 0, the /f parameter is implied.

      So, regardless of whether you use a single zero or multiple zeros, it should still work.

      1 user thanked author for this post.
    • #2726706

      For the full story:

      Shutdown.exe /?

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • #2727202

      For restart and sleep, the method is the same, with slightly different commands, as follows: Restart: Shutdown.exe /r /t 00 Sleep: rundll32.exe powrprof.dll,SetSuspendState 0,1,0

      Would love a Sleep Shtcut BUT the Sleep Script puts my W10 22H2 desktop to – OFF – = Shutdown. Verified in another article same Sleep Setup but desktop Power Light goes Dark (vs  Flashing) & no key-press changes anything.

      NOT a big deal but has Anyone else tried Sleep? Maybe 0,1,0 might need an Edit to succeed?

      W10 Pro 22H2 / Hm-Stdnt Ofce '16 C2R / Macrium Pd vX / GP=2 + FtrU=Semi-Annual + Feature Defer = 1 + QU = 0

    • #2727270

      Would love a Sleep Shtcut BUT the Sleep Script puts my W10 22H2 desktop to – OFF – = Shutdown.

      Have you looked in your BIOS? If Power Saving Mode is on in BIOS this will prevent Sleep mode from running and revert directly to shutdown.

      If not, then run Windows Power Troubleshooter.

      HTH, Dana:))

      • #2727308

        Have you looked in your BIOS? If Power Saving Mode is on in BIOS this will prevent Sleep mode from running and revert directly to shutdown.

        Thanks, but I use SLEEP all of the time – including overnight – via 3-mouse-clks in Start/Power. A desktop Dbl-Clk is a little simpler – Saves mis-Clks of Shutdown – etc. I’ll just live with the regular.

        W10 Pro 22H2 / Hm-Stdnt Ofce '16 C2R / Macrium Pd vX / GP=2 + FtrU=Semi-Annual + Feature Defer = 1 + QU = 0

        • #2727453

          Solved. Saw an article about Having a CMD Prompt net Sleep BUT having to DISABLE HIBERNATION to do it.

          I used [ powercfg -h off ] in an Admin Cmd Prompt and I NOW get a Flashing Power light = Sleep.

          W10 Pro 22H2 / Hm-Stdnt Ofce '16 C2R / Macrium Pd vX / GP=2 + FtrU=Semi-Annual + Feature Defer = 1 + QU = 0

    Viewing 3 reply threads
    Reply To: How to create shutdown, sleep and restart icons for the desktop

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: