Windows 7 Power Plan Settings

Clanger

Moderator
Staff member
This topic will cover windows 7 power plan settings that can be added to the installation routine or post setup/after 1st logon with a batch or cmd file.

Windowsafg has a great online power plan configurator which saves its output as a downloadable batch file or you can just copy the code it generates. Although the generator shows you the names of the settings, its output doesnt so you dont know which line does what.

You may want to create a full custom configuration or just change a few specific settings. Luckily enough, by using a few weird settings, i have found the configurator outputs in the same order as the items are displayed.

Some values are zero to 3, some are percentages and others are in seconds(even though you set the values by minutes). Ignore the setting values in bold red, they are what i used to identify the settings.

Go to the configurator web page. Generate a complete custom file or just change the settings you require. Download the file or copy the code to a new text, bat or cmd file. Saving the web page may help too(it did for me)

Each category has 2 settings, AC for mains power, DC for battery and they are in AC and DC order. Carefully compare the lists below to the downloaded/copied code and you should quickly be able to find the required values.

The list will contain settings for all 3 power plans, i will add Power Saver and High Performance plans one at a time.

Note - No1 - Minimum processor state: (%) and Maximum processor state:
These are the settings that Window uses to park cores(core parking). You can see parked cores using Task Manager - Resource Monitor - CPU.
Setting the Minimum state to 100(%) will stop Windows parking cores but it will not stop the processor from throttling itself, you will need AMD OverDrive(for Socket AM3+ and below and Socket FM2+ and below) and AMD Ryzen Master(for Socket AM4) to do that. Set the multiplier to the required number. I dont know what tool you would use with an Intel proceesor.

If anyone sees a setting that is availible within NTLite then please let me know, i can put that info into the list. I already got disable Hibernation.

Preview

Windows 7 Balanced Power Plan

Set Balanced as the active power plan.
powercfg -setactive 381b4222-f694-41f0-9685-ff5bb260df2e This is the GUID for the Balanced Plan, Power Saver and High Performance have their own unique GUID.
Disable Hibernation
powercfg -h off - Option availible on NTLite Post Setup Page.
Require a password on wakeup:
powercfg -setacvalueindex 381b4222-f694-41f0-9685-ff5bb260df2e fea3413e-7e05-4911-9a71-700331f1c294 0e796bdb-100d-47d6-a2d5-f7d2daa51f51 0
powercfg -setdcvalueindex 381b4222-f694-41f0-9685-ff5bb260df2e fea3413e-7e05-4911-9a71-700331f1c294 0e796bdb-100d-47d6-a2d5-f7d2daa51f51 0
Turn off hard disk after:
powercfg -setacvalueindex 381b4222-f694-41f0-9685-ff5bb260df2e 0012ee47-9041-4b5d-9b77-535fba8b1442 6738e2c4-e8a5-4a42-b16a-e040e769756e 60
powercfg -setdcvalueindex 381b4222-f694-41f0-9685-ff5bb260df2e 0012ee47-9041-4b5d-9b77-535fba8b1442 6738e2c4-e8a5-4a42-b16a-e040e769756e 120
Desktop background settings; Slide show:
powercfg -setacvalueindex 381b4222-f694-41f0-9685-ff5bb260df2e 0d7dbae2-4294-402a-ba8e-26777e8488cd 309dce9b-bef4-4119-9921-a851fb12f0f4 1
powercfg -setdcvalueindex 381b4222-f694-41f0-9685-ff5bb260df2e 0d7dbae2-4294-402a-ba8e-26777e8488cd 309dce9b-bef4-4119-9921-a851fb12f0f4 0
Wireless Adapter Settings; Power Saving Mode:
powercfg -setacvalueindex 381b4222-f694-41f0-9685-ff5bb260df2e 19cbb8fa-5279-450e-9fac-8a3d5fedd0c1 12bbebe6-58d6-4636-95bb-3217ef867c1a 0
powercfg -setdcvalueindex 381b4222-f694-41f0-9685-ff5bb260df2e 19cbb8fa-5279-450e-9fac-8a3d5fedd0c1 12bbebe6-58d6-4636-95bb-3217ef867c1a
0
 

Attachments

  • Sample.jpg
    Sample.jpg
    109.9 KB
  • W7-01-Balanced-Power-Plan.txt
    9 KB
