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: Importing and activating power settings without Group Policy

14 Jul 2010   #1

Win 7 64 Bit
Importing and activating power settings without Group Policy

I have a problem which is giving me a headache. Hopefully someone out there knows a way round.
Basically we are looking to roll out Win 7 64 bit in my company and are currently working on some test models. (At present we use all XP and Server 2003)
I am building a few test machines and want to find a way to standarize the power settings without having the power settings GPO as (as far as I can tell) that is only available on Server 2008.
So far I have created a new settings scheme called powertest.pow and exported it to a central network location.
I can then have other machines import it easily anough by script.
Then I get stuck. I can only find a way to activate .pow by GUID rather than friendly name and each time the powertest.pow is imported on a new PC it generates a new and unique GUID.
If I could activate the .pow by friendly name this would be easy, but this doesn't seem to be possible (?). So - what next? Do I need to somehow query the registry, extract the GUID, and then use that to activate my scheme? If so, how? And is it scriptable?
Thanks in advance for any help or advice that might be out there.

My System SpecsSystem Spec
14 Jul 2010   #2

Windows 7 Ultimate x64

I can't give you a definitive answer, but I do know that somewhere in the registry the name must be mapped to the GUID. If you search the registry for the power settings name you should be able to find where that is stored. From there it shouldn't be a hard thing to grab the GUID and use it.

The only other possibility is that all of the power settings are stored in one place in the registry and you could just iterate over all of the settings until you found the one with the right name and apply that one.

Hope these ideas give you a push in the right direction.
My System SpecsSystem Spec
15 Jul 2010   #3

Win 7 64 Bit

My previous reply appears not to have been posted so i'll try again: apologies if they now both come up.
Thanks for your response. I was leaning in that direction myself. All the information you mention is avilable in the registry. Under HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Power\User\PowerSchemes all the power schemses are listed by GUID, and within each subkey the Power scheme friendly name is listed as data.
it's basically the same information you can get from powercfg /l .
What i don't know how to do though is set up a way to automatically acquire this information for each new PC going forward. it will be easy to remotely set which power schem e hould be active remotely with the relevant GUIDs but if i have to manually go and get the GUIDs each time it will sort of defeat the point.
My System SpecsSystem Spec

16 Jul 2010   #4

Windows 7 Ultimate x64

What you need to do is write a script that queries the registry for all of the power schemes. Once you have that data set, check each one of them for the proper "friendly name" and grab the GUID for that and then apply that scheme.

Sorry I don't have any sample code for you to check out, but hopefully Google can provide that for you.
My System SpecsSystem Spec
16 Jul 2010   #5

Win 7 64 Bit

OK. thanks for the help and advice.
Time to get better at scripting I suppose...
My System SpecsSystem Spec
16 Jul 2010   #6

Win 7 64 Bit

This is actually much simpler than I thought it was.
For those trying to do the same thing, don't take the path I took. Importing pre-defined .pow schemes and trying to activate them is barking up the wrong tree.
What you can do instead it have a very simple .bat which copies one of the default powerschemes (as their GUIDs are the same on every single Win 7 machine), rename it and then change the configs by script. Same result as what i set out trying to do and so much easier.
Here is an example of the script you could use:

POWERCFG -DUPLICATESCHEME 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635d
POWERCFG -CHANGENAME 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635d "Superdupertest1"
POWERCFG -SETACTIVE 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635d
POWERCFG -Change -monitor-timeout-ac 0
POWERCFG -CHANGE -monitor-timeout-dc 0
POWERCFG -CHANGE -disk-timeout-ac 0
POWERCFG -CHANGE -disk-timeout-dc 0
POWERCFG -CHANGE -standby-timeout-ac 0
POWERCFG -CHANGE -standby-timeout-dc 0
POWERCFG -CHANGE -hibernate-timeout-ac 0
POWERCFG -CHANGE -hibernate-timeout-dc 0
My System SpecsSystem Spec
29 Aug 2011   #7

Windows 7 Enterprise x64

Another way to do it is to you the optionnal arguement of the "IMPORT" trigger and set a GUID to use when you import your .POW file

EX: powercfg /import c:\Some_File.pow FFFFFF-DDDD-CCCC-BBBB-000123456789

Using this technique you still use the GUID but you can set it to something that is somewhat useable.
My System SpecsSystem Spec

 Importing and activating power settings without Group Policy

Thread Tools

Similar help and support threads
Thread Forum
How to fix Group Policy not applying for Sleep Settings?
Our GP settings for our Power Options are set to 'Never" sleep on all our Windows 7 machines. All our GP settings apply perfectly on our Dell desktops and have never had any issues until now. We've ordered newer Dell desktops but still running Win 7. Once I place them on the domain and move...
General Discussion
Group Policy Settings Reference for Windows Group Policy Settings Reference for Windows (Vista & 7) and Windows Server (November 05, 2013 refresh) These spreadsheets list the policy settings for computer and user configurations that are...
Performance & Maintenance
Group Policy Settings - Blocked Downloads
First, I wish to thank you guys for this very awesome board, I know I will have fun learning all the stuff I do not know already about computers, tweaks, and what not. My Question, and forgive me for putting it here, I had no idea where else to put it, I thought about tutorials, but I know this...
General Discussion
Group Policy Settings - Force Update in Windows
How to Force Group Policy Updates to be Applied Instantly in Windows After you make changes to group policies, you may want the changes to be applied immediately, without waiting for the default update interval (90 minutes on domain members and 5 minutes on domain controllers) or without...

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 08:43.
Twitter Facebook Google+