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

We Value Your Feedback!
Could you please spare a few minutes to share your thoughts on Cloud Connected vs On-Premise Services. Your feedback can help us shape the future of services.
Learn more about the survey or Click here to Launch the survey
Schneider Electric Services Innovation Team!

PCB Shutdown Command File Doesn't Execute

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
  • 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 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
Erasmus_apc
Sisko Erasmus_apc
112
Teken
Spock Teken
110
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 . Last Modified: ‎2024-03-05 11:05 PM

0 Likes
16
2149
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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: ‎2021-07-01 03:14 AM . Last Modified: ‎2024-03-05 11:05 PM

PCB Shutdown Command File Doesn't Execute

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

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

  • All forum topics
  • Previous Topic
  • Next Topic

Accepted Solutions
whoups_apc
Crewman whoups_apc
Crewman

Posted: ‎2021-07-01 03:14 AM . Last Modified: ‎2024-03-05 11:02 PM

0 Likes
0
2146
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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: ‎2021-07-01 03:14 AM . Last Modified: ‎2024-03-05 11:02 PM

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

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

Replies 16
voidstar_apc
Janeway voidstar_apc
Janeway

Posted: ‎2021-07-01 03:14 AM . Last Modified: ‎2024-03-05 11:05 PM

0 Likes
0
2146
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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: ‎2021-07-01 03:14 AM . Last Modified: ‎2024-03-05 11:05 PM

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

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

BillP
Administrator BillP Administrator
Administrator

Posted: ‎2021-07-01 03:14 AM . Last Modified: ‎2024-03-05 11:05 PM

0 Likes
0
2146
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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: ‎2021-07-01 03:14 AM . Last Modified: ‎2024-03-05 11:05 PM

Another suggestion I had was:

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

Reply

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

BillP
Administrator BillP Administrator
Administrator

Posted: ‎2021-07-01 03:14 AM . Last Modified: ‎2024-03-05 11:05 PM

0 Likes
0
2146
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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: ‎2021-07-01 03:14 AM . Last Modified: ‎2024-03-05 11:05 PM

Hello to All,


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


Regards,

Reply

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

BillP
Administrator BillP Administrator
Administrator

Posted: ‎2021-07-01 03:14 AM . Last Modified: ‎2024-03-05 11:05 PM

0 Likes
0
2146
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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: ‎2021-07-01 03:14 AM . Last Modified: ‎2024-03-05 11:05 PM

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

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

BillP
Administrator BillP Administrator
Administrator

Posted: ‎2021-07-01 03:14 AM . Last Modified: ‎2024-03-05 11:05 PM

0 Likes
0
2146
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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: ‎2021-07-01 03:14 AM . Last Modified: ‎2024-03-05 11:05 PM

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

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

BillP
Administrator BillP Administrator
Administrator

Posted: ‎2021-07-01 03:14 AM . Last Modified: ‎2024-03-05 11:05 PM

0 Likes
0
2146
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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: ‎2021-07-01 03:14 AM . Last Modified: ‎2024-03-05 11:05 PM

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

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

BillP
Administrator BillP Administrator
Administrator

Posted: ‎2021-07-01 03:14 AM . Last Modified: ‎2024-03-05 11:05 PM

0 Likes
0
2146
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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: ‎2021-07-01 03:14 AM . Last Modified: ‎2024-03-05 11:05 PM

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

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

BillP
Administrator BillP Administrator
Administrator

Posted: ‎2021-07-01 03:14 AM . Last Modified: ‎2024-03-05 11:05 PM

0 Likes
0
2146
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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: ‎2021-07-01 03:14 AM . Last Modified: ‎2024-03-05 11:05 PM

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

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

BillP
Administrator BillP Administrator
Administrator

Posted: ‎2021-07-01 03:14 AM . Last Modified: ‎2024-03-05 11:05 PM

0 Likes
0
2146
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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: ‎2021-07-01 03:14 AM . Last Modified: ‎2024-03-05 11:05 PM

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

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

BillP
Administrator BillP Administrator
Administrator

Posted: ‎2021-07-01 03:14 AM . Last Modified: ‎2024-03-05 11:05 PM

0 Likes
0
2146
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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: ‎2021-07-01 03:14 AM . Last Modified: ‎2024-03-05 11:05 PM

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

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

voidstar_apc
Janeway voidstar_apc
Janeway

Posted: ‎2021-07-01 03:14 AM . Last Modified: ‎2024-03-05 11:05 PM

0 Likes
0
2146
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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: ‎2021-07-01 03:14 AM . Last Modified: ‎2024-03-05 11:05 PM

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

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

BillP
Administrator BillP Administrator
Administrator

Posted: ‎2021-07-01 03:14 AM . Last Modified: ‎2024-03-05 11:05 PM

0 Likes
0
2146
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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: ‎2021-07-01 03:14 AM . Last Modified: ‎2024-03-05 11:05 PM

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

Reply

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

BillP
Administrator BillP Administrator
Administrator

Posted: ‎2021-07-01 03:14 AM . Last Modified: ‎2024-03-05 11:02 PM

0 Likes
0
2146
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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: ‎2021-07-01 03:14 AM . Last Modified: ‎2024-03-05 11:02 PM

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

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

voidstar_apc
Janeway voidstar_apc
Janeway

Posted: ‎2021-07-01 03:14 AM . Last Modified: ‎2024-03-05 11:02 PM

0 Likes
0
2146
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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: ‎2021-07-01 03:14 AM . Last Modified: ‎2024-03-05 11:02 PM

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

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

BillP
Administrator BillP Administrator
Administrator

Posted: ‎2021-07-01 03:14 AM . Last Modified: ‎2024-03-05 11:02 PM

0 Likes
0
2146
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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: ‎2021-07-01 03:14 AM . Last Modified: ‎2024-03-05 11:02 PM

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

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

whoups_apc
Crewman whoups_apc
Crewman

Posted: ‎2021-07-01 03:14 AM . Last Modified: ‎2024-03-05 11:02 PM

0 Likes
0
2147
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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: ‎2021-07-01 03:14 AM . Last Modified: ‎2024-03-05 11:02 PM

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

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