Controlling screensaver/power setttings


  1. Posts : 11
    Win 7 Ultimate
       #1

    Controlling screensaver/power setttings


    I am looking for a way to programatically control the power settings (turn display off specifically). The reason is I have photo screensaver that I sometimes want on (like if I am in the room). Other times, I just want the PC to shut off the monitor.

    My question is is there a way to programatically change the power settings? I was thinking a batchfile or some shortcut or something. I know I can invoke the screensaver without waiting for it to kick in by executing the .SCR file, but I also want to shut off the display power off mode when I do so.
      My Computer


  2. Posts : 3,427
    Windows 10 Pro x64
       #2

    Hi there :) Welcome to the forums, Take a look at Nircmd I think that will do what you want: NirCmd - Windows command line tool
      My Computer


  3. Posts : 11
    Win 7 Ultimate
    Thread Starter
       #3

    Thanks for the response. That didn't do exactly what I wanted, but pointed me in the right direction. I found that if I create a power scheme, I can invoke it with %windir%\system32\powercfg.exe /SETACTIVE schemename.

    A simple batchfile can invoke a power scheme that doesn't put the monitor/pc to sleep and start the screensaver. Another batchfile will restore the computer to sleep.
      My Computer


  4. Posts : 3,427
    Windows 10 Pro x64
       #4

    that was actually going to be my next suggestion. Glad you got it sorted anyway :)
      My Computer


  5. Posts : 11
    Win 7 Ultimate
    Thread Starter
       #5

    SetActive actually takes a GUID, not a scheme name (you can find the guid in the registry). However, there are lots of other options that can be set individually:

    -change settingvalue
    -x setting value
    Modifies a setting value in the current power scheme.
    Usage:
    powercfg–x setting value
    setting
    Specifies one of the following settings:
    -monitor-timeout-ac minutes
    -monitor-timeout-dc minutes
    -disk-timeout-ac minutes
    -disk-timeout-dc minutes
    -standby-timeout-ac minutes
    -standby-timeout-dc minutes
    -hibernate-timeout-ac minutes
    -hibernate-timeout-dc minutes
    value
    Specifies the value in minutes.
    Example:
    powercfg-change-monitor-timeout-ac5
    This sets the monitor idle timeout value to five minutes when operating on AC power.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 19:39.
Find Us