simson9900 Posted August 6, 2021 Share Posted August 6, 2021 Hello, I am trying to automate opening and killing OSBot processes in Windows by utilizing the ProcessBuilder library in Java 11. I can easily open OSBot using the cli with -login flagged, and keep the PID for future termination. The problem is that the OSBot login window opens for a second to log me in, to then open a new process that is the actual bot client. I therefore immediately lose the PID connection to the process. Any ideas how to work arround that? Kind regards Quote Link to comment Share on other sites More sharing options...
AtlassianTarsier Posted December 24, 2022 Share Posted December 24, 2022 (edited) wmic process Where "CommandLine Like '%oempaloempa%'" Call Terminate Replace oempaloempa with the runescape account name. So it will look for the command that was started containing that runescape account name :)! Took me a while to find a solution for this problem.. Edited December 24, 2022 by AtlassianTarsier Quote Link to comment Share on other sites More sharing options...