Skip to content

This small application allows to start multiple applications at once and if one of them is closed, the others are killed.

License

Notifications You must be signed in to change notification settings

clemthi/runsyncapps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RunSyncApps

This small application allows to start multiple programs at once and if one of them is closed, the others are killed. Tested on Windows 11 and MacOS 14.5

1. Building

go build -o="runsyncapps.exe" ./cmd/

On Windows, You can add the build flag -ldflags="-H windowsgui" to avoid the console to open when starting the app.

2. Usage

runsyncapps.exe --config=myconfig.json --log
  • config : path of the config file (config.json by default)
  • log : log events in a trace_<timestamp>.log file (disabled by default)

3. JSON configuration

The configuration file looks like this:

{
    "waitCheck": 10,
    "waitExit": 10,
    "applications": [
        {
            "path": "C:\\Windows\\System32\\dxdiag.exe",
            "useExistingInstance": false,
            "killOnExit": true
        },
        {
            "path": "C:\\Windows\\System32\\charmap.exe",
            "useExistingInstance": false,
            "killOnExit": true
        },
        {
            "path": "C:\\Windows\\System32\\msinfo32.exe",
            "useExistingInstance": false,
            "killOnExit": false
        }
    ]
}

The parameters are the following:

  • waitCheck: timer (in seconds) after the processes are being monitored
  • waitExit: timer (in seconds) before the processes are being killed
  • applications: array of application to start:
    • path: full path of the application
    • useExistingInstance: don't start a new instance if there is one already running
    • killOnExit: kill the application if it's running after another app has been killed

4. SystemTray icon

A system tray icon allows the using to exit the application without killing the child processes.

This works by default on Windows.

On MacOS you will need to bundle the application (see getlantern/systray lib info and official Apple documentation).

About

This small application allows to start multiple applications at once and if one of them is closed, the others are killed.

Resources

License

Stars

Watchers

Forks

Languages