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.
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.
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.
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.
Umm, I don't see how the webserver is forcing anything... All it's saying is that the file is missing, 404?
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
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.