Last edited:
Add the pow file (or whatever you called it) to Post-setup and add a command using powercfg addressing that powerplan for importing.

Let me know with an example if you have a specific question.
 
Windows 7 has 3 availible Power Plans, you may have a custom power plan installed by your OEM, HP Dell etc.

To get a list of the availible plans and their GUID, open a cmd window(some recommend an elevated cmd window but a normal cmd window works) and type the following powercfg /list you will get a list. Note Keep the command window open, you will need it for the next stages.

Power Scheme GUID: 381b4222-f694-41f0-9685-ff5bb260df2e (Balanced)
Power Scheme GUID: 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c (High Performance) *
Power Scheme GUID: a1841308-3541-4fab-bc81-f71556f20b4a (Power saver)

The current active profile has a * after its name, ie -Power Scheme GUID: 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c (High Performance) * See above.

Before tweaking any or all of the power plans i suggest you make a backup of each. Create a new folder inside C:\Windows and name it PowerPlans or type the following in your cmd window mkdir C:\Windows\"PowerPlans"
Note -
The Export command will fail if you use a folder with spaces in the name, ie Power Plans so use PowerPlans instead.

To Export your power plans enter the following into the cmd window one at a time,
POWERCFG /EXPORT C:\Windows\PowerPlans\Balanced.pow 381b4222-f694-41f0-9685-ff5bb260df2e

POWERCFG /EXPORT C:\Windows\PowerPlans\HighPerformance.pow 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c

POWERCFG /EXPORT C:\Windows\PowerPlans\PowerSaver.pow a1841308-3541-4fab-bc81-f71556f20b4a

You can now tweak your power plans using the Configurator in post no1 or via Control Panel - Power Options.

Some other basic Power Plan options,

To set a Plan
powercfg -setactive 381b4222-f694-41f0-9685-ff5bb260df2e <-- change to your chosen plan GUID

To import a plan
POWERCFG /IMPORT C:\Windows\PowerPlans\example.pow 381b4222-f694-41f0-9685-ff5bb260df2e <-- change to your chosen plan GUID

To change a power plans name
powercfg /changename 381b4222-f694-41f0-9685-ff5bb260df2e "example"

These are a basic set of options that will suit many users. There are more advanced options that will mess up your system if you do it wrong so i wont be covering them here.

The $OEM$ folder contains the 3 standard w7 power plans. I have also created a High Power plan for AC and DC, everything is always on, core parking is disabled. Extract the zip file and place the $OEM$ folder inside the sources folder of the working directory and the plans will be copied to C:\Windows\PowerPlans during installation. Enjoy.

Now contains batch file to set the high power plan.
 
Last edited:
Will the power plan configurator work for Windows 10 as well?

Also, how do I call this batch script to run in the post set up ?
 
Go to windowsafg, put the mouse pointer on the Home button and you will get the power plan configurators.

You can run the commands it generates from NTLite Post Setup although i add mine after 1st logon. Nuhi would be able totell you how
 
Last edited:
Add the pow file (or whatever you called it) to Post-setup and add a command using powercfg addressing that powerplan for importing.

Let me know with an example if you have a specific question.

What is to command in the post-setup screen to run a batch script?
 
I get that but don’t I need to add a command or switch to run the batch script like I would if I was adding a silent installer? Or will just dragging the file into the program be all I need to do?
 
I am very rusty on stuff so you will have to be patient with me.

I dont use post setup much except for reg files, the last time i added a .cmd(same as a batch really) ntlite "read" everything on the cmd file and added it all to the list, drag a bat or cmd file to the page to see what i mean.

What you could do is manually create an entry for your power plan bat to SetupComplete.cmd in source\$OEM$\$$\Setup\Scripts folder.

This is my setupcomplete file as an example.
@echo off
wusa.exe "%WINDIR%\Setup\Files\01-2016-07-27-Windows6.1-KB3177467-x64-SS.msu" /quiet /norestart
wusa.exe "%WINDIR%\Setup\Files\02-2016-04-25-Windows6.1-KB3125574-v4-x64-SP2.msu" /quiet /norestart
wusa.exe "%WINDIR%\Setup\Files\03-2016-03-29-Windows6.1-KB3145739-x64.msu" /quiet /norestart
wusa.exe "%WINDIR%\Setup\Files\04-2016-04-10-Windows6.1-KB3153199-x64.msu" /quiet /norestart
regedit /S "%WINDIR%\Setup\Files\w7-hibernate-disable.reg"
regedit /S "%WINDIR%\Setup\Files\w7-pagefile-disable.reg"
regedit /S "%WINDIR%\Setup\Files\w7-sleep-disable.reg"
regedit /S "%WINDIR%\Setup\Files\w7-system-restore-disable.reg"

