Brand Logo
Help
  • Get started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Login / Register
Help
  • Get started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
close
  • Community Home
  • Forums
    • By Topic
    • By Topic
      EcoStruxure Building
      • Field Devices Forum
      • SmartConnector Forum
      EcoStruxure Power & Grid
      • Gateways and Energy Servers
      • Metering & Power Quality
      APC UPS, Critical Power, Cooling and Racks
      • APC UPS Data Center & Enterprise Solutions Forum
      • APC UPS for Home and Office Forum
      EcoStruxure IT
      • EcoStruxure IT forum
      Remote Operations
      • EcoStruxure Geo SCADA Expert Forum
      • Remote Operations Forum
      Industrial Automation
      • Alliance System Integrators Forum
      • AVEVA Plant SCADA Forum
      • CPG Expert Forum DACH
      • EcoStruxure Automation Expert / IEC 61499 Forum
      • Fabrika ve Makina Otomasyonu Çözümleri
      • Harmony Control Customization Forum
      • Industrial Edge Computing Forum
      • Industry Automation and Control Forum
      • Korea Industrial Automation Forum
      • Machine Automation Forum
      • Modicon PAC Forum
      • PLC Club Indonesia
      Schneider Electric Wiser
      • Schneider Electric Wiser Forum
      Power Distribution IEC
      • Eldistribution & Fastighetsautomation
      • Elektrik Tasarım Dağıtım ve Uygulama Çözümleri
      • Paneelbouw & Energie Distributie
      • Power Distribution and Digital
      • Solutions for Motor Management
      • Specifiers Club ZA Forum
      • Електропроектанти България
      Power Distribution NEMA
      • Power Monitoring and Energy Automation NAM
      Power Distribution Software
      • EcoStruxure Power Design Forum
      • LayoutFAST User Group Forum
      Light and Room Control
      • SpaceLogic C-Bus Forum
      Solutions for your Business
      • Solutions for your Business Forum
      Support
      • Ask the Community
  • Knowledge Center
    • Building Automation Knowledge Base
    • Geo SCADA Knowledge Base
    • Industrial Automation How-to videos
    • Digital E-books
    • Success Stories Corner
  • Events & Webinars
    • All Events
    • Innovation Talks
    • Innovation Summit
    • Let's Exchange Series
    • Partner Success
    • Process Automation Talks
    • Technology Partners
  • Ideas
    • EcoStruxure Building
      • EcoStruxure Building Advisor Ideas
      Remote Operations
      • EcoStruxure Geo SCADA Expert Ideas
      • Remote Operations Devices Ideas
      Industrial Automation
      • Modicon Ideas & new features
  • Blogs
    • By Topic
    • By Topic
      EcoStruxure Power & Grid
      • Backstage Access Resources
      Remote Operations
      • Remote Operations Blog
      Industrial Automation
      • Industrie du Futur France
      • Industry 4.0 Blog
      Power Distribution NEMA
      • NEMA Power Foundations Blog
      Light and Room Control
      • KNX Blog
      Knowledge Center
      • Digital E-books
      • Geo SCADA Knowledge Base
      • Industrial Automation How-to videos
      • Success Stories Corner

PCB Shutdown Command File Doesn't Execute

APC UPS Data Center & Enterprise Solutions Forum

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.

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
  • Communities
  • APC UPS, Critical Power, Cooling and Racks
  • APC UPS Data Center & Enterprise Solutions Forum
  • PCB Shutdown Command File Doesn't Execute
Options
  • Subscribe to RSS Feed
  • 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 Exchange 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
5022
voidstar_apc
Janeway voidstar_apc
195
Erasmus_apc
Sisko Erasmus_apc
111
TheNotoriousKMP_apc
Sisko TheNotoriousKMP_apc
108
View All
Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
Solved Go to Solution
Back to APC UPS Data Center & Enterprise Solutions Forum
Solved
BillP
Administrator BillP Administrator
Administrator

Posted: ‎2021-07-01 03:14 AM

0 Likes
16
630
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
Share

Posted: ‎2021-07-01 03:14 AM

PCB Shutdown Command File Doesn't Execute

This question was originally posted by Steve on APC forums on 5/16/2013


I have installed a SMT750RM2U and connected it with a standard USB cable to a Windows 7 (x64) computer (HTPC).  I have installed PowerChute Agent, Console and Server on the HTPC. (I have since learned that I only needed to install Agent; however,  I'm afraid to uninstall any of this software because of the reports that they don't uninstall properly.)

I ran the Wizard successfully.  Then started the Console.  Everything looks correct:

1166_Console Status.jpg

I then run Agent and setup the shutdown settings:

1167_Agent Settings.jpg

I created a file named test.bat in the cmdfiles directory which contains only the following line:

c:\windows\system32\shutdown.exe -i

When I click on the Test button, I get the following response:

Command File was executed
C:\Program Files (x86)\APC\PowerChute Business Edition\agent\cmdfiles\test.bat

However, shutdown.exe -i does not execute.

I also tried this line:

@START c:\windows\system32\shutdown.exe -i

and this line:

@START "" "c:\windows\system32\shutdown.exe" -i

all with the same result.  I can run the test.bat in a windows command window and it executes correctly.

What am I doing wrong?  How can I fix this problem?

Thanks, Steve

Labels
  • Labels:
  • UPS Management Devices & PowerChute Software
Reply
Share
  • All forum topics
  • Previous Topic
  • Next Topic

Accepted Solutions
whoups_apc
Crewman whoups_apc
Crewman

Posted: ‎2021-07-01 03:14 AM

0 Likes
0
627
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
Share

Posted: ‎2021-07-01 03:14 AM

This was originally posted on APC forums on 4/26/2015


I'm late to this party, but I encountered the exact same problem and figured out a work-around: use the Windows Task Scheduler!

  1. Create a task that executes whatever you'd like (I tested with shutdown /i), set a suitable user account for running it (I picked my user account) and check "Run with highest privileges" if necessary (not necessary for my test), and allow it to be started manually. Give the task a suitable name, e.g. ShutdownTest.
  2. Create a script for PowerChute to execute, and add this line: @start schtasks /run /tn ShutdownTest
  3. Execute it from PowerChute and watch it work 😉

Works perfectly, at least for me! cool

See Answer In Context

Reply
Share
Replies 16
voidstar_apc
Janeway voidstar_apc
Janeway

Posted: ‎2021-07-01 03:14 AM

0 Likes
0
627
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
Share

Posted: ‎2021-07-01 03:14 AM

This was originally posted on APC forums on 6/23/2013


sconaway wrote:

A big thank you to voidstar and Angela N.  Sorry for the delayed response.  The test.cmd voidstar suggested resulted in a stderr.txt error message of "test2.cmd is not a valid command..."  However, double clicking on the test2.cmd file did execute shutdown.exe.

Odd... I guess you can't run .cmd files like that from a cmd file? Maybe a .bat file would work. Not that it matters since Angela's suggestion to use "Interactive Services Detection" seems much more useful.

This result has parallels to my original symptoms.  So that didn't help much; however, the suggestion to use Process Explorer was a big help.  I found shutdown.exe being is Process Explorer, checked the security tab and it said User:   So I now have information which appears to show that shutdown.exe is being invoked by Agent but not executed due to some kind of permission problem.

I think it probably means Process Explorer didn't have enough permissions to determine the user that Shutdown was running as. Try right clicking "Process Explorer" and choosing "Run as Administrator". Determining which user Shutdown should be informative.

  • Tags:
  • shutdown
Reply
Share
BillP
Administrator BillP Administrator
Administrator

Posted: ‎2021-07-01 03:14 AM

0 Likes
0
627
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
Share

Posted: ‎2021-07-01 03:14 AM

This reply was originally posted by Angela on APC forums on 5/30/2013


Another suggestion I had was:

Can you check to determine if the exe is running in the background possibly? [viewable through task manager]

Reply
Share
BillP
Administrator BillP Administrator
Administrator

Posted: ‎2021-07-01 03:14 AM

0 Likes
0
627
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
Share

Posted: ‎2021-07-01 03:14 AM

This reply was originally posted by Polydore on APC forums on 1/10/2014


Hello to All,


Sconaway, were you ever able to resolve this issue? I am facing the same problems with not success.


Regards,

Reply
Share
BillP
Administrator BillP Administrator
Administrator

Posted: ‎2021-07-01 03:14 AM

0 Likes
0
627
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
Share

Posted: ‎2021-07-01 03:14 AM

This reply was originally posted by Steve on APC forums on 5/16/2013


I have installed a SMT750RM2U and connected it with a standard USB cable to a Windows 7 (x64) computer (HTPC).  I have installed PowerChute Agent, Console and Server on the HTPC. (I have since learned that I only needed to install Agent; however,  I'm afraid to uninstall any of this software because of the reports that they don't uninstall properly.)

I ran the Wizard successfully.  Then started the Console.  Everything looks correct:

1166_Console Status.jpg

I then run Agent and setup the shutdown settings:

1167_Agent Settings.jpg

