Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Powercfg windows 7


30 Nov 2010   #1

64bit and 32 bit windows 7 pro and enterprize
 
 
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 System SpecsSystem Spec
.

01 Dec 2010   #2

64bit and 32 bit windows 7 pro and enterprize
 
 
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 System SpecsSystem Spec
Reply

 Powercfg windows 7




Thread Tools



Similar help and support threads for2: Powercfg windows 7
Thread Forum
How can I determine what are the errors in powercfg-report? Performance & Maintenance
Modify links in Powercfg.cpl Performance & Maintenance
Solved Two versions of powercfg.exe General Discussion
Sleep option disabled in powercfg.cpl General Discussion
Hibernate not available after powercfg -h on General Discussion
powercfg Flashes for a sec and then is gone? Help! General Discussion

Our Sites

Site Links

About Us

Find 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 12:24 PM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33