bigdoing
V2EX  ›  问与答

win 10 锁屏之后,如何快速关闭显示器

  •  
  •   bigdoing · May 27, 2022 · 1584 views
    This topic created in 1471 days ago, the information mentioned may be changed or developed.

    直接关显示器,会导致 usb c 停止给笔记本充电 放一晚上,就没电了

    4 replies    2022-05-28 19:35:12 +08:00
    ysc3839
        1
    ysc3839  
       May 27, 2022
    电源选项里有个 Console lock display off timeout ,最短可以设置成 1 分钟
    darklights
        2
    darklights  
       May 27, 2022
    新建一个 TurnOffMonitor.ps1 ,输入内容:
    Start-Sleep 2; (Add-Type '[DllImport("user32.dll")]public static extern int SendMessage(int hWnd, int hMsg, int wParam, int lParam);' -Name a -Pas)::SendMessage(-1,0x0112,0xF170,2) | Out-Null

    新建一个计划任务
    触发器:工作站锁定时
    操作:启动程序:powershell.exe ( pwsh.exe ),参数:-File "C:\somewhere\TurnOffMonitor.ps1" -NonInteractive -NoProfile

    如无意外,锁屏两秒后关闭显示器。
    bigdoing
        3
    bigdoing  
    OP
       May 27, 2022 via iPhone
    感谢老铁,
    有没有办法,在锁屏的时候,按一个键,手动触发,关闭显示器
    Overfill3641
        4
    Overfill3641  
       May 28, 2022
    Win10 锁屏默认 1 分钟后息屏。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1352 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 67ms · UTC 17:11 · PVG 01:11 · LAX 10:11 · JFK 13:11
    ♥ Do have faith in what you're doing.