Solved any way to add shortcut icon for sleep and shutdown?

rocketman122

New member
Member
VIP
Local time
10:23 AM
Messages
106
I think the start menu way of putting pc to sleep or shutdown is annoying. was wondering if I could add desktop shortcuts to activate one or the other?
 

My Computers My Computers

  • At a glance

    win 7 pro 648320fx8gbgtx 660
    Computer type
    PC/Desktop
    Computer Manufacturer/Model Number
    custom
    OS
    win 7 pro 64
    CPU
    8320fx
    Memory
    8gb
    Graphics Card(s)
    gtx 660
    Hard Drives
    ssd hdd
    Antivirus
    none
  • Computer type
    PC/Desktop
Last edited:

My Computer My Computer

At a glance

64-bit Windows 11 Pro for WorkstationsIntel i7-8700K OC'd to 5 GHz64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600...ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
thanks for the quick reply. alt f4 doesnt work since its a quick setting for mute audio I set.

downloaded both files. the sleep button.vbs shuts down pc. it doesnt goto sleep. but the shutdown window(that gives options) doesnt help me. its the same thing as me pressing start and choosing what I need. I want a double click icon and be done with it. I really dislike software where theres an excess of clicks. its inneficient UI.

is there a KB shortcut for sleep? at least i have a shutdown icon I can double click. thank you. does it also work in w10, I want to use with my other offline pc.
 

My Computers My Computers

  • At a glance

    win 7 pro 648320fx8gbgtx 660
    Computer type
    PC/Desktop
    Computer Manufacturer/Model Number
    custom
    OS
    win 7 pro 64
    CPU
    8320fx
    Memory
    8gb
    Graphics Card(s)
    gtx 660
    Hard Drives
    ssd hdd
    Antivirus
    none
  • Computer type
    PC/Desktop
As a test, try creating a Sleep shortcut using the command below instead.

Sleep Computer in Windows 11 Tutorial | Windows 11 Forum

Code:
powershell.exe -Command "& {Add-Type -Assembly System.Windows.Forms;[System.Windows.Forms.Application]::SetSuspendState('Suspend', $false, $false)}"
 

My Computer My Computer

At a glance

64-bit Windows 11 Pro for WorkstationsIntel i7-8700K OC'd to 5 GHz64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600...ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
YES!! added that line to command prompt and it put it to sleep! awesome!

how can I make a shortcut of it?
 

My Computers My Computers

  • At a glance

    win 7 pro 648320fx8gbgtx 660
    Computer type
    PC/Desktop
    Computer Manufacturer/Model Number
    custom
    OS
    win 7 pro 64
    CPU
    8320fx
    Memory
    8gb
    Graphics Card(s)
    gtx 660
    Hard Drives
    ssd hdd
    Antivirus
    none
  • Computer type
    PC/Desktop
Great news. You can use the same command as the target location when creating the shortcut.
 

My Computer My Computer

At a glance

64-bit Windows 11 Pro for WorkstationsIntel i7-8700K OC'd to 5 GHz64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600...ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
On my Windows 7 machine, all it takes is shutdown /s... though it does result in a "Warning: The computer will power off in less than a minute" dialog and a delay.

That's what I use in the batch file which backs the power button shortcut in my taskbar which runs WinSCP to back up my save files, then uses a VBScript to blink the Scroll Lock LED to toggle the KVM switch back to my Linux machine, and then runs shutdown /s to power the system off. (Yeah, it's a hack to work around the machine only having Windows 7 Home Premium and, thus, ignoring all my efforts to work around the lack of Group Policy Editor to set up on-shutdown scripts.)
 

My Computers My Computers

  • At a glance

    Windows 7 Home Premium Service Pack 1 64-bitIntel Core i3-2120 3.30GHz8.00 GBAMD Radeon HD 5870
    Computer type
    PC/Desktop
    Computer Manufacturer/Model Number
    HP Pavilion p7-1203
    OS
    Windows 7 Home Premium Service Pack 1 64-bit
    CPU
    Intel Core i3-2120 3.30GHz
    Motherboard
    (OEM)
    Memory
    8.00 GB
    Graphics Card(s)
    AMD Radeon HD 5870
    Sound Card
    (Realtek onboard)
    Monitor(s) Displays
    HP 2210m
    Screen Resolution
    1920x1080
    Hard Drives
    1TB WD Blue SATA SSD (SanDisk SSD G5 BICS4: 1000.2 GB)
    PSU
    Seasonic M12 II Bronze EVO Edition
    Case
    (OEM)
    Cooling
    (OEM)
    Keyboard
    Rosewill RK-9000I
    Mouse
    Logitech G203 Prodigy
    Internet Speed
    Irrelevant (blocked)
    Antivirus
    None (This gaming machine is blocked from Internet Access)
    Browser
    Firefox 115.0.2 64-bit (Used only with miniserve on LAN)
    Other Info
    Because the motherboard in this hand-me-down can't take more than 8GB of RAM, this machine is a "games console, except not a console" and is KVM-switched together with the triple-head Ryzen I daily drive.

    Also, the CPU cooler fan and chassis fan have been replaced with equivalent Noctua fans.
  • Computer type
    PC/Desktop
Back
Top