I can provide you a clean code that's doing what you need, i've been using for a while in different applications until now. So it should be enought tested, it is robust and perfomed all the times well this feature "check for updates" and well the executable auto-replacing and app restart.
Here below the main features and procee steps:
- check the newest version info through a plain text file posted by the developer
- show the the end user the new info, message box ot ballon, ask for update
- take the new executable file asyncromus via http or ftp file transfer to temp folder, have a file transfer progress window
- update some registry info for next application restart
- restart de app
- replace the old exe with the new one
- restart the app in new version
- all those take max 10 sec for an executable 5-10Mb, if you have posted the new file on a intranet share folder, it depend on file transfer speed
I can send you a demo exe