Powerchute shutdown script will not run

We have two servers at a site. One system is running Windows Server 2003 x64 the other is 32bit. I have an APC Smart-UPS system connected to the 64-bit server. Powerchute has a configurable batch file that runs prior to shutting the server down. I have created a batch file according to documentation from APC to shut down the 32 bit server. The batch file works properly when run by itself, but will not invoke via Powerchute.

Things I have tried from research I've done already.
-The powerchute services are running as the administrator instead of Local System as suggested by APC knowledge base
-The batch file is a single line command as suggested by APC knowledge base
-I've tried using psshutdown instead of the windows builtin shutdown command, specifying a valid account with psshutdown

Thanks for your time.
Who is Participating?
Richard QuadlingConnect With a Mentor Senior Software DeveloperCommented:
Get hold of FileMon or ProcMon from MS/SystemInternals and see if the file is ever asked for.

If the script is never actually loaded by powerchute, then I would go back to them.
Richard QuadlingSenior Software DeveloperCommented:
LocalSystem is a very restrictive account. It cannot access anything except local resources (no network access, no remote printers, etc).

As a test, can you add the following line to the start of your shutdown script ...

ECHO %DATE% %TIME% Shutdown requested >> C:\Shutdown.log

This will allow us to see if the batch file is actually loaded (hopefully).

Is the machine actually shutting down correctly when told to do so by Powerchute?

Can you supply links to the reference regarding the APC article?
menreeqAuthor Commented:

(sorry for long link)

I have completed everything suggested in this file. It also suggests to create a batch file that writes out to a file.  The batch file works fine from windows, but nothing is written to the file when the server shuts down nor when I press the 'Test' button on the batch file (referenced in step 2 in the link above).  I have setup about 5 or 6 APC units to work in this manner, but this one just doesn't seem to want to work.
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Richard QuadlingSenior Software DeveloperCommented:
This suggests that the APC software knows nothing about the batch file you have configured.

Can you make sure that the batch file is in the right location.

Can you show the content also?
menreeqAuthor Commented:
The batch file is in the correct location, and I did select it from the drop down list.

The batch file contains only a single command that works when running it separately. I dont have access to the file currently, but for example:
c:\windows\system\shutdown.exe /m \\remoteserver
Richard QuadlingSenior Software DeveloperCommented:
Try making that ...

START C:\Windows\system\shutdown.exe /m \\remoteserver


If you are using LocalSystem, it doesn't have access to the network. And that includes anything that it spawns, in this case the shutdown.exe

I would create a new user which has access to the network. I have one called AutomatedTasks for this sort of thing.

That way you can control what resources are available to the user AutomatedTasks.
menreeqAuthor Commented:
I am already running the service as domain administrator. The script runs fine when lauched directly.

I did try START C:...
Same results.
I am also having an issue with APC Network Shutdown.

All of my Windows 2000 and NT machines shutdown properly, but my XP and 2003 machines do not.  I am starting to suspect a Windows firewall issue, but have not had time to expirement yet.
Experienced the same problem running powerchute on 64Bit servers, replaced with shudown.exe from a 32Bit server and it works fine.
All Courses

From novice to tech pro — start learning today.