- Local time
- 6:19 AM
- Posts
- 1,872
- Location
- The Lone Star State of Texas
- OS
- Windows 11 Pro 21H2 22000.778
Calling on all you cmd line gurus out there...I'm not too sharp using the cmd window. I have tried various methods to make a shortcut to sleep my PC. I finally got it to work by making a batch file and then making a shortcut to the batch file that I pinned to the taskbar. My problem is, the cmd window is left open after the cmd runs. Not too big of a deal but it irks me. What do I need to add at the end to make cmd automatically close after it runs. Here's the batch file.
powercfg -h off
rundll32.exe powrprof.dll,SetSuspendState 0,1,0
powercfg -h on
powercfg -h off
rundll32.exe powrprof.dll,SetSuspendState 0,1,0
powercfg -h on
My Computers
System One System Two
-
- OS
- Windows 11 Pro 21H2 22000.778
- Computer type
- PC/Desktop
- Manufacturer/Model
- Dell Optiplex 7080
- CPU
- i9-10900
- Memory
- 32 gb
- Monitor(s) Displays
- Benq 27
- Screen Resolution
- 2560x1440
- Hard Drives
- 256 m.2 2230-256+1 tb hdd
- PSU
- 500w
- Case
- MT
- Cooling
- Dell Premium
- Keyboard
- Logitech wired
- Mouse
- Logitech wireless
- Browser
- Firefox
- Antivirus
- Defender+MWB Premium
-
- Operating System
- Windows 10 Pro 21H2
- Computer type
- PC/Desktop
- Manufacturer/Model
- Dell Optiplex 9020
- CPU
- i7-4770
- Memory
- 24 gb
- Screen Resolution
- 2560x1440
- Hard Drives
- 256 gb Toshiba BG4 M.2 NVE SSB and 1 tb hdd
- PSU
- 500w
- Case
- MT
- Cooling
- standard
- Mouse
- Logitech wireless
- Keyboard
- Logitech wired
- Antivirus
- Defender+MWB Premium