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.
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:
I then run Agent and setup the shutdown settings:
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
Link copied. Please paste this link to share this article on your social media post.
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!
Works perfectly, at least for me!
Link copied. Please paste this link to share this article on your social media post.
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:
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.
Link copied. Please paste this link to share this article on your social media post.
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]
Link copied. Please paste this link to share this article on your social media post.
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,
Link copied. Please paste this link to share this article on your social media post.
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:
I then run Agent and setup the shutdown settings:
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
Link copied. Please paste this link to share this article on your social media post.
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).
Link copied. Please paste this link to share this article on your social media post.
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.
Link copied. Please paste this link to share this article on your social media post.
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.
Link copied. Please paste this link to share this article on your social media post.
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
Link copied. Please paste this link to share this article on your social media post.
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?
Link copied. Please paste this link to share this article on your social media post.
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.
Link copied. Please paste this link to share this article on your social media post.
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.
Link copied. Please paste this link to share this article on your social media post.
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.
Link copied. Please paste this link to share this article on your social media post.
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.
Link copied. Please paste this link to share this article on your social media post.
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.
Link copied. Please paste this link to share this article on your social media post.
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.
Link copied. Please paste this link to share this article on your social media post.
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!
Works perfectly, at least for me!
Link copied. Please paste this link to share this article on your social media post.
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.