I'm sorry if this question exists, I can't specifically find this case when googling it up, and to be frank I'm even unsure what tags to use.
I am developping a solution, with a launcher. There is a problem however: my team doesn't want to make the launcher and the actual program two different binary files, which I believe is a conception mistake.
Either way they won't change their mind so we're going with that.
My "launcher" part of the program currently succesfully fetches new versions on our server. I however want to be able to, as soon as the new version is downloaded, quit the current binary, delete the old one, launch the new one.
It has, ontop of that, to be multiplatform.
Now, if I recall correctly I think that on linux, it's very possible to delete a binary on the hard drive as it runs in memory. I'm really, really unsure if it can be done on Windows however.
Is it possible to delete a program that is currently running on windows, with an instruction to launch the new one somehow?
Tell me what you think. In my mind it really sounds unfeasable, but if it can be done, I would really like to know how. At the very least, if it can't be done on either OS, I'll just show my team the answers.
Thank you in advance, sorry about the very vague "what if" questions and such.