A
A
Alexander2018-10-21 15:10:45
cmd/bat
Alexander, 2018-10-21 15:10:45

Turn off monitor after n seconds instead of minutes?

I threw a batch file

@echo off
timeout 1800
TASKKILL /f /IM chrome.exe /t
powercfg /change monitor-timeout-ac 1
timeout 65
powercfg /change monitor-timeout-ac 0

We launch something at night to look in chrome and fall asleep under this business.
After half an hour, we cut down the chrome, set the power parameters to turn off the display after 1 MINUTE , wait 60 seconds - the monitor is cut down, change the parameter back to "never turn off". Some scripts are executed in the background. Moved the mouse in the morning - everything works.
Attention is a question!
Is it possible to set the shutdown after 1 SECOND or instantly?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Saboteur, 2018-10-21
@saboteur_kiev

1. You can call www.nirsoft.net/utils/nircmd.html
nircmd.exe monitor off
2. You can write a script in powershell like
Or take a look at this
https://gist.github.com/oledid/fb02951b6b1848d1418d

E
Ezhyg, 2018-10-21
@Ezhyg

There's no such thing.
I use:

"nirsoft_package\NirSoft\x64\nircmd.exe" monitor off

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question