In the company I work with we have an application called Socket developed in Java to run files in the browser, but I need a bat to kill the process and close the application icon and start it again, but it will not accept 2 socket open, I have managed to do so that kills the process and starts it again, but when it starts from the error of getting two socket open, I need a bat that closes the icon and when boot open again, that icon is next to the bar tasks next to the speaker, I hope I have explained correctly.
@echo off
taskkill /F /IM conhost.exe (nome do processo)
C:\SOCKET\ExecuteAppCaixa.jar (caminho para abrir)
pause