Executable to update iself
Posted on 2007-03-28
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?????