Ask a Question

Command file is not running within PowerChute Network Shutdown: How to check correct syntax usage.

Issue:
A command file is not running within PowerChute Network Shutdown (PCNS).

Product Line:
PowerChute Network Shutdown

Environment:
All supported Windows Operating Systems.

Cause:
Incorrect syntax

Solution:

NOTE: The command file runs using the local system account. PowerChute cannot execute programs that require interaction with the desktop; only command line enabled programs are supported e.g. if you try to launch Notepad it will fail.

To execute command files from PCNS, you must use the correct syntax.
If the command file contains statements to run executable files (.exe), you must use the command called @START in the statements.

The @START command uses the following syntax rules:

The following examples illustrate the correct use of syntax for use with APC shutdown utilities as executables:

Example: An executable program with no spaces in the full path name.
No quotes are required:
@START C:\APC\Oracle\PWRFAIL.BAT

quotes required:
@START C:"\Program Files\APC\PWRFAIL.BAT"

You can test that the command file is operating correctly by running a simple command file.
1. Create a directory, named apctest, directly to the C drive.
2. Type the following line in a command file to create a file named cmdtest.txt, and the time that the file was run, in the apctest:
time /T >> C:\apctest\cmdtest.txt

NOTE: When attempting to power down a remote system the PowerChute service account must be changed from Local System account to an account that has permissions on the remote system to power it down.
In this screenshot the account has been changed to wkadmin
The command file syntax used to shut down a remote server isshutdown /s /f /m \\server ip /c "PowerChute Shutdown" /t 0 Users should enter the proper ip address of their server and should adjust the /t (time delay) to meet their needs.