Answer the question
In order to leave comments, you need to log in
How to overwrite a running file in golang?
You need to make an update system.
New files are downloaded, and then you need to update the running file itself.
He cannot delete himself, because. loaded into memory - I decided to make a bat file or another application that will launch, delete it and name the new version by its name and launch it later, but it turns out that the bat file is not executed separately, but is loaded into the program itself - well, as a result, nothing happens .
How are the problems of updating a running file solved?
Answer the question
In order to leave comments, you need to log in
Могу посоветовать в общем случае, не по языку. У нас есть ПО, которое запускается только при определенных условиях. Если условия не подходят, то это ПО создает рядом с собой батник и запускает его, а само выгружается. Батник затем действует независимо. В нем прописано удаление экзешника ПО и затем он удаляет сам себя.
В вашем случае я думаю можно сделать все так же, только сам главный экзешник обновлять в последнюю очередь
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question