批处理脚本以关闭监视器? [英] batch script to turn off monitor?

查看:119
本文介绍了批处理脚本以关闭监视器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Win-7上测试了这两个命令:

I've tested these two commands on Win-7 :

powercfg.exe -x -monitor-timeout-ac 0
powercfg.exe -change -monitor-timeout-ac 0

他们已经成功关闭了我的显示器.我知道它们是相同的,但是哪一个更好并且与所有Windows版本兼容?此脚本在Win 10上可以正常运行,并且不需要管理员权限吗?

They've successfully turned off my monitor. I know they are the same but which one is better and compatible with all Windows editions? will this script work fine on Win 10 and without asking for admin right ?

推荐答案

Windows 10 的cmd行中,我运行powercfg /?

From Windows 10's cmd line, I run powercfg /?

/CHANGE,/X修改当前电源使用方案中的设置值.

/CHANGE, /X Modifies a setting value in the current power scheme.

/X/CHANGE都是有效的开关,当我在 Windows 10 上运行时,这表明它可以正常工作.

Both /X and /CHANGE are valid switches and seeing as I ran this is on Windows 10 it means it will work.

此外,尽管使用-作为有效的开关激活器,但您也可以使用/,这是Windows的默认设置:

Also, though using - as a valid switch activator, you can also use / which is a windows default:

powercfg.exe /change /monitor-timeout-ac 0

这篇关于批处理脚本以关闭监视器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