Powercfg windows 7


  1. Posts : 2
    64bit and 32 bit windows 7 pro and enterprize
       #1

    Powercfg windows 7


    Ok i have a question I am trying to write a script that will import and set the active power scheme in windows 7

    here is my script

    @echo off
    Echo This script will install the power settings for a system Imaged with Windows 7

    if /I "%computername:~0,6%"=="Computername" goto :2
    :2
    Net Use V: "Server share"
    copy "v:\configs\Laptoppowerw7.pow" C:\
    powercfg import "c:\LaptopPowerW7.pow" 0016fea0-3f62-009a-5e28-25007c219azz
    Powercfg /setactive 0016fea0-3f62-009a-5e28-25007c219azz
    powercfg -changename 0016fea0-3f62-009a-5e28-25007c219azz "Laptops Windows 7"
    del c:\Laptoppowerw7.pow
    net use r: /delete /yes
    net use v: /delete /YES
    exit

    :1
    Net Use V: "server share"
    copy "v:\configs\desktopW7.pow" C:\
    powercfg import "c:\desktopw7.pow" 0016fea0-3f62-009a-5e28-25007c219azz
    Powercfg /setactive 0016fea0-3f62-009a-5e28-25007c219azz
    powercfg -changename 0016fea0-3f62-009a-5e28-25007c219azz "Desktop Windows 7"
    del c:\desktopw7.pow
    net use r: /delete /yes
    net use v: /delete /YES
    exit

    Can you name the GUID in windows 7? In a nutshell I want the imported scheme from the file to have this GUID 0016fea0-3f62-009a-5e28-25007c219azz
    but everytime I import the file the GUID is diffrent which ruins the rest of the batch file

    Thanks for any help
      My Computer


  2. Posts : 2
    64bit and 32 bit windows 7 pro and enterprize
    Thread Starter
       #2

    Figured it out


    ok i figured it out it was not importing the scheme right

    powercfg import "c:\LaptopPowerW7.pow" 0016fea0-3f62-009a-5e28-25007c219azz

    aparently this can not have a zz at the end of the scheme line and the import needs a dash in front of it not a slash

    so it needed to look like this

    powercfg -import "c:\LaptopPowerW7.pow" 0016fea0-3f62-009a-5e28-25007c219a03

    oh well live and learn
      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:11.
Find Us