IPPからEXEファイルの実行と、シャットダウンを含んだコマンド処理を実行したいときの設定方法を解説します。
IPPからEXEファイルを実行するには、タスクスケジューラを経由して実行します。
また、今回はEXEファイルの実行に加えてシャットダウン処理も実行したいので、IPP→タスクスケジューラ→Bat実行の順で実装します。
はじめに
IPPのインストールやUPSとの接続や検出は済んでいる前提で、設定方法を解説します。予めご了承ください。
IPPのサービス停止/起動を行う際に、ログインボタンなどが反応しなくなる事象が発生することがありますが、その際はお使いのブラウザのキャッシュクリアを実施ください。
ご参考:【Chrome】ボタンをクリックしても反応しない場合 | 無停電電源装置(UPS) | イートン (eaton-daitron.jp)
検証環境
今回の検証では、下記の環境で行っています。
〇IPP 1.73 Windows版
〇Windows 10 Pro
サービスのログオンアカウント変更(IPP 1.74以上)
IPP 1.74以上でタスクスケジューラを実行する場合、ログオンアカウントの変更が必須になります。
ファイル名を指定して実行にて、services.msc と入力して実行。

サービス一覧の中から、Eaton Intelligent Power Protectorを見つけて右クリック。[プロパティ]を選択します。

ログオンタブに移動し、[ローカルシステムアカウント]と[デスクトップとの対話をサービスに許可]をチェックしてOKを押します。

サービスを再起動します。

実行するスクリプトファイルの用意
任意のフォルダに実行するスクリプトファイルを用意します。
ここではMspaint実行→待機(60秒)→GeekUninstaller実行→待機(60秒)→シャットダウンの順で実行するbatファイルです。
C:¥IPPTEST¥exe_shutdown.bat
@echo off
start C:\WINDOWS\system32\mspaint.exe
powershell sleep 60
start C:\Users\Administrator\Desktop\geek.exe
powershell sleep 60
shutdown /s /f /t 30
@echo on
スクリプトファイル格納先フォルダの変更
IPPからタスクスケジューラを実行できるようにするため、下記の記事を参考にしてスクリプト格納先フォルダの変更を行います。
※タスクスケジューラの設定内容は次の項目で解説いたします。
【IPP】スクリプトファイル格納先フォルダの変更方法 | 無停電電源装置(UPS) | イートン
タスクスケジューラの設定
〇全般タブ
ユーザがログオンしているかどうかにかかわらず実行する:ON
最上位の特権で実行する:ON
構成:Windows Server 2003、Windows XP、Windows 2000 ※この構成を選択しないと正常動作しません

〇トリガータブ
(トリガーの設定は行いません。)

〇操作タブ
プログラム/スクリプト:”C:¥IPPTEST¥exe_shutdown.bat”
引数の追加:なし
※作成したスクリプトファイルのフルパスを指定してください。

〇条件タブ
次の時間アイドル状態の場合のみタスクを開始する:OFF
コンピュータをAC電源で使用している場合のみタスクを開始する:OFF
タスクを実行するためにスリープを解除する:ON

〇設定タブ
デフォルト設定のまま

IPPシャットダウンアクション設定
IPPにログインし、「設定」-「シャットダウン」-「シャットダウン構成の編集」をクリックします。

シャットダウンのタイプ:スクリプト
シャットダウンスクリプト:C:/Windows/System32/schtasks.exe /run /tn (作成したタスク名)
と入力し、「保存」をクリックします。

IPPシャットダウンテスト
IPPにログインし、「設定」-「シャットダウン」-「シャットダウンのテスト」をクリックします。

「シャットダウンテストを開始しますか?」ウィンドウが表示されますので、「はい」をクリックします。

「はい」をクリックすると、すぐにタスクが実行されます。Mspaintが起動されました。

Mspaint起動後60秒が経過すると、GeekUninstallerが起動されました。

MspaintとGeekUninstallerが起動後、60秒が経過するとOSシャットダウンが開始されました。

その後、シャットダウン処理が開始され、Windowsをシャットダウンできました。
以上の設定で、IPPからタスクスケジューラを介してEXEファイルの実行とコマンドを使ったシャットダウン処理が可能となります。
おわりに
XとYouTubeでEaton UPSの情報を配信しております。よろしくお願い致します。
X : https://twitter.com/eaton_daitron
YouTube : https://www.youtube.com/user/EatonDaito