tags:

views:

26

answers:

2

"Idea to update the new version of application on client machine"

I have read binary data from DB server using WCF, create a zip file with contents, extract the files and update our application bin folder.

I want to validate the process like if everything is fine then update bin or rollback old file.

Can anybody give me idea to validate this process?

Do we have any check sum idea..

+1  A: 

Well if you use SharpZipLib to inflate the zip file, there is a TestArchive method on the ZipFile object that will do an integrity check of the archive, and tell you if it's valid.

Otherwise, you can use MD5 to make a checksum on the remote file, and compare it to the downloaded file to see if the content is the same.

Shimrod
A: 

Store on the server/web the most recent version of the project that is online. eg: in a version.txt the value "2.1.0", or query the database if you have access too.

Your application running on clients, will periodically read the contents of the version.txt file, then compared against the inbuilt(self) version number.

  • If a patch or minor release is detected eg 2.1.123, spins out a second app(updater.exe) that will quietly
    • do the upgrade,
    • it shall download the updated(preferred zipped) project from server/web.
    • Stop any running instances.
    • Unzipping the content.
    • Backup existing files(rename)
    • copy/install the new version of the project,
    • Start the application (when the app is restarted successfully it will delete its own backup file).
  • if a major release is detected eg: 3.0.0
    • notifies the user there is a major upgrade
    • if user accepts, download the installer
    • runs a full installer update

Does this help?

Pentium10