3

Earlier I had Windows 8.1 installed on my PC. Then I installed Windows 10. I used to sleep the PC with the following code when I was using 8.1. enter image description here

but it doesn't work with 10; a CMD window flashes only for a second and nothing happen. How to overcome this issue?

edit: for @AFH 's request enter image description here

user152435
  • 139
  • 2
  • 5

2 Answers2

0

I don't know why this caused above problem, but I'm posting this answer as I found the answer from another person.
I corrected this issue and another one (not being able to rotate the screen with ctrl+alt+→, ←, ↓) by installing display driver for Windows 10. The motherboard's CD came with drivers which supported only for up to Windows 8, so it didn't work.

user152435
  • 139
  • 2
  • 5
-1

The command rundll32.exe powrprof.dll,SetSuspendState 0,1,0 for sleep is correct - however, it will hibernate instead of sleep if you don't turn the hibernation off.

Here's how to do that:

Go to the Start Menu and open an elevated Command Prompt by typing cmd.exe, right clicking and choosing Run as administrator. Type the following command:

powercfg -hibernate off

I got this from How can I put the computer to sleep from Command Prompt/Run menu? . Do your research.