Author | Message | Time |
---|---|---|
Dyndrilliac | 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:[code]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[/code] However, this does not work. Upon doing the following:[code]Debug.Print Version Debug.Print Update[/code]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. | March 28, 2004, 8:21 AM |
LoRd | 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. | March 28, 2004, 8:29 AM |
Dyndrilliac | 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. | March 28, 2004, 8:33 AM |
LoRd | [quote author=Dyndrilliac link=board=31;threadid=6030;start=0#msg52171 date=1080462781] Can you reference me to a free webserver that would fit my purpose, like Geocities or some such place? [/quote] 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. | March 28, 2004, 8:49 AM |
Adron | Umm, I don't see how the webserver is forcing anything... All it's saying is that the file is missing, 404? | March 28, 2004, 11:13 AM |
Fr0z3N | You could try [code] 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 [/code] Edit: forgot code tags | March 28, 2004, 2:43 PM |
LoRd | [quote author=Adron link=board=31;threadid=6030;start=0#msg52177 date=1080472415] Umm, I don't see how the webserver is forcing anything... All it's saying is that the file is missing, 404? [/quote] The file was renamed to a .html. | March 28, 2004, 6:43 PM |