Application with an Online Upgrade Feature
-
Hi: I would like to write an application with an automatic upgrade feature. Every time the application is executed, it should check if newer versions of certain DLLs are available. If yes, download and replace those DLLs. Could anyone recommend a good resource and/or a example on how this can be implemented. Thanks. A reasonable man adapts himself to the world. An unreasonable one persists, trying to adapt the world to himself. That is why all the progress in the world depends on the unreasonable men.
-
Hi: I would like to write an application with an automatic upgrade feature. Every time the application is executed, it should check if newer versions of certain DLLs are available. If yes, download and replace those DLLs. Could anyone recommend a good resource and/or a example on how this can be implemented. Thanks. A reasonable man adapts himself to the world. An unreasonable one persists, trying to adapt the world to himself. That is why all the progress in the world depends on the unreasonable men.
I don't know if this is the best way, but since it has been some time since you posted this, I'll take a shot at it. You could use a Microsoft Internet Transfer Control to check versions listed in an html file.
Dim sTest as String Dim sUrl as String sUrl = "http://www.your-url-goes-here.com/versions.txt" Inet1.AccessType = icUseDefault sTest = Inet1.OpenURL(sUrl)
Then, you would need to compare the versions that you stored in that file with the versions of the files on the user's computer. There is likely a way to access the versioning information (I cannot find it right now,) but you could always have your application maintain a similar file on the user's computer that could would contain the versioning info. Then, you could use the "OpenURL" to grab any needed files (saving them as binary.) Here is the sample from MSDNDim b() As Byte Dim strURL As String ' Set the strURL to a valid address. strURL = "FTP://ftp.GreatSite.com/China.exe" b() = Inet1.OpenURL(strURL, icByteArray) Open "C:\Temp\China.exe" For Binary Access _ Write As #1 Put #1, , b() Close #1
Hope that helps.