Skip to content

About

A Python Tkinter application to run multiple batch files simultaneously, monitor their output, uptime, and status, and manage them dynamically.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

CEA Batch Manager

A Python Tkinter application to run multiple batch files simultaneously, monitor their output, uptime, and status, and manage them dynamically.

Features

  • Run multiple batch files at the same time
  • Monitor live output for each batch file in a dedicated console window
  • Track uptime and process status (Running, Finished, Error)
  • Close or renew running batch processes
  • Extract readable batch titles automatically
  • Lightweight and standalone GUI application
  • Clean, intuitive interface for batch process management

Requirements

  • Python 3.8+
  • Tkinter (usually included with Python)
  • Windows (for taskkill functionality; works on Unix with minor tweaks)

Installation

Option 1: Run from Source

  1. Clone this repository:
git clone https://github.com/yourusername/cea-batch-manager.git
cd cea-batch-manager
  1. Install dependencies (if needed):
pip install --upgrade pip
# Tkinter usually comes pre-installed with Python
# If not available, on Ubuntu/Debian: sudo apt-get install python3-tk
  1. Run the application:
python batch_manager.py

Option 2: Compile to Executable

Using PyInstaller (Recommended)

  1. Install PyInstaller:
pip install pyinstaller
  1. Compile to a single executable:
pyinstaller --onefile --windowed --icon=cea-Logo.ico --name="CEA Batch Manager" batch_manager.py
  1. The executable will be created in the dist/ directory

Alternative PyInstaller Commands

  • With console (for debugging):

    pyinstaller --onefile --icon=cea-Logo.ico --name="CEA Batch Manager" batch_manager.py
  • Create directory instead of single file:

    pyinstaller --windowed --icon=cea-Logo.ico --name="CEA Batch Manager" batch_manager.py

Using Auto-py-to-exe (GUI Alternative)

  1. Install the GUI tool:

    pip install auto-py-to-exe
  2. Launch the GUI:

    auto-py-to-exe
  3. Configure settings:

    • Script: batch_manager.py
    • Onefile: ✅
    • Window Based: ✅
    • Icon: cea-Logo.ico
    • Name: CEA Batch Manager

Usage Guide

Running Batch Files

  1. Open and Run Batch File: Click the "Open and Run Batch File" button to select and execute a batch file
  2. Monitor Output: Each batch file gets its own output window showing real-time logs
  3. Track Status: View the current status (Running, Finished, Error) and uptime for each process

Managing Processes

  1. Close Selected Batch: Select a running batch and click "Close Selected Batch" to terminate it
  2. Renew All Running: Restart all currently running batch files with a single click

Interface Layout

  • Top Bar: Main control buttons for managing batch files
  • Upper Panel: List of all batch files with their status and metadata
  • Lower Panel: Detailed output console for the selected batch file

Project Structure

cea-batch-manager/
├── batch_manager.py          # Main application code
├── cea-Logo.ico             # Application icon
├── elevated.manifest.xml     # Windows manifest for UAC
├── README.md                 # This documentation
└── .gitignore               # Git ignore rules

Code Overview

Main Components

  • BatchRunnerApp: Main Tkinter application class
  • Process Management: Handles starting, monitoring, and stopping batch processes
  • Threading: Uses separate threads for each batch process to prevent UI freezing
  • Output Monitoring: Real-time capture and display of batch file output

Key Functions

  • open_and_run(): File dialog to select and execute batch files
  • close_selected_batch(): Terminate specific batch processes
  • renew_all_running(): Restart all active batch processes
  • monitor_process(): Thread function to monitor process output and status

Troubleshooting

Common Issues

  1. Icon not loading: Ensure cea-Logo.ico is in the same directory as the executable
  2. Permission errors: Run as administrator if batch files require elevated privileges
  3. Batch file not found: Use absolute paths or ensure batch files are accessible

Debug Mode

To run with console output for debugging:

python batch_manager.py
# Or compile without --windowed flag
pyinstaller --onefile --icon=cea-Logo.ico batch_manager.py

Building for Distribution

Creating Installer (Optional)

For professional distribution, consider creating an installer:

  1. Using Inno Setup (Windows):

    • Download and install Inno Setup
    • Create a script to package the executable and dependencies
    • Generate a professional installer
  2. Using NSIS (Alternative):

    • Install NSIS
    • Create installation script
    • Build installer package

Version Management

Update version information in the executable by modifying the PyInstaller command or using version files.

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

License

[Add your license information here]

Support

For issues and questions:

  • Create an issue on GitHub
  • Check the troubleshooting section above
  • Review the code comments for additional context

About

A Python Tkinter application to run multiple batch files simultaneously, monitor their output, uptime, and status, and manage them dynamically.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages