Jump to content

OSBot windows process management


Recommended Posts

Posted

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

  • 1 year later...
  • 1 year later...
Posted

You could try using a ProcessHandle to get a handle to the child process after launching the main OSBot process. Once the login window opens, you can listen for the new process to spawn and grab its PID. A simple way to achieve this is to use a loop to check for active processes after starting OSBot. Another option is to use a library like JNA to interact with the Windows API, which might give you better control over the processes.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...