powercfg command and random GUID with setactive help windows 7

ron7000

New member
Power User
Local time
6:11 AM
Messages
90
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.
what I've done so far is run powerfg import manually on a system and generated a random GUID, then copied that GUID into my script. Is that ok to do in the long run?
or is there a better way to do it?
i don't know how to take the output of the "powercfg -import" command that gives me the random GUID and use that in the following "powercfg -setactive" command.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
homebuilt & dell & sgi
OS
Windows 7 x64, ultimate/pro/home, SLES x86 & ia64
CPU
intel & amd
Motherboard
yes
Memory
yes
Graphics Card(s)
gtx970
Sound Card
same as memory
Monitor(s) Displays
benq 27"
Screen Resolution
2560*1440
Hard Drives
many
If I read powercfg command line switches help correctly
http://technet.microsoft.com/en-us/library/cc748940(v=ws.10).aspx

the -list switch should give you the guid for a scheme and the
-duplicatescheme switch should give you a new guid for example, to change one setting or whatnot.

But I haven't messed with it. I'm just going by the info on the page.
 

My Computer

Computer Manufacturer/Model Number
HP Media Center
OS
Windows 7 32 bit
CPU
AMD 5200+ dual core
Memory
2 GB
Graphics Card(s)
NVidia GeForce 6150SE 128 MB
Monitor(s) Displays
CRT
Screen Resolution
1280x1024
Hard Drives
500 GB Sata internal :

SIIG USB 3.0 docking stations w/WD Caviar Black 6 Gb/s drives
Keyboard
PS/2
Mouse
PS/2 Wheel Mouse
Other Info
SIIG USB 3.0 PCIexpress card.
  • Like
Reactions: Arc
Back
Top