Ok, finally I have produced some code that I can post here.
This software allows developers to add "Live Update" features to their applications.
Features:
- Multi app/file auto update at the same time
- Auto update silently in background
- Use wizard to control live update
- Retrieves remote file info before downloading
- Ability to add new, previously uninstalled, software components to server for download
- Make updates mandatory
- Allow users to select which updates they would like to download
- Progress status of downloads
- Notification of download problems.
- Ability to see which updates failed/passed download.
- Cancel update download
- Authenticate username and password
One thing you need to do is to go to this web site:
http://www.mvps.org/emorcillo/download/vb6/tl_ole.zip
and download the 2 tlb files and install them using the instructions provided.
These tlb files are used for the call back to allow the download to be shown in a progress bar, and to allow the user to cancel the download.
In the example attached the app is looking at NoteMe's server...cheers to NoteMe for letting him use his server 
Here's what to do.
If you want to use your own files, on your own server, and not use NoteMes test server then do the following:
Copy the files you want to download to your web server. If you have IIS on your PC you can create a virtual directory and then use:
http://LocalHost/MyVirtualDir/
as the remote path.
Then you need to copy a file called Update.txt to the same location as your files.
The update.txt file contains info about the updates on your server.
In the example I have posted the update.txt looks like:
MDACS;MDAC Setup v2.6;2.6.3;MDAC_Setup.exe;False;False
RESUME;Wokas Resume;4.1;ResumeTEST.doc;False;True
OFFICE;MS Office Components;3.1.0056;Office.exe;True;False
ACC;Accounting Software;1.0.5;AccSetup.exe;False;True
TICKICON;Tick Icon;3;TickIcon.gif;false;False
Each column is split in VB using the ;
The columns are: Key, App Desc, Version, Filename, Mandatory, New App
So, if we take the 1st line of that file:
MDACS - This is the application/file key of the components
MDAC Setup v2.6 - This is a short desc about the remote components
2.6.3 - This is the version number of the remote file
MDAC_Setup.exe - This is the remote file to download
False - This means the download is NOT mandatory
False - This means that a previous version of this app must be installed to download this update.
When my app starts in frmUpdate I load the cuurent installed apps into the auto updator:
Code:
With mobjUpdate.Products
.Clear
.Add "MDACS", "MDAC Version v2.5", "2.5.1"
.Add "RESUME", "Wokawidgets Resume", "2.5"
.Add "IMAGE", "Splash Screen Image", "18"
.Add "OFFICE", "MS Office Components", "3.1.0054"
.Add "TICKICON", "Tick Icon", "5"
End With
These values can be in a txt file on the local machine, in the reg or whereever you like. I've just added them in directly.
Code:
mobjUpdate.RetrieveUpdates
This downloads the update file from the server, and populates the update properties.
You can then select what updates you require.
In my example I have an live update wizard AND the quick auto update...however you can do ALL the updating with an interactive UI:
Code:
mobjUpdate.RemotePath = "http://www.noteme.com/Wokawidget/"
With mobjUpdate.Products .Clear
.Add "MDACS", "MDAC Version v2.5", "2.5.1"
.Add "RESUME", "Wokawidgets Resume", "2.5"
.Add "IMAGE", "Splash Screen Image", "18"
.Add "OFFICE", "MS Office Components", "3.1.0054"
.Add "TICKICON", "Tick Icon", "5"
End With
mobjUpdate.DownloadUpdates
And then just trap the UpdatesDownload event:
Code:
Private SUb mobjUpdate_UpdatesDownload()
MsgBox "Updates Downloaded!"
End Sub
After this the InstallProductUpdates is fired:
Code:
Private Sub mobjLiveUpdate_InstallProductUpdates(ByVal Product As vbLiveUpdate.Product, Installed As Boolean)
End Sub
This is where you add code to copy files to a specific location, or launch setup applications etc. If the update passes then set Installed = True.
That's pretty much all the code is needed to download multi updates.
I have added a lot of fancy UI code into my app just to demo what can be done with the code.
If click Web Download then this just demos the vbDownload project, which can be used completely on it's own in other projects to download any files from the internet.
Any comments most welcome.
New version in Post #37!!!
Woka
PS Thanks to Klienma who stuck with me and put up with my annoying questions on how to get the URLDownload API to work with a progress bar. Cheers, this code would not be possible without your help