Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: Dyndrilliac on March 28, 2004, 02:21 AM

Title: [VB6] Auto Client update System, Need Help
Post by: Dyndrilliac on March 28, 2004, 02:21 AM
I am trying to implement an auto update client system into one of my programs and looked through several sources claiming to give examples of this as well as the search function in these forums.

The code I came across to most promisingly suit my needs is something along the line of the following:Version = App.ProductName & " v" & App.Major & "." & App.Minor & "." & App.Revision
Dim Update As String

Update = Me.Inet.OpenURL("http://66.177.173.240/bot/update.txt")
If Update = Version Then
    AddC Me.Intro, vbGreen, "Welcome to " & Version
Else
    Call GetUpdate
End If


However, this does not work.

Upon doing the following:Debug.Print Version
Debug.Print Update
In the section where sccuss would be false, I discovered that the string update gets no data written to it - it is blank. I have checked to make sure that my webserver is active, and has the required file on it and the correct value in it's place,  but to no avail.

I am wondering if anyone can help me fix what is wrong with what I am doing or help me by giving some good suggestions on how to go about getting a fresh solution to my problem.
Title: Re:[VB6] Auto Client update System, Need Help
Post by: Eric on March 28, 2004, 02:29 AM
Your webserver is requiring that the file must be downloaded; Inet's OpenURL() function can only view the contents of documents that don't require a download.
Title: Re:[VB6] Auto Client update System, Need Help
Post by: Dyndrilliac on March 28, 2004, 02:33 AM
Hmm, thanks - that explains the problem.

Can you reference me to a free webserver that would fit my purpose, like Geocities or some such place?

Edit: Nevermind, Geocities suited my needs fine. Thanks for your help.
Title: Re:[VB6] Auto Client update System, Need Help
Post by: Eric on March 28, 2004, 02:49 AM
Quote from: Dyndrilliac on March 28, 2004, 02:33 AM
Can you reference me to a free webserver that would fit my purpose, like Geocities or some such place?

I don't know of any decent ones offhand, but it would be easier to just rename the .txt to a .html. Surely your webserver won't force the download of an html file.
Title: Re:[VB6] Auto Client update System, Need Help
Post by: Adron on March 28, 2004, 05:13 AM
Umm, I don't see how the webserver is forcing anything... All it's saying is that the file is missing, 404?
Title: Re:[VB6] Auto Client update System, Need Help
Post by: Fr0z3N on March 28, 2004, 08:43 AM
You could try


Version = App.ProductName & " v" & App.Major & "." & App.Minor & "." & App.Revision
Dim Update As String

Update = Me.Inet.OpenURL("http://66.177.173.240/bot/update.txt")
Do While Me.Inet.StillExecuting: Loop
Debug.Print Version
If Update = Version Then
   AddC Me.Intro, vbGreen, "Welcome to " & Version
Else
   Call GetUpdate
End If


Edit: forgot code tags
Title: Re:[VB6] Auto Client update System, Need Help
Post by: Eric on March 28, 2004, 12:43 PM
Quote from: Adron on March 28, 2004, 05:13 AM
Umm, I don't see how the webserver is forcing anything... All it's saying is that the file is missing, 404?
The file was renamed to a .html.