Alex Rivera | Logout

Is there a way to make a self-updatable executable in windows?

Asked 2009-01-20T00:26:19.253
10

I would like to produce an executable that could make an update verification before it loads, and then, if there is some update, I would like it to replace its file and then reload.

I think it would be better than to have an "updater" exe separated, because what if the updater has to be updated?

It is not possible for me to have shared folders in the network.

Edit
Report

1 Answer

5

The executable could not replace its own file but it could download the new Exe to a known location or filename within the same directory and then, on exit, kick off a process that switches the file so you'll have the update the next time it runs.

If you think about it, this is a better approach anyway, as you could not be sure that the file download would complete. Even if you could, would you really want to make the user wait until the download completed? No...better to let the download run in the background.

answered 2009-01-20T00:39:56.183

Your Answer