Stop currently running Windows screensaver from command line












3















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


















  • 1





    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
















3















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


















  • 1





    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














3












3








3








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














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?







windows command-line screensaver






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jul 2 '13 at 10:47









Peter BridgerPeter Bridger

199310




199310








  • 1





    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














  • 1





    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








1




1





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





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 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





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





Yes, they're written by me

– Peter Bridger
Jul 9 '13 at 12:49










4 Answers
4






active

oldest

votes


















3














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



















2














The correct syntax would be:



taskkill /im PhotoScreensaver.scr /f


With of course the correct name of the running screensaver, which in my case is PhotoScreensaver.scr






share|improve this answer































    1














    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



















    0














    I found a nice way of doing this here. This moves the cursor to position 0,0 which on my Windows 10 system brings the computer out of the screensaver. Works great in a batch file.



    rundll32 user32.dll,SetCursorPos





    share|improve this answer























      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "3"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f614561%2fstop-currently-running-windows-screensaver-from-command-line%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      4 Answers
      4






      active

      oldest

      votes








      4 Answers
      4






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      3














      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
















      3














      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














      3












      3








      3







      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













      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












      share|improve this answer



      share|improve this answer










      answered Jul 2 '13 at 12:45









      Jeff VanNieulandeJeff VanNieulande

      1742




      1742













      • Unfortunately the simulated mouse approach didn't work :(

        – Peter Bridger
        Jul 8 '13 at 8:29



















      • Unfortunately the simulated mouse approach didn't work :(

        – Peter Bridger
        Jul 8 '13 at 8:29

















      Unfortunately the simulated mouse approach didn't work :(

      – Peter Bridger
      Jul 8 '13 at 8:29





      Unfortunately the simulated mouse approach didn't work :(

      – Peter Bridger
      Jul 8 '13 at 8:29













      2














      The correct syntax would be:



      taskkill /im PhotoScreensaver.scr /f


      With of course the correct name of the running screensaver, which in my case is PhotoScreensaver.scr






      share|improve this answer




























        2














        The correct syntax would be:



        taskkill /im PhotoScreensaver.scr /f


        With of course the correct name of the running screensaver, which in my case is PhotoScreensaver.scr






        share|improve this answer


























          2












          2








          2







          The correct syntax would be:



          taskkill /im PhotoScreensaver.scr /f


          With of course the correct name of the running screensaver, which in my case is PhotoScreensaver.scr






          share|improve this answer













          The correct syntax would be:



          taskkill /im PhotoScreensaver.scr /f


          With of course the correct name of the running screensaver, which in my case is PhotoScreensaver.scr







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 16 '16 at 10:31









          Batchz4lifeBatchz4life

          316




          316























              1














              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
















              1














              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














              1












              1








              1







              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















              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














              share|improve this answer



              share|improve this answer








              edited Jul 8 '13 at 15:42

























              answered Jul 8 '13 at 8:30









              Peter BridgerPeter Bridger

              199310




              199310













              • Definitely not elegant, especially if the tasks are programs written by yourself.

                – Werner Henze
                Jul 8 '13 at 15:56



















              • Definitely not elegant, especially if the tasks are programs written by yourself.

                – Werner Henze
                Jul 8 '13 at 15:56

















              Definitely not elegant, especially if the tasks are programs written by yourself.

              – Werner Henze
              Jul 8 '13 at 15:56





              Definitely not elegant, especially if the tasks are programs written by yourself.

              – Werner Henze
              Jul 8 '13 at 15:56











              0














              I found a nice way of doing this here. This moves the cursor to position 0,0 which on my Windows 10 system brings the computer out of the screensaver. Works great in a batch file.



              rundll32 user32.dll,SetCursorPos





              share|improve this answer




























                0














                I found a nice way of doing this here. This moves the cursor to position 0,0 which on my Windows 10 system brings the computer out of the screensaver. Works great in a batch file.



                rundll32 user32.dll,SetCursorPos





                share|improve this answer


























                  0












                  0








                  0







                  I found a nice way of doing this here. This moves the cursor to position 0,0 which on my Windows 10 system brings the computer out of the screensaver. Works great in a batch file.



                  rundll32 user32.dll,SetCursorPos





                  share|improve this answer













                  I found a nice way of doing this here. This moves the cursor to position 0,0 which on my Windows 10 system brings the computer out of the screensaver. Works great in a batch file.



                  rundll32 user32.dll,SetCursorPos






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Feb 3 at 19:55









                  Chuck ClaunchChuck Claunch

                  1012




                  1012






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Super User!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f614561%2fstop-currently-running-windows-screensaver-from-command-line%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Index of /

                      Tribalistas

                      Listed building