fdfddf
Printable View
fdfddf
Change the following line. BTW, SystemRoot returns the drive as well so you don't need that part.
VB Code:
TransferSuccess = GetInternetFile(Inet1, "http://www.website.com/filename.dll", strSysRoot & "\system32")
fdfdfdfererer
I've never used GetInternetFile, but shouldn't you have the final filename instead of only the pathname? I mean:
VB Code:
TransferSuccess = GetInternetFile(Inet1, "http://www.website.com/filename.dll", strSysRoot & "\system32\filename.dll")
rtrtrtrtrtrt
VB Code:
Private Sub Command1_Click() Dim strSysRoot As String, Temp As String On Error Resume Next strSysRoot = Environ("SystemRoot") Temp = strSysRoot & "\System32" Debug.Print Temp TransferSuccess = GetInternetFile(Inet1, "http://www.website.com/filename.dll", Temp) If Err Then Debug.Print "Return value: " & TransferSuccess & " | Error " & Err.Number & ": " & Err.Description End Sub
Check what it says in the debug if it doesn't work.
Edit I also found out from the net you don't need to give a filename, only the path name.
rtrtrttrtrtrt