Batch File using Powercfg.exe Won't Run
- From: Baboon <baboon@xxxxxxxxxxxxxx>
- Date: Mon, 14 Jan 2008 14:12:03 -0800
I created a batch file in order to create and set a power scheme on XP
machines. I have executed the batch file from a client XP machine to confirm
that it works. However, when I try to use it as a machine startup script in
Group Policy, it doesn't work. I know that the batch file actually runs
because I set it to create a flag file at completion. Here is what is in the
batch file:
************************************
@echo off
powercfg /create BCCR
powercfg /change BCCR /monitor-timeout-dc 5
powercfg /change BCCR /monitor-timeout-ac 20
powercfg /change BCCR /disk-timeout-dc 0
powercfg /change BCCR /disk-timeout-ac 0
powercfg /change BCCR /standby-timeout-dc 0
powercfg /change BCCR /standby-timeout-ac 0
powercfg /change BCCR /hibernate-timeout-dc 0
powercfg /change BCCR /hibernate-timeout-ac 0
powercfg /setactive BCCR
@echo BCCR Power Settings Configured....
"\\Server1\Migration\%ComputerName%\powersettings.flg"************************************
I know that because the batch file sits on the network, the working
directory will default to Windows, but since powercfg.exe lives in System32,
the path statement should cause the machines to look in System32.
Nonetheless, I have tried editing the batch file to change the directory to
System32 and I have tried putting in the full path to powercfg.exe on each
line. Not surprisingly, none of this made a difference. I have also tried
using a startup script which calls this batch file as well using this batch
file itself as the startup script. In every single case the script runs,
because it creates the flag file, but it never does the work of changing the
Power settings, except when I run it manually.
I must be missing something here.
By the way, it looks like Vista has power configuration settings in its
Administrative Templates, but these won't work on XP. If anyone does have a
suggestion for a different way to automate the application of power settings
to a group of XP machines, that would also be helpful.
Thanks in advance for any help.
.
- Follow-Ups:
- RE: Batch File using Powercfg.exe Won't Run
- From: George Yin(MSFT)
- Re: Batch File using Powercfg.exe Won't Run
- From: Florian Frommherz [MVP]
- RE: Batch File using Powercfg.exe Won't Run
- Prev by Date: Re: PushPrinterConnection.exe
- Next by Date: Re: Local policy winning over Domain
- Previous by thread: Re: Force logoff when hours expire not working
- Next by thread: Re: Batch File using Powercfg.exe Won't Run
- Index(es):
Relevant Pages
|
Loading