powercfg command and random GUID with setactive help windows 7


  1. Posts : 90
    Windows 7 x64, ultimate/pro/home, SLES x86 & ia64
       #1

    powercfg command and random GUID with setactive help windows 7


    in windows 7 i created a power plan and exported it as 'custom.pow' with the powercfg command.
    I'm trying to create a .bat file using powercfg, such as
    > powercfg -import %CD%\custom.pow
    > powercfg -setactive <GUID>

    the catch is the setactive flag wants a GUID and not the file custom.pow.
    what I've done so far is run powerfg import manually on a system and generated a random GUID, then copied that GUID into my script. Is that ok to do in the long run?
    or is there a better way to do it?
    i don't know how to take the output of the "powercfg -import" command that gives me the random GUID and use that in the following "powercfg -setactive" command.
      My Computer


  2. Posts : 5,092
    Windows 7 32 bit
       #2

    If I read powercfg command line switches help correctly
    http://technet.microsoft.com/en-us/l...(v=ws.10).aspx

    the -list switch should give you the guid for a scheme and the
    -duplicatescheme switch should give you a new guid for example, to change one setting or whatnot.

    But I haven't messed with it. I'm just going by the info on the page.
      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 02:14.
Find Us