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
MrX013

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
MrX013

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
Thread Forum
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....
General Discussion
Hyberfil.sys Won't Stay Off After powercfg -h off, Disable in CP
I have turned of Hybrid Sleep, Hibernation in Control Panel. I have run "powercfg -h off" with Administrative Privileges. I am using Windows 7 Ultimate 64. I can delete hyberfil.sys after the above, but as soon as I reboot it is back. Can anyone help? Many thanks,
Performance & Maintenance
Two versions of powercfg.exe
I'm running Windows 7 Pro x64 SP1. I found that I have two different versions of powercfg.exe and that a different one runs depending on whether I'm in cmd.exe or a certain other shell. As you can see below, the executables have different file sizes and timestamps, though the file details show...
General Discussion
Hibernate not available after powercfg -h on
I have a brand new desktop machine in my office, running enterprise 64 bit version of windows 7. i read that to enable hibernation, you need to run powercfg -h on from elevated command prompt. I did that, do a logoff, restart, shutdown, but it's still not appearing. what am i missing?
General Discussion
powercfg Flashes for a sec and then is gone? Help!
When ever I type powercfg -availablesleepstates into the searchbar area when you press the start button, it flashes for a millisecond and then dissappears. I'm trying to see my available sleep states for my computer but I can't seem to have on my screen long enough to read it. 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 05:29.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App