467,915 Members | 1,147 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,915 developers. It's quick & easy.

Want Auto-Updating, conflicted on best approach.

So I have this windows .net form app, and I have the following goals:

-Needs to be 1 single file, the executable, in any directory the user decides to download it to. No installation folder, no launcher/updater app, no registry entries.

-App to automatically check for updates, ask permission from user, update app, and relaunch.(if necessary)



I've never done this before, so I don't know the correct way to go about this, and my current idea is this:

1) Launch app, check a webservice for updates. If app is up to date, or if app does not receive a response fast enough, or if there is an exception, or if user selects not to update, continue launching app like normal.

2) If app is out of date and user selects to update, download 2 applications from webservice. Lets call them newForm.exe and updater.exe. Since I don't know what filenames will exist in the app's directory, they'll be named something random until they're confirmed to not overwrite anything.

3) "updater.exe" will be executed and passed the current app's filename as well as the new "newForm.exe" app's filename.

4) updater.exe closes all threads and processes of the current app, then deletes the current app executable.

5) updater.exe renames newForm.exe to whatever the original app's filename was, and then executes newForm.exe, passing along updater.exe's filename.

6) newForm.exe is now the current app, only now its updated. If it is launched with updater.exe's filename as an argument, deletes updater.exe. And then it should just be the updated standalone form, I think.



Like I said, I've never attemped auto-updating before, but with this current app, user convenience is the highest priority. These users have a history of never updating anything because they can't be arsed to read their email, and they hate installing things. Im seriously considering not even asking them if they want to update and just force it down their throat.

Questions:
Is this approach silly/ridiculous and done better in a much simpler way?

Will this approach work, or will windows/firewalls/anti-virus programs get in the way and mess it all up?


Any help, tips, and advice are much appreciated!
Aug 11 '08 #1
  • viewed: 1559
Share:

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Manlio Perillo | last post: by
1 post views Thread by Lew | last post: by
2 posts views Thread by Tom | last post: by
20 posts views Thread by Vijay Kumar R. Zanvar | last post: by
5 posts views Thread by maya | last post: by
13 posts views Thread by S.Dickson | last post: by
22 posts views Thread by nospam_news | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.