实现笔记本拔除电源后修改屏幕缩放比例

实现修改屏幕缩放比例

https://github.com/imniko/SetDPI

上面链接中,使用SetDpi.exe可以实现修改屏幕缩放比例,命令如下:

SetDpi.exe 150 //修改比例为150
SetDpi.exe 100 //修改比例为100

使用任务计划程序实现功能

 

 

 

 

电源拔出(经过验证):

<QueryList>
  <Query Id="0" Path="System">
    <Select Path="System">*[System[Provider[@Name='Microsoft-Windows-Kernel-Power'] and (Level=4 or Level=0) and Task = 100 and (EventID=105) and Security[@UserID='S-1-5-18']]] and *[EventData[Data[@Name='AcOnline']='false']]</Select>
  </Query>
</QueryList>

 电源插入(未验证):

<QueryList>
  <Query Id="0" Path="System">
    <Select Path="System">*[System[Provider[@Name='Microsoft-Windows-Kernel-Power'] and (Level=4 or Level=0) and Task = 100 and (EventID=105) and Security[@UserID='S-1-5-18']]] and *[EventData[Data[@Name='AcOnline']='true']]</Select>
  </Query>
</QueryList>

 参考:https://www.bilibili.com/read/cv3594573/

 

 

posted @ 2021-12-24 10:08  张泽果  阅读(244)  评论(0编辑  收藏  举报