Page 1 of 1

Web Update Question

Posted: Sun Nov 26, 2006 5:28 pm
by DennisBaggott
I am trying to understand the web update process and how to use it. I set my installation to check for updates (this seems to create the .in file that I will maintain on my web site) and adds a task when the end user reboots and goes through the wizard to set up a schedule for checking for updates. I may initially want to just have a text file that contains a line like "no updates available" to be displayed. Then I may later want to change the .ini file to run a new setup or possible just replace a file or two with updated files. It looks to me like the update creates a task with the same name as my setup.exe and adds a parameter like mysetup.exe /update - If this is the case would the updater be looking for my original setup ? or a copy of it stored on the end users hard drive? If not a copy of my original setup, which may have been run from a CD would the end user get prompted to find the CD or just a file not found?

I think the web update features can be very useful to me, but I am just not sure how to go about implementing it.

Thanks,

Dennis

Posted: Sun Nov 26, 2006 6:00 pm
by MichaelNesmith
Hi Dennis,

If you want to display a message that no updates are available, you can just add a MessageBox command in the MSIcode script for the web update logic. You have the full source code of the update script, so you can customize exactly how it behaves.

The update scheduled task simply runs your latest installed version's setup with the /update command line parameter. The update script tests if it finds this parameter on the command line - if so, it will drive the rest of the installation, and run it in update mode, instead of a regular install mode. You can see how this process works by switching to the update script in the MSIcode editor and reading the code.

A copy of the original setup is always stored on your local disk, as long as your application remains installed. Your actual application files are not stored, however (unless you are using web builds).

About your other question - changing the INI file to run a new setup or updating a coupe of files - some of this falls within the scope of the INI, some of it does not. In particular, the INI file simply describes which updates are available, and where they can be downloaded from. The INI file does not contain any actual update logic - it only pairs the installed application version with available updates.

The entire updating is, again, performed by the MSIcode update script. However, another point worth stressing here is that the update script just downloads and runs updates - it does not actually perform the actual binary update of files, settings itself. You could certainly enhance it to directly embed this behavior into the update script without running external update programs, but this is the default behavior.

For the actual files that you are updating, the most common approach is to build a patch, and then publish this as an available update by using the INI file. This way, when the update script runs, it will find the patch by reading the INI file, download it, and run it. At that point, it is the patch which does the binary update of files and settings. You can also issue a full version installer if building patches becomes tedious - this works equally well also.

I hope I was able to shed some light on this issue...please ask if you need more clarification.

Web Update Question

Posted: Sun Nov 26, 2006 6:13 pm
by DennisBaggott
Thanks, Michael. That helps a lot. Thanks for the clarification.