Block screensaver

戏子无情 提交于 2019-12-07 07:51:16

问题


Could you provide simple approach to block screensaver and prevent locking computer.
I need this for running automation tests and I have no rights to change this on local machine due to global computer locking company policy.


回答1:


here's mouseJiggler

Mouse Jiggler is a very simple piece of software whose sole function is to "fake" mouse input to Windows, and jiggle the mouse pointer back and forth.

Useful for avoiding screensavers or other things triggered by idle detection




回答2:


a windows system? I did on Windows 2008 R2:

  • use notepad.exe to create c:\temp\idle.vbs
  • paste code Dim objResult Set objShell = WScript.CreateObject("WScript.Shell")
    i = 0; Do While i = 0 objResult = objShell.sendkeys("{NUMLOCK}{NUMLOCK}") Wscript.Sleep (60000) Loop
  • every 60 seconds, this script "press" numlock twice
  • run the script C:\Windows\System32\cscript.exe c:\temp\idle.vbs

Additonal you can create a new Shortcut, paste the command line and set to "run minimized", camouflagethe icon to explorer or other stuff.



来源:https://stackoverflow.com/questions/8354555/block-screensaver

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!