当年有篇老外的文档提到这种方法,现在找不到原始出处了。当时主要是有些笔记本看似黑屏,屏幕却亮光状态并不是真正关闭,所以用这种方法在锁屏时直接关闭屏幕。
Turn_Off_Monitor_and_Lock_Computer.cmd
@
echo off
nircmdc.exe cmdwait 1000 monitor off
rundll32.exe user32.dll,LockWorkStation
Add_Lock-Computer_Turn_Off_Monitor_to_Context_Menu.reg
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Lock Computer and Turn Off Monitor]
"icon"="imageres.dll,-101"
"Position"="Top"
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Lock Computer and Turn Off Monitor\command]
@="Turn_Off_Monitor_and_Lock_Computer.cmd"