Open webiummedia opened 9 years ago
Similar issue here. Persistence is eventually going to be in the form of a Windows Service. Restarting the client if it is killed really isn't a simple manner to do correctly. It is easy to spawn a mess of other programs to make sure the main one is still alive among other methods, but it is a slippery slope with regard to a viable solution and a hacky implementation.
Do anybody know how Darkcomet (or was it Babylone) does it?
Darkcomet mostly used HKLM Run Keys and Userinit Keys.
We could spawn a cmd
process which checks the client process and restarts it if needed. (client can also check if cmd
process got killed, so they watch each other)
I think that's a simple and brilliant idea =)
I'd suggest to make the delay for the client persistence modular, so you can choose whether you want it to come back immediately or after a set delay.
That would be awsome
We shouldnt spawn the process from the client application directly from the process.start since if client.exe is termintaed, the cmd will also likely be terminated. Correct me if i am wrong.
@rabbitsmith It's fine to use Process.Start
, just set the correct parameters in ProcessStartInfo
. :)
But then the client process will be the parent process. If you select "Kill process structure" in Task Manager it will kill the CMD process too.
You have to start the CMD via a batch file with the "start" command to bypass it.
Alright, seems possible.
My idea for this would be:
Everything should be started even before the Client initializes in a second thread.
I already have a similar project to this, I just have to find it. If you like the idea, I can implement it and create a pull request.
(I hope you can follow my broken english)
@Crash129 Your English is not broken. It was actually very understandable and nearly flawless. :) Just to point out, many of us know more languages than English, so please feel free to speak your native language if you feel you aren't making sense. I think your idea would work quite well. It is simple, which is good because I don't think persistence should be a complex thing to implement using the methods we currently are thinking about using.
My native one is albanian,, Who's fmailiar with it?! :P
In the builder we could have a box that we can tick called persistent process. When the client process is killed it goes back online a few minutes later.