I created a file named test.bat in the cmdfiles directory which contains only the following line:

c:\windows\system32\shutdown.exe -i

When I click on the Test button, I get the following response:

Command File was executed
C:\Program Files (x86)\APC\PowerChute Business Edition\agent\cmdfiles\test.bat

However, shutdown.exe -i does not execute.

I also tried this line:

@START c:\windows\system32\shutdown.exe -i

and this line:

@START "" "c:\windows\system32\shutdown.exe" -i

all with the same result.  I can run the test.bat in a windows command window and it executes correctly.

What am I doing wrong?  How can I fix this problem?

Thanks, Steve

Reply
Share
BillP
Administrator BillP Administrator
Administrator

Posted: ‎2021-07-01 03:14 AM

0 Likes
0
627
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
Share

Posted: ‎2021-07-01 03:14 AM

This reply was originally posted by Angela on APC forums on 5/16/2013


First thing that comes to my mind is seeing if the PowerChute Agent service is allowed to interact with the desktop (beyond what you already tried).

  1. Go to services within Administrative Tools and right click on the Agent service and choose Properties.
  2. Click on the "Log On" tab.
  3. Tick the box for "Interact with Desktop".
  4. If the command file is executing commands to another computer, the local system account that the service runs as does not have the proper rights. In this case, the service should be set to log in as a user that does have rights on the secondary system. Please keep in mind also that passwords for the logged in account will not automatically change when the user's password changes for his account. The log in as account should be a user with a password that does not expire.
  5. Stop the Agent service and restart it. Retest the command file through PowerChute.

Reply
Share
BillP
Administrator BillP Administrator
Administrator

Posted: ‎2021-07-01 03:14 AM

0 Likes
0
627
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
Share

Posted: ‎2021-07-01 03:14 AM

This reply was originally posted by Steve on APC forums on 5/16/2013


Thank you for the quick response to my request for help.  I checked the Agent service Log On tab.  The Interact with Desktop was already checked. I rebooted the computer and tried the Agent Setting Test button.  No luck.  I get the "Test Command File" executed response but the command Shutdown.exe doesn't execute.

I hope you have some other suggestions.

Reply
Share
BillP
Administrator BillP Administrator
Administrator

Posted: ‎2021-07-01 03:14 AM

0 Likes
0
627
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
Share

Posted: ‎2021-07-01 03:14 AM

This reply was originally posted by Bill on APC forums on 5/16/2013


Hi,

I tested the script on WinXP attached to SMT750 and as long as interact with desktop was checked the script worked.

This is the text I used for the test @START c:\windows\system32\shutdown.exe -i

I also tested with this @START c:\windows\system32\shutdown.exe -f -r and that ran without an issue with or without interaction with desktop checked.

If neither work try testing with this echo %time% >> C:\temp\cmdtest.txt This will create a file named cmdtest.txt in c:\temp The text file will list the time the script was run.

Reply
Share
BillP
Administrator BillP Administrator
Administrator

Posted: ‎2021-07-01 03:14 AM

0 Likes
0
627
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
Share

Posted: ‎2021-07-01 03:14 AM

This reply was originally posted by Steve on APC forums on 5/16/2013


Using the @START line didn't work.  I tried the echo %time% line and it did work!  Great suggestion. That gives me great confidence PCB is communicating with my computer.  So it must be something with my command file. I copied the @START line directly from you post and pasted it into my test.bat file. So I'm still puzzled why it doesn't work. Here's a direct copy from my test.bat file:

echo off

@START c:\windows\system32\shutdown.exe -i

echo %time% >> c:\temp\cmdtest.txt

I also tried renaming the file test.cmd    still no execution.  Each time I get a new entry into  the cmd.txt file.

I have to go to a meeting now.  Please let me know if you have further suggestions.

Thanks, Steve

Reply
Share
BillP
Administrator BillP Administrator
Administrator

Posted: ‎2021-07-01 03:14 AM

0 Likes
0
627
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
Share

Posted: ‎2021-07-01 03:14 AM

This reply was originally posted by Steve on APC forums on 5/17/2013


I've been troubleshooting this problem all day.  When I double click on the test.bat file it executes perfectly.  When I call the test.bat file using the Agent Test button I get the %time% echo but the @START line doesn't execute.  Somehow, PCB is preventing the @START line from executing.  I'm out of ideas.

Please, can anybody help?

Reply
Share
BillP
Administrator BillP Administrator
Administrator

Posted: ‎2021-07-01 03:14 AM

0 Likes
0
627
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
Share

Posted: ‎2021-07-01 03:14 AM

This reply was originally posted by Angela on APC forums on 5/21/2013


I don't know of of any other ideas and Bill P. is on vacation so I will see if anyone else has any ideas.

Reply
Share
voidstar_apc
Janeway voidstar_apc
Janeway

Posted: ‎2021-07-01 03:14 AM

0 Likes
0
627
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
Share

Posted: ‎2021-07-01 03:14 AM

This was originally posted on APC forums on 5/22/2013


My guess is the user that PCBE runs as lacks SeRemoteShutdownPrivilege therefore shutdown.exe fails.

This msdn post describes making it work for INTERACTIVE users. I suspect something similar applies to the PCBE user.

Reply
Share
BillP
Administrator BillP Administrator
Administrator

Posted: ‎2021-07-01 03:14 AM

0 Likes
0
627
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
Share

Posted: ‎2021-07-01 03:14 AM

This reply was originally posted by Steve on APC forums on 6/13/2013


Thank you for the suggestion.  I added INTERACTIVE.  However, it did not solve the problem.

Reply
Share
BillP
Administrator BillP Administrator
Administrator

Posted: ‎2021-07-01 03:14 AM

0 Likes
0
627
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
Share

Posted: ‎2021-07-01 03:14 AM

This reply was originally posted by Steve on APC forums on 6/13/2013


I checked to see if shutdown.exe was running in the background using task manager.  It wasn't.

My test.cmd file runs perfectly from the command prompt window.  Shutdown.exe executes as specified.

Agent does run the test.cmd file because I see the "echo %time% output; however, shutdown.exe does not run.  This implies to me there is some kind of permission problem but I can't figure out how to solve it.

Here's the content of the test.cmd file (I've simplified the shutdown.exe parameter to just -i for troubleshooting purposes):

@START "" "c:\windows\system32\shutdown.exe" -i

echo %time% >> c:\temp\cmdtest.txt

Any new suggestions would be appreciated.

Reply
Share
voidstar_apc
Janeway voidstar_apc
Janeway

Posted: ‎2021-07-01 03:14 AM

0 Likes
0
627
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
Share

Posted: ‎2021-07-01 03:14 AM

This was originally posted on APC forums on 6/13/2013


While it's probably a permission issue, you can try to capture the error. Make the test.cmd file:

test2.cmd 1>stdout.txt 2>stderr.txt

then in test2.cmd

C:\windows\system32\shutdown.exe -i

Errors should show up in stderr.txt

For debugging privilege issues, Process Explorer is helpful. Under the "Security" tab it shows the privileges granted to the process. You'll want to make sure both local and remote shutdown privileges are enabled. Perhaps run "ping -n 30 127.0.0.1" in the .bat script so it hangs around long enough for you to check the privileges under process explorer.

Reply
Share
BillP
Administrator BillP Administrator
Administrator

Posted: ‎2021-07-01 03:14 AM

0 Likes
0
627
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
Share

Posted: ‎2021-07-01 03:14 AM

This reply was originally posted by Angela on APC forums on 6/14/2013


I also have someone helping with this and based on your latest feedback here was the suggestion:

Start the  'Interactive Services Detection' service from Start/Control Panel/Administrative Tools/Services. Then try the process again. If the theory is correct, then you should see a blinking icon on your taskbar basically indicating that a process is requesting to run. If you allows it, then you will be taken to a session where you can interact with it. It will not solve the problem but it will show that the .exe is being called.

Reply
Share
whoups_apc
Crewman whoups_apc
Crewman

Posted: ‎2021-07-01 03:14 AM

0 Likes
0
628
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
Share

Posted: ‎2021-07-01 03:14 AM

This was originally posted on APC forums on 4/26/2015


I'm late to this party, but I encountered the exact same problem and figured out a work-around: use the Windows Task Scheduler!

  1. Create a task that executes whatever you'd like (I tested with shutdown /i), set a suitable user account for running it (I picked my user account) and check "Run with highest privileges" if necessary (not necessary for my test), and allow it to be started manually. Give the task a suitable name, e.g. ShutdownTest.
  2. Create a script for PowerChute to execute, and add this line: @start schtasks /run /tn ShutdownTest
  3. Execute it from PowerChute and watch it work 😉

Works perfectly, at least for me! cool

Reply
Share
Preview Exit Preview

never-displayed

You must be signed in to add attachments

never-displayed

Additional options
You do not have permission to remove this product association.
 
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 forum after you log in or create your free account.
Forum-Icon

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.

Register today for FREE

Register Now

Already have an account?Login

Terms & Conditions Privacy Notice Change your Cookie Settings © 2023 Schneider Electric, Inc