0

I am working on a VB6 application which has many executable and an Active X dlls.

And there are to be updated in c;lient machines to lates version once in a while which i am asking the user to update manually.

Can you please suggest me a way using which i can update it automatically from the files that can be available online.

Thanks.

Prem_Kumar_S
  • 87
  • 3
  • 16
  • Related with many answers: [How should I implement an auto-updater?](http://stackoverflow.com/q/232347/588306) – Deanna Jan 31 '13 at 09:58

2 Answers2

1

Windows Installer has features supporting Patching and Upgrades. Using those techniques you can create various levels of "upgrade" packages.

Your application would need a separate "update" utility that is spawned when the user approves updating, perhaps in response to a prompt your program raises after checking for new versions.

This updater would check the current version and the remote site's catalog of updates to pick the appropriate package, download it to a temporary location, start Windows Installer to process the package (or packages, sometimes you might need to run several Installer runs), and clean up the temp location. Then you might offer to restrt the updated application or on some occasions need to reboot.

This updater would be a fancy form of the common "installation bootstrapper." As you can tell it needs some "smarts" in order to tell what package or packages to download and install in what sequence, when it needs to request rebooting, etc. This would probably be based on a downloaded "rules script" it obtains as part of selecting a valid update option.

After all, sometimes you can just apply a minor upgrade or patch upgrade, sometimes you need a more complete install or entire reinstall.

If your needs are extremely simple (just an EXE and maybe a few DLLs and OCXs - preferably using reg-free COM) you may not need to go to these lengths. However when you start adding in other considerations like multiple programs, data directory creation and security settings, possibly running a settings file conversion or even database conversion, DCOM, firewall, etc. configuration, database drivers or providers, etc. things get complicated quickly. Too complicated for simple snatch and grab updating.

And admin rights/UAC issues are a factor so you'll probably have to deal with privilege elevation.

None of this is trivial stuff. There are people who do little more than construct and test such deployment systems as their entire job.

Bob77
  • 13,167
  • 1
  • 29
  • 37
0

If you use soemthing like Inno setup to install the application then an update is simple a matter of running that periodically. You can either detect there is a new version available by checking a web site/local server, or just prompt to run the update after X days.

Deanna
  • 23,876
  • 7
  • 71
  • 156