Batch File using Powercfg.exe Won't Run



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.
.



Relevant Pages

  • Re: automatic login and screen lock on boot and logon scripts
    ... > login and then lock the screen, I run a clean install of win2k, no ... machines dont have tcp/ip stack ... > then automatically login but have the screen locked. ... user32.dll,LockWorkStation" in a batch file. ...
    (microsoft.public.win2000.general)
  • RE: Windows 2000 Patch Order
    ... registration) and will scan all machines and will deploy to 50 ... the patch from Microsoft, check to ensure it's signed by MS, then it copies ... You can either have it schedule to run the batch file for you, ... >patches don't step on one another. ...
    (Focus-Microsoft)
  • Re: I need fast,automatic power-up and shut-down
    ... > know how to configure the machines so that they avoid this stage ... > and boot all the way to a desktop un-aided. ... I know in former OS versions, I could make a a batch file with ... I believe I remember Kelly having a shutdown script on her website. ...
    (microsoft.public.windowsxp.basics)
  • Re: Batch file wont finish installing security updates
    ... Local security policy> User Rights Assignment> Debug ... Admin rights, bounced the box, the batch file ran fine. ... On all the rest of my machines ...
    (microsoft.public.win2000.security)
  • Re: I need a fast, minimum of mouse-clicks, power-up and shut-down solution
    ... >know how to configure the machines so that they avoid this stage altogether ... >At shut-down, I get a dialog box asking me if I want to shutdown, restart, ... I know in former OS versions, I could make a a batch file with ... Power Up: turn on computer/monitor. ...
    (microsoft.public.windowsxp.general)

Loading