Ad Widget

Collapse

Windows: Controllo processi batch

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Analysis
    Junior Member
    • May 2024
    • 2

    #1

    Windows: Controllo processi batch

    Buon pomeriggio a tutti,
    ho bisogno di controllare con Zabbix se un batch ( file.bat ) è attivo, in sostanza lo stesso lancia una finestra dos e vorrei tramite il titolo della finestra (barra del titolo dei prompt dei comandi) intercettare se è attivo. Il BAT infatti esegue il comando TITLE per settare il titolo della finestra nella quale il programma è in esecuzione ( php, cmd , etc) come è possibile fare ?
    Grazie
    Last edited by Analysis; 24-05-2024, 10:46.
  • Analysis
    Junior Member
    • May 2024
    • 2

    #2
    Come si può lanciare un programma (exe) in primo piano o ridotto ad icona invece che in background con la funzione system.run ?

    Comment

    • EnricoAbaco
      Junior Member
      • Jun 2024
      • 15

      #3
      una cosa simile forse sarà da spunto tasklist | findstr cmd oppure con powershell fai ogni cosa, chatgpt torna comodo.

      Comment

      • Baird65
        Junior Member
        • Jan 2026
        • 1

        #4
        To monitor your batch file by its window title in Zabbix, use a PowerShell script. Create a script that checks the processes cmd or conhost and matches the MainWindowTitle property to the title you set with the TITLE command.

        Configure it as a Zabbix agent item on Windows. The script should output 1 (active) or 0 (not active), allowing you to set triggers easily.

        For native Windows creation tools that avoid the complexity of batch monitoring, you might explore visual software like alight motion windows, which provides a graphical interface that's much simpler to manage and track than command-line processes.

        Comment

        Working...