Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Notifications
Login / Register
Community
Community
Notifications
close
  • Forums
  • Knowledge Center
  • Events & Webinars
  • Ideas
  • Blogs
Help
Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Login / Register
Sustainability
Sustainability

Ask Me About Webinar: Data Center Assets - Modeling, Cooling, and CFD Simulation
Join our 30-minute expert session on July 10, 2025 (9:00 AM & 5:00 PM CET), to explore Digital Twins, cooling simulations, and IT infrastructure modeling. Learn how to boost resiliency and plan power capacity effectively. Register now to secure your spot!

Running script with Cmdfiles

APC UPS Data Center & Enterprise Solutions Forum

Schneider, APC support forum to share knowledge about installation and configuration for Data Center and Business Power UPSs, Accessories, Software, Services.

cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Home
  • Schneider Electric Community
  • APC UPS, Critical Power, Cooling and Racks
  • APC UPS Data Center & Enterprise Solutions Forum
  • Running script with Cmdfiles
Options
  • Mark Topic as New
  • Mark Topic as Read
  • Float this Topic for Current User
  • Bookmark
  • Subscribe
  • Mute
  • Printer Friendly Page
Invite a Co-worker
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send Invite Cancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Send New Invite Close
Top Experts
User Count
BillP
Administrator BillP Administrator
5060
voidstar_apc
Janeway voidstar_apc
196
Teken
Spock Teken
115
Erasmus_apc
Sisko Erasmus_apc
112
View All

Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
Back to APC UPS Data Center & Enterprise Solutions Forum
ndht1997
ndht1997
Cadet

Posted: ‎2023-09-27 01:35 AM

0 Likes
4
745
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2023-09-27 01:35 AM

Running script with Cmdfiles

Hi guys, I am working for an automation solution to trigger whenever bad event occurs (battery disconnected, power fail etc..). I am trying to utilize cmdfiles in powerchute package to run another .exe. 

 

I try to build .exe in both python and C#, and can run perfectly when i click to run cmdfiles. The web app interface can actually trigger to run cmdfiles ( i check by log as described above); however, the GUI of .exe app can not open, and this is the key warning to automatically warning abnormalities of UPS.

 

Here is my cmdfiles, i try to enable 1 by 1 already but still the same:

@echo off
rem
rem Maximize for best viewing
rem This command file provides examples of proper command file syntax
rem
rem Command Files run by PowerChute Business Edition must be placed in this directory.
rem
rem Use the full path name of executable programs and external command files.
rem
rem The @START command must be used to run executable programs (see example below).
rem For the @START command, path names that include spaces must be enclosed in quotes;
rem arguments for the executable must be outside the quotes. A double quote must
rem precede the quoted path name. For example, to execute a command file in
rem c:\Program Files\APC\PowerChute Business Edition\agent\cmdfiles called myShut.exe,
rem the following line should be entered in the command file:
rem
rem @START "" "c:\Program Files\APC\PowerChute Business Edition\agent\cmdfiles\myShut.exe"
rem

@START "" "C:\Temp\UPS\UPS_Doctor.appref-ms"
rem @START "" "C:\Temp\LCBI\UPS\Warning_UPS.exe"


@echo on

Reply

Link copied. Please paste this link to share this article on your social media post.

  • All forum topics
  • Previous Topic
  • Next Topic
Replies 4
BillP
Administrator BillP Administrator
Administrator

Posted: ‎2023-09-27 11:04 AM

0 Likes
1
737
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2023-09-27 11:04 AM

@ndht1997 

 

See Schneider Electric FAQ FA159586 

Reply

Link copied. Please paste this link to share this article on your social media post.

ndht1997
ndht1997
Cadet

Posted: ‎2023-09-27 05:32 PM

In response to BillP
0 Likes
0
712
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2023-09-27 05:32 PM

Very appreciate mrBIllP,

I just wonder can i utilize CMD windows as an GUI, and perhaps cmdfiles of Powerchute can pop .bat up on the desktop screen. I work on a factory 24/7 so it is convenient if i can make some noticeable trigger on the screen for operator to execute.

Could u be so kind as to instruct me workaround solution of this, if windows of .bat still cannot show up on desktop screen.

Many thanks, 

 

Reply

Link copied. Please paste this link to share this article on your social media post.

ndht1997
ndht1997
Cadet

Posted: ‎2023-09-27 05:34 PM

0 Likes
1
712
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2023-09-27 05:34 PM

thanks mr BillP. Can I utilize .bat to pop up cmd window on desktop screen?
If not, please advise me a workaround solution, i really need to show it up on screen as an alarm alerting.

Reply

Link copied. Please paste this link to share this article on your social media post.

BillP
Administrator BillP Administrator
Administrator

Posted: ‎2023-09-28 12:25 PM . Last Modified: ‎2023-09-28 12:50 PM

In response to ndht1997
0 Likes
0
691
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2023-09-28 12:25 PM . Last Modified: ‎2023-09-28 12:50 PM

@ndht1997 

 

When an event is logged by PowerChute Business Edition or PowerChute Serial Shutdown, an entry is added to Event Viewer - Windows Logs - Applications. Create a task for the event. The task can be configured to run a .exe. 

 

Another option is to have PowerChute trigger a batch file, and the batch file will run a PowerShell script. With PowerShell, you can script almost all functions on a Windows system. 

 

For a popup message, you could run msg.exe if it is available on the system.

 

For a list of events, log in to the Event Viewer, see Schneider Electric FAQ FA228995.

 

Reply

Link copied. Please paste this link to share this article on your social media post.

Preview Exit Preview

never-displayed

You must be signed in to add attachments

never-displayed

 
To The Top!

Forums

  • APC UPS Data Center Backup Solutions
  • EcoStruxure IT
  • EcoStruxure Geo SCADA Expert
  • Metering & Power Quality
  • Schneider Electric Wiser

Knowledge Center

Events & webinars

Ideas

Blogs

Get Started

  • Ask the Community
  • Community Guidelines
  • Community User Guide
  • How-To & Best Practice
  • Experts Leaderboard
  • Contact Support
Brand-Logo
Subscribing is a smart move!
You can subscribe to this board after you log in or create your free account.
Forum-Icon

Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.

Register today for FREE

Register Now

Already have an account? Login

Terms & Conditions Privacy Notice Change your Cookie Settings © 2025 Schneider Electric

This is a heading

With achievable small steps, users progress and continually feel satisfaction in task accomplishment.

Usetiful Onboarding Checklist remembers the progress of every user, allowing them to take bite-sized journeys and continue where they left.

of