Solved Script to change power settings

mrlaconic

New member
Local time
4:12 PM
Messages
5
Greetings,

I am attempting to temporarily disable hibernate and make sure the monitor doesn't go off while I am running a script to complete system configuration.

Code:
control powercfg.cpl -monitor-timeout-ac 30
control powercfg.cpl -monitor-timeout-dc 30
control powercfg.cpl /hibernate off

I believe the code above should work, but what's happening is the control panel applet for power settings is launching when this script runs.

Can someone help me make this so that:

  • The control panel applet doesn't launch
  • The settings are only made for the current logged on user

I also would appreciate knowing how to revert the setting changes I made at the end of my script

Thanks!
 

My Computer My Computer

At a glance

Windows 7 32 BitPentium Duo Core2GB
Computer Manufacturer/Model Number
Lenovo M58
OS
Windows 7 32 Bit
CPU
Pentium Duo Core
Memory
2GB
Sound Card
SoundMax Integrated Digital HD
Well you are calling on the .cpl so it is going to open.
Have you tried using the old powercfg.exe method instead?
I don't believe it opens a window on execution
Just go into command window and type powercfg.exe /?
for the list of switches for it.
 

My Computer My Computer

At a glance

Windows 7 x64Intel i7 2600kG.skill Ripjaw 16gigs @ 1866Nvidia gtx580 (evga)
Computer Manufacturer/Model Number
Insane hobo technologies. ;-)
OS
Windows 7 x64
CPU
Intel i7 2600k
Motherboard
Asrock z68 extreme 4 gen 3
Memory
G.skill Ripjaw 16gigs @ 1866
Graphics Card(s)
Nvidia gtx580 (evga)
Sound Card
Integrated HD audio + hdmi
Monitor(s) Displays
24" ASUS widescreen + 42" insignia
Screen Resolution
1080p (1920x1080)
Hard Drives
128 Samsung 830
256 Samsung 840
3 x 1tb storage drive (various)
1 western digital 1tb (eSATA)
1 Seagate 1tb (eSATA)
PSU
1 kilowatt SLI/Crossfire rated Silverstone modular
Case
NZXT Phantom + additional 220 fan
Cooling
Zalmann
Keyboard
Microsoft wireless 3000 (v2)
Mouse
MS - wireless 5000 (bluetrack)
Internet Speed
depends on if you ask me or my provider.
Other Info
The above information is provided as is, and the author assumes no responsibility for issues it may cause with your sanity or fanboyism.
Thanks that worked!
 

My Computer My Computer

At a glance

Windows 7 32 BitPentium Duo Core2GB
Computer Manufacturer/Model Number
Lenovo M58
OS
Windows 7 32 Bit
CPU
Pentium Duo Core
Memory
2GB
Sound Card
SoundMax Integrated Digital HD
Back
Top