Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (edited)
I'm trying to add an Updater Program to my Application. I downloaded the Application Updater .dll component and I'm using that...I got through most of it, but I'm unsure of what to do for the detecting and downloading...I see the command to do it, but it's not working the way I need it to... Enclosed is the program, the things that are commented are what I'm unsure of doing...basically making it detect, then download...And show the transfer rate and such....Anyways, any help would be appreciated! :) Edited by mutant
It's not impossible, it's Inevitable.
Posted

I used the following solution, with two seperate binaries:

- Main program EXE

- Autoupdater EXE

 

The autoupdater uses HTTPS to download binaries from HTTPS server, which address/user/pass are hardcoded into the program. I use mentalis.org's SSL library and wrote my own HTTP implementation for it.

 

The https server contains files named:

"autoupdate.txt" - contains the latest version number

"changelog.txt" - the changelog of all versions

"installer_v_X_X_X_X.exe" - where X_X_X_X is the version number contained in autoupdate.txt

 

- the autoupdate program downloads autoupdate.txt

- it compares the version to installed version (detection based on filename - every binary ends with v_X_X_X_X)

- If newer version available, downloads changelog.txt, prompts if we should download the latest version (shows the changelog in same message)

- downloads the binary

- detects if an instance of main app is running (using Process.GetProcesses()), prompts user to close them until no running processes detected.

- Runs the installer program and immediately closes itself.

 

Here is the source code for my mentalis.org HTTPS downloader implementation:

http://lappi.skai.fi/~mikkoko/csharp/https_downloader_implementation.zip

BS - Beer Specialist

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...