Is it possible to create a script or batch to taskkill on application close?
Posted on 2010-09-10
I have an exe application that throws a .NET error when you close the GUI. The .NET error is persistent and requires that you 'end process' on the exe in order to get rid of the error and actually close the running exe. I have created a batch that I can run using taskkill /IM application.exe /F and it kills the exe and will also kill the .NET error. My question is this. Can I have a script or batch file launch the exe application (instead of using the actual exe shortcut) and then when I close the GUI, the script or batch will taskkill the exe process for me? Currently, I launch the exe with its default shortcut, then have to launch the taskkill batch after I close the GUI. Most of my users will either forget or will still be upset with the extra step. Any options here?