Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a number of Scheduled Tasks running on a Windows machine, which is design to run stand alone and show useful information to the office.

Part of it's use is to run a screensaver that itself shows useful information.

There are some scheduled tasks which need to display information to the screen, however as the screensaver is running these messages can't be seen until the screensaver it manually deactivated.

How can the currently running screensaver in Windows be deactivated from command script?

share|improve this question
Just clear this to me. The new screensaver won't show up because there is already one running? – matan129 Jul 2 '13 at 11:01
What about "pressing spacebar" programmatically? – gronostaj Jul 2 '13 at 11:47
What are these tasks? Programs programmed by you? – Werner Henze Jul 8 '13 at 8:48
Yes, they're written by me – Peter Bridger Jul 9 '13 at 12:49

You can do this using PowerShell to move the mouse a pixel, deactivating the screensaver.

$Pos = [System.Windows.Forms.Cursor]::Position
[System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point((($Pos.X) + 1) , $Pos.Y)

You can also try a 3rd party program, such as AutoIt, which allows you to script mouse movements.

share|improve this answer
Unfortunately the simulated mouse approach didn't work :( – Peter Bridger Jul 8 '13 at 8:29
up vote 0 down vote accepted

I had a eureka moment, I was making the approach too complex. All that's needed is:

kill -processname XXXX

Where XXXX is the name of the screensaver process

share|improve this answer
Definitely not elegant, especially if the tasks are programs written by yourself. – Werner Henze Jul 8 '13 at 15:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.