How about a .bat file that closes the apps on click?
Paste the following into notepad and save as a .bat file
FOR /F %%x IN ('tasklist /NH /FI "IMAGENAME eq %EXE%"') DO IF %%x == %EXE% goto FOUND
start "" "PATH TO SPOTIFY.EXE"
start "" "PATH TO TOASTIFY.EXE"
start "" "PATH TO EZBLOCKER.EXE"
taskkill /IM spotify.exe
taskkill /IM toastify.exe
taskkill /IM ezblocker.exe
set EXE - Your executable file (spotify.exe etc.)
FOR /F %%x IN ('tasklist /NH /FI "IMAGENAME eq %EXE%"') DO IF %%x == %EXE% goto FOUND - check if EXE alias, spotify.exe, is running.
start "" "PATH TO SPOTIFY.EXE" - Launch spotify and other apps if not running.
taskkill /IM spotify.exe- Kill spotify and other apps if running.
Get the process name from the task manager and change the running .exe as applicable.
/IM will send the terminate signal to the application. However, for certain application such as Spotify, the application might simply minimize to the taskbar. Use
/F to force close them in that case.