Loading ...

Powerchute network shutdown, the commad line | General Questions & Suggestions

Home » Spaces » General Questions & Suggestions » discussion » General » Powerchute network shutdown, the commad line

Powerchute network shutdown, the commad line

Discussion in General Questions & Suggestions started by eric , 5/2/2020 9:37 AM
Login to follow, share, and participate in this space.
Not a member?Join now
Posted in: General

Powerchute network shutdown, the commad line

Subscribe to RSS
  • erpo

    Hi * 

    I have a SRT5KXLI and Powerchute Network Shutdown : v. 4.3.0.

    1) Issue with the command line:
    It works with a *.bat or *.exe, but not with parameters in the line.
    I tried also to add @start in the line, it does not work at all.

    2) FYI:  Solution for another issue : Windows isolates services in Session 0

    I found a way around the issue : "Win 10 isolates services in Session 0 ... 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. " 

    But I did cost me 2 days of work, was it documented elsewhere?

    My Method : 

    a - I run a command line  *.bat file to create a window event
    eventcreate /l application /t information /so "UpsPowerchute" /id 100 /d "UPS On Battery"

    and 

    b - I Create a Windows Task based on this event

    Windows task scheduler will be triggered by this newly created event, and start an action.

    You can import a predefined XML task file. Manual method : (GUI may varie a bit depending on Windows flavor (Win 7 / 10 / 10 pro / etc … )

    • Open “Task Scheduler” (taskschd.msc)

    • Menu: Action > Create basic task :

    • Name: UPS_On_Battery

    • Trigger : When a specified event is logged

      • Log: Application

      • Source : UpsPowerchute

      • Event ID : 100

    • Action : Start a Program / script:

      • 1 2 C:\blabla\Tools\blabla.exe parameters
      • To be able to create a Windows Event via DOS command eventcreate, you shall first create a RegEdit entry for the source UpsPowerchute you create :

        Regedit

        1 2 3 4 5 6 7 The key associated with an event source "UpsPowerchute" is
        Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application\UpsPowerchute

        EventMessageFile
        Value= %SystemRoot%\System32\EventCreate.exe

        CustomSource
        Value= 1
  • wpasquil

    Hi,

    On 5/2/2020 5:37 AM, eric said:

    1) Issue with the command line:
    It works with a *.bat or *.exe, but not with parameters in the line.
    I tried also to add @start in the line, it does not work at all.

    Tested PCNS 4.3 with a .bat to shutdown a remote Windows server and it works fine.  shutdown /s /f /m \\192.168.10.12 /c "PowerChute has initiated a system shutdown" /t 10 

    NOTE: you have to change the PowerChute user from local system account to an account that can access the remote server. 

Page 1 of 1 (2 items)
Choose your language:  
powered by Communifire
Version 7.0.7496.13049