Solved

power settings scripting

Posted on 2013-06-11
7
227 Views
Last Modified: 2013-06-17
Hi all, i am looking at having a script to change power setting on our laptops we build, we want no sleep, no screensaver, no action on lid, no action on power button.
We use windows 7 and i would like to be able to run this as say a batch file or something
any help appreciated
0
Comment
Question by:Shifnal
  • 4
  • 3
7 Comments
 
LVL 5

Expert Comment

by:MisterTwelve
ID: 39238464
This article give you some options to create and configure Power Plan for your laptops
http://support.microsoft.com/kb/935799

best regards
0
 

Author Comment

by:Shifnal
ID: 39238571
Thanks but i actually want to be able to edit a script with different options if possible to suit different build, was thinking of some kind of batch file that i could edit and just run???
0
 
LVL 5

Expert Comment

by:MisterTwelve
ID: 39240563
You can use "Reg Add" command to change power setting.

you open a Command prompt with "Run as Administrator" Options

Use the command reg add:
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\ControlPanel\NameSpace\{025A5937-A6BE-4686-A844-36FE4BEC8B6D}" /v PreferredPlan /t REG_SZ /d a1841308-3541-4fab-bc81-f71556f20b4a /f

Open in new window


Take attention to the power plan like previous article
"
Type 381b4222-f694-41f0-9685-ff5bb260df2e to use the Balanced plan.
Type a1841308-3541-4fab-bc81-f71556f20b4a to use the Power saver plan.
Type 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c to use the High performance plan.

You can also type the power scheme GUID for a custom power plan that you have created. To determine the GUID for all existing power schemes, type Powercfg /List at the command prompt, and then press ENTER."

i think this is all you need.
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

Author Comment

by:Shifnal
ID: 39240636
is i create and save a power plan on say laptop 1 and then enter this reg line on laptop 2 will it work or do i have to copy anything from 1 to 2?
0
 
LVL 5

Accepted Solution

by:
MisterTwelve earned 500 total points
ID: 39240669
If laptop2 dont have this power plan, you need create them
the best options is:
POWERCFG -EXPORT <filename> <GUID> from Laptop1
and
POWERCFG -IMPORT <filename> <GUID> to laptop2
and Yes, you need to copy file of export command to destination laptop.


other options to add Registry settings for remote machine is:
reg add "\\Laptop2\HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\ControlPanel\NameSpace\{025A5937-A6BE-4686-A844-36FE4BEC8B6D}" /v PreferredPlan /t REG_SZ /d a1841308-3541-4fab-bc81-f71556f20b4a /f

REG ADD KeyName [/v ValueName | /ve] [/t Type] [/s Separator] [/d Data] [/f]

  KeyName  [\\Machine\]FullKey
           Machine  Name of remote machine - omitting defaults to the
                    current machine. Only HKLM and HKU are available on remote
                    machines.
0
 

Author Comment

by:Shifnal
ID: 39240971
will give this a try and let you know, many thanks
0
 

Author Closing Comment

by:Shifnal
ID: 39252922
Very hellpful
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Log files are useful in diagnosing and repairing problems.  This is a list of common log files and their standard locations that I've compiled.   While this is not exhaustive, it is a pretty good list that I've found to be useful.  I may update it f…
Have you ever had a hard drive that you can't boot into, but need to change the registry? Here is the solution! This article guides you through accessing and editing a registry of a non-primary drive. To read registry information on a non-prim…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now