IPPにてスクリプトシャットダウンを行う際、シャットダウンスクリプトのファイルパスは「C:/Program Files (x86)/Eaton/IntelligentPowerProtector/configs/actions/」フォルダで固定されていますが、IPPの「config.js」ファイルを編集することでファイルパスの変更が可能です。本記事では、「C:/Windows/System32」フォルダに設定してタスクスケジューラを直接実行する方法を解説します。
はじめに
IPPのインストールやUPSとの接続や検出は済んでいる前提で、設定方法を解説します。予めご了承ください。
IPPのサービス停止/起動を行う際に、ログインボタンなどが反応しなくなる事象が発生することがありますが、その際はお使いのブラウザのキャッシュクリアを実施ください。
ご参考:【Chrome】ボタンをクリックしても反応しない場合 | 無停電電源装置(UPS) | イートン (eaton-daitron.jp)
スクリプトファイル格納先フォルダの変更
IPPのサービスを停止します。「スタートメニュー」-「Eaton」-「停止 Eaton Intelligent Power Protector」をクリックします。
※管理者権限で実行することを求められますので、「はい」をクリックします。

IPPのサービスが停止すると、下画像のようなウィンドウが表示されます。

次に、IPPのコンフィグファイルを編集します。エクスプローラーを起動し、「C:/Program Files (x86)/Eaton/IntelligentPowerProtector/configs」フォルダを開きます。「config.js」ファイルを右クリックし、「編集」をクリックします。

「config.js」ファイルが開きます。一番下までスクロールします。

「”commandPathConstraint”」と記載のある行に「”{appPath}/configs/actions”」という記載があります。画面青色部分がスクリプトファイルの参照先になっています。

本記事では、「C:/Windows/System32」に変更します。(任意のフォルダに変更することも可能です。)
編集が完了後、「config.js」ファイルを上書き保存します。
※フォルダパスの指定時、末尾に「/」をつけないこと。直接上書き保存できない場合は、デスクトップなどに保存してから上書きします。

IPPのサービスを開始します。「スタートメニュー」-「Eaton」-「開始 Eaton Intelligent Power Protector」をクリックします。
※管理者権限で実行することを求められるので、「はい」をクリックします。

IPPにログインし、「設定」-「シャットダウン」-「シャットダウン構成の編集」をクリックします。
スクリプトファイル配置先エラーの内容が「C:/Windows/System32」に変わっています。

「C:/Windows/System32/schtasks.exe /run /tn Task_Shutdown」と入力し、「保存」をクリックします。

以上で、「schtasks」コマンドを使用してIPPから直接タスクスケジューラの実行ができるようになりました。

サービスのログオンアカウント変更(IPP 1.74以上)
IPP 1.74以上でタスクスケジューラを実行する場合、ログオンアカウントの変更が必須になります。
ファイル名を指定して実行にて、services.msc と入力して実行。

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

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

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

タスクスケジューラの設定
〇全般タブ
ユーザがログオンしているかどうかにかかわらず実行する:ON
最上位の特権で実行する:ON
構成:Windows Server 2003、Windows XP、Windows 2000

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

〇操作タブ
プログラム/スクリプト:”C:/Script/mspaint_shutdown.bat”
引数の追加:なし

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

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

おわりに
X(旧Twitter)とYouTubeでEaton UPSの情報を配信しております。よろしくお願い致します。
X(旧Twitter) : https://twitter.com/eaton_daitron
YouTube : https://www.youtube.com/user/EatonDaito