Schneider Electric support forum for our Data Center and Business Power UPS, UPS Accessories, Software, Services, and associated commercial products designed to share knowledge, installation, and configuration.
Posted: 2021-07-01 01:07 AM
This question was originally posted by Adrian on APC forums on 2/14/2012
Hi,
I'm trying to test some VMware shutdown scripts. The APC engineer I spoke to on the phone, said that to test the scripts its best to associate the .bat script to the Communication: Established event. I've kept the filenames and folder names simple: c:\apc\shutdownvmware-test.bat and, all thats in the bat at the moment is:
set FOLDER=c:\apc
set LOG=%FOLDER%\shutdown_log.txt
echo %DATE%,%TIME%,Starting APC Shutdown >> "%LOG"
So all it should do is generate a log file. If I run it manually it does just that.
If I stop/start the service (pcns.exe), then in the apc Event Log, I see "Communication Established". But watching the process list with Process Explorer, I never see a cmd.exe spawn off from pcns.exe, and the log isn't generated.
The pcns service is running as SYSTEM. The folder is writeable by SYSTEM.
Where have I gone wrong ??
Posted: 2021-07-01 01:08 AM
This reply was originally posted by Adrian on APC forums on 2/15/2012
Also whats not clear is what '0' means in the "Run the command..." and "The command file needs.." boxes
It could mean, that the command doesn't run, or it could mean those don't apply if they're zero.
Posted: 2021-07-01 01:07 AM
This reply was originally posted by Chris on APC forums on 2/14/2012
I would recommend looking at the kbase below as you need to enter specific syntax in the command file so PCNS knows what to do with it. Please let us know if this helps.
http://nam-en.apc.com/app/answers/detail/a_id/2441/kw/PCNS%20command%20file
Posted: 2021-07-01 01:07 AM
This reply was originally posted by Adrian on APC forums on 2/14/2012
Just to add: Yes the tick box for 'run a command file' is ticked, and I've tried setting values in the "Run The Command..." and "The command file needs this much time..." boxes.
Posted: 2021-07-01 01:07 AM
This reply was originally posted by Adrian on APC forums on 2/15/2012
Hi Chris,
Ok, so having read that again, whats not clear, is if those @START commands go into the PCNS GUI webpage, or, if those are lines within a .BAT script.
They include rem statements, which suggests that they go into the .BAT, however, you can't @start an 'echo' command.
Posted: 2021-07-01 01:08 AM
This reply was originally posted by Adrian on APC forums on 2/15/2012
Also whats not clear is what '0' means in the "Run the command..." and "The command file needs.." boxes
It could mean, that the command doesn't run, or it could mean those don't apply if they're zero.
Create your free account or log in to subscribe to the forum - and gain access to more than 10,000+ support articles along with insights from experts and peers.