PLace the power bat inside %WINDIR%\Setup\Files then edit SetupComplete.cmd to add your bat.

I now work with captured wims so i do everything post install.
 
Once you have a nice working SetupComplete.cmd inside the oems folder then i would back it up and add each time, no need to create a new one everytime, just carefully edit the existing one. Im still using an unattended file i created with 1.2.0.4861.
 
Last edited:
Personally i would only keep high performance(tweaked) and power saver(for laptops etc) power plans and delete balancedif you are creating a one size fits all image.
 
You could do i suppose, its just manually doing what ntlite would do if you added the commands on the post setup page. Make a backup copy of setupcomplete incase your edited one fails somehow.
 
Just add everything from
powercfg -setactive xxxxxxxxxxxxxxxxxxxxxx to the last line
powercfg -setdcvalueindex xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
 
I noticed that when I added the setupcomplete.cmd and on the post set up page of ntlite I hit “reset” and all of the commands I added to the cmd file showed up.

What brought me to wanting to use a batch script in the post set up page was I actually manually added all of the power plan settings to ntlite. But when I tested the iso none of the scripts ran, not even the built in script to set the password to never expire.

I am building an iso to test so I’ll see if it worked this time but if it doesn’t would there be a reason why the commands in the setupcomplete.cmd wouldn’t run?

I am using a fresh copy of Windows 1803 from Microsoft’s site.
 
Make sure you select the correct plan you want to customise on the page. W10 newer builds include a new power plan. Run the bat as "run as adminsitrator". I dont know why the scripts didnt take.
 
I work from an untouched w7 sp1 iso now, tweak then capture so all my tweaks are fully baked into a captured wim before it hits ntlite.
 
Last edited:
Thank you very much for the info, it has really helped!

Through a lot of digging around I think I may have found the cause of the scripts not working for me in post-setup.

This whole time I had been using Win 10 Home with the factory OEM key provided by my manufacturer for the unattended install when I was having issues getting the post-setup commands to work. Not even the 2 built in commands in ntlite would work, the ones for disable hibernation & set password to never expire.

I recently learned that if you purchased Win 7 Pro in the past, you can upgrade Win 10 Home to Win 10 Pro for free. I changed the key on my computer to the key for my Retail version of Win 7 Pro and I was able to upgrade to Win 10 Pro. Since it is a digital license attached to my hardware I can do a clean install with the Win 10 Pro ISO from Microsoft.

I thought using Win 10 Pro might make the post-setup commands work so I used my same unattended script with Win 10 Pro but got an error during installation because I was still using the OEM key for Win 10 Home. So I tried again with the Win 7 Pro key and that didn't work either and I got an error that it wasn't the correct key.

I then tried the generic Win 10 Pro key that Microsoft provides and I was able to successfully complete installation and activate my computer. The only reason I am rambling on about keys is because I searched for why the setupcomplete.cmd wouldn't work for me and found a post where someone else who was using an OEM key had the same issue with Win 7. The link is HERE

It said "In Windows® 8, oobe.cmd and Setupcomplete.cmd are disabled if an OEM product key is used. This is to ensure that end users reach Start as quickly as possible. Any tools or services that use this infrastructure need to be moved to post Out-Of-Box Experience (OOBE) tasks." and they thought it was probably the same for Win 10 as well.

I found out that the generic key Microsoft provides happens to be a Retail key, not OEM. So I made another ISO using the generic key & all of the post-setup commands for power settings and sure enough it finally worked!

I don't know enough about keys or windows to say 100% for certain that my problem was that using an OEM key for the unattended install was the problem, but from reading that article and changing the key to a retail one it finally worked.
 
campnowhere, regarding the Windows skipping setupcomplete.cmd, you can also enable the option "OEM SetupComplete" in NTLite-Unattended page toolbar, as a workaround.
 
Back
Top