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.

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

.bator.cmdto really execute the file with cmd.exe? – LotPings Aug 12 '17 at 14:43cmdto see if there are any error messages; or add apauseto the batch file. – AFH Aug 12 '17 at 14:58