Executable to update iself

I have created a "Loader" utility that with some certain parameters checks whether the target exe file has the same checksum (using MD5 algorithm), and if different downloads the updated version of the target.exe which exists on a read-only directory, executes the file downloaded and terminates itself (the loader.exe). That way I don't need to install evey update on any program in the company I work since the user infact does not execute the target.exe but the loader that first downloads updated target and then executes the target ;)

Question: How can I update the loader.exe itself? I mean I cannot directly download the file since its already in use. How can I download a program from within the SAME program and update it? How can loader.exe update itself?????

the simplest way (I think):
- loader runs
- loader downloads an updater.exe and the new loader.exe (under a different name or location)
- loader starts updater and terminates
- updater tries to delete old loader.exe at a 500 ms interval until it succeeds
- then updater copies the new loader.exe into the place of the old one
- updater deletes the new loader.exe which was downlaoded into another location or name and then starts loader.exe
- loader.exe, on startup, checks wheter updater.exe is present and if so, tries to delete it at a 500 ms interval until succeeds

Saying C Grade u mean the points? They seem much?
They are much for this solution, but from the beggining I didn't believe any suggestion much different would occur. I just gave it a "go" incase there is a way to patch a file that already runs... but I don't believe myself anything like that is possible... so I accepted this as solution since its what 99% of the people would do and waste no more time on something more sophisticated that after all would end up to the same result :)

points and grade have different meaning.
points caracterize the question: difficulty, urgency, etc
grade caracterizes the experts response: good or bad. a C grade means a bad answer. which we both agree is not the case here.

you should have read that before accepting since you obviosly mistakaned the grade meaning. not a big issue since it happens to new members :) if after reading the tips you feel that ineed I deserved more or maybe just want to reopen teh question for further discussion, then please do post in community support asking that.

So I didn't infact rate this as a bad accepted answer. On the contrary, I said its an average answer containing a good suggestion. I would ofcourse rate it [A] if a self-patch solution existed as a windows service to auto-activate the patch procedure on program close-up maybe or so... As I know its 2x the points which is not 4x as the [A] would do and if I knew that my rating effects the points given I would go for at least [B], but anyway...

I was just thinking about something else when I saw an explanation for you in this case. so let me try to explain this:

I'll go from here: "So C grade goes because its the answer that anyone would think, including me, but its still an accepted answer."

I will post the following question:
"Is there a way for a person to drink up all by himself an ocean, to the last drop of water?"

someone comes and answers: "no. that is impossible"

that is, and I quote: "the answer that anyone would think". So this goes a C grade, right? well, wrong. The answer is perfect.
let me explain you why.

A C grade means, that there are at least 2 other, different answers that can be given a B and respectivly an A grade. It is logical right? Any question can have an A gradable answer. So, if my question can have an A gradable answer and I am giving it a C grade, it means that somewhere, it is certain that an A answer exists. Can you find it? No. because actually there isn't one. So my choice of C grade is wrong.

Read the grading tips again. Don't try to interpret the meaning of the grades yourself. The tips are there so that you don't interpret it as you want and live by the general rules.
So, if I gave the perfect answer, even if that answer is the most common sense, the grade must be an A. because the **ANSWER** is perfect. you can't get any better than that.
the grade shows how good/bad the answer was and nothing more. If there is no better answer, you cannot give a grade lower than A. this would mean suicide for the expert.
Look at it from my point of view: I want to anser a question. I want to receive an A grade. just like in school. If I were to apply your logic, I will never answer your question because there is no way for me to receive an A. does that makes sence to you? In school, the teacher askes: how much is 2+2. The kid answers 4. The teacher gives him a C because everybody knows that? It's not really my fault that you asked a quesiton to which you knew the answer because it is a generally known answer.

the right way to go with such a problem where you know the answer and just want to make sure that is the best answer:
- post your question
- somebody answers giving the answer you thought yourself is the best
- wait some time. like 1-2-3 weeks.
- if no better answer is given, it means there is no better answer OR the expert that has a better answer did not read your question but you cannot know that, so your only solution is to grade the best answer with an A.

this is the logical way to do. (and of course, if you have unexplained parts from the question, or things that are not clear, you should ask, so the exprets can clearify them for you)

If you still didn't understand how to grade, I'll leave the moderators to explain, because this is their line of expertise, not mine.

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …

Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ...
Some objects defined and used in this source include:
…

The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database.
Open Services Panel:
Create a new connection using New Connection Wizard:
Create a test database called eetutorial:
Create a new test tabel called ee…