Powercfg windows 7

MrX013

New member
Local time
8:22 PM
Messages
2
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

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

OS
64bit and 32 bit windows 7 pro and enterprize
Back
Top