브랜드

Impact-Company-Logo-English Black-01-177x54

슈나이더 일렉트릭 코리아 웹사이트에 방문해 주셔서 감사합니다.

슈나이더 일렉트릭 코리아 웹사이트 방문자 분들 모두 환영합니다.
		
오늘 무엇을 도와드릴까요?
Windows command file is not running within PowerChute: How to check correct syntax usage.

Article available in these languages: 프랑스어

Issue:
A command file is not running within PowerChute.

Product Line:
PowerChute Network Shutdown
PowerChute Business Edition
PowerChute Serial Shutdown

Environment:
All supported Windows Operating Systems.

NOTE: For assistance with Linux/Unix scripts see Schneider Electric FAQ PowerChute Network Shutdown for UNIX/Linux is not running shell scripts/command
Cause:
Syntax

Solution:

The command file runs using the local system account. PowerChute cannot execute programs that require interaction with the desktop; only command line-enabled programs are supported, e.g., if you try to launch Notepad, it will fail. In earlier versions of Windows, all services run in Session 0 along with applications. This situation poses a security risk. In Windows Vista and later versions of Windows, the operating system isolates services in Session 0 and runs applications in other sessions. PowerChute is run in Session 0, so if a command file launches a .exe, that .exe will be launched in Session 0 and not visible to the logged-in users. To verify that the .exe has launched open Task Manager, review the list of Processes running. More information on Windows Session can be found at http://blogs.technet.com/b/askperf/archive/2007/04/27/application-compatibility-session-0-isolation.aspx.


NOTE: With the release of PowerChute Network, Shutdown 4.4, all command files and SSH files must reside in C:/Program Files/APC/PowerChute/user_files. When adding the file, the full path must be entered. Folder name alias (e.g., c:\progra~1\apc\…) is not acceptable.

To execute command files from PowerChute, you must use the correct syntax.
If the command file contains statements to run executable files (.exe), you must use the command called @START in the statements.

The @START command uses the following syntax rules:

The following examples illustrate the correct use of syntax for use with APC shutdown utilities as executables:

Example: An executable program with no spaces in the full pathname.
No quotes are required:
@START C:\APC\Oracle\PWRFAIL.BAT

quotes required:
@START C:"\Program Files\APC\PWRFAIL.BAT"

* Quotes are not needed when entering the PowerChute Network Shutdown 4.4 and above path.
Example: C:/Progam Files/APC/PowerChute/user_files/PWRFAIL.BAT

You can test that the command file operates correctly by running a simple command file.
  1. Create a directory, named apctest, directly to the C drive.
  2. Open a text editor e.g. Notepad++ and enter the following line time /T >> C:\apctest\cmdtext.txt
  3. Save the file as a batch file
  4. Add Test.bat to a PowerChute event and trigger the event.
  5. PowerChute will run the command file and add a file to C:\apctest named cmdtext.txt.
  6. Open cmdtext.txt with a text editor, and you will see the date and time from when Test.bat ran.


When attempting to power down a remote system, the PowerChute service account must be changed from a Local System account to an account with permissions on the remote system to power it down.
In the screenshot, the account has been changed to wkadmin for the PowerChute Network Shutdown service. The same would need to be done for the PowerChute Business Edition Agent service.

PowerChute Service Properties Window
The command file syntax used to shut down a remote server is
shutdown /s /f /m \\server ip /c "PowerChute has initiated a system shutdown" /t 0 Users should enter the proper ip address of their server and should adjust the /t (time delay) to meet their needs.

See Microsoft TechNet for more information on running the shutdown command https://technet.microsoft.com/en-us/library/bb491003.aspx

The syntax for running a remote command on a Linux system using Putty/plink is
C:"\Program Files (x86)\PuTTY\plink.exe" -batch username@<ip address> -pw <users password> "command to be run on remote Linux system"
Example: C:"\Program Files (x86)\PuTTY\plink.exe" -batch myuser@192.168.0.100 -pw mypassword "shutdown -h now"


슈나이더 일렉트릭 Korea

자세히 알아보기
제품군
자세히 알아보기
제품군

도움이 필요하신가요?

  • 제품 선택기

    애플리케이션에 적합한 제품과 액세서리를 빠르고 쉽게 찾을 수 있습니다.

  • 견적 받기

    영업 관련하여 온라인으로 문의하시면 전문가가 연락드립니다.

  • 구매처

    해당 지역의 가장 가까운 슈나이더 일렉트릭 대리점을 쉽게 찾을 수 있습니다.

  • 지원 센터

    한 곳에서 모든 요구 사항에 대한 지원 리소스를 찾아보십시오.

  • 제품 문서
  • 소프트웨어 다운로드
  • 제품 선택기
  • 제품 대체 및 교체
  • 지원 및 연락처 센터
  • 영업소 검색
  • 견적 받기
  • 슈나이더 일렉트릭 커뮤니티
  • 채용
  • 회사 소개
  • 부정 행위 보고
  • 접근성
  • 뉴스룸
  • 투자자
  • Ecostruxure
  • 작업 검색
  • 블로그
  • 개인정보 취급방침
  • 쿠키 공지
  • 사용 약관
  • Change your cookie settings