It didn't work, mate. I got rid of "fileIO" and just used "stm" as an io.stream an i still got the same result. can't run the file. i know the problem's not with the server either - it'll work if i use internet explorer to download it. the file on the server and the one downloaded using the sub are exactly the same size and even when i open the two in notepad, i see the same gibberish in each. i have no idea what is going on.
here's the new sub
Public Sub GetFile(ByVal uri As String, ByVal toFile As String)
Dim wreq As Net.HttpWebRequest = Net.WebRequest.CreateDefault(New Uri(v_base & uri))
wreq.AllowAutoRedirect = True
wreq.Proxy = Net.WebProxy.GetDefaultProxy
Dim resI As Net.HttpWebResponse = wreq.GetResponse
Dim stm As IO.Stream = resI.GetResponseStream
Dim buff(resI.ContentLength - 1) As Byte
stm.Read(buff, 0, buff.Length)
stm.Close()
stm = IO.File.Open(toFile, IO.FileMode.Create)
stm.Write(buff, 0, buff.Length)
stm.Close()
resI.Close()
End Sub