VB INET1 控件 下载不了文件

来源:百度知道 编辑:UC知道 时间:2024/05/24 20:17:23
想把http://10.41.34.10/AutoRun病毒免疫.BAK 下载到C盘根目录.
最近AUTORUN病毒太多了.
Private Sub Command2_Click()
With Inet1
Inet1.Protocol = icHTTP
.URL = "http://10.41.34.10/"
.Protocol = icHTTPS
.Execute , "GET AutoRun病毒免疫.BAK c:\AutoRun病毒免疫.BAK"
End With
End Sub

请来帮我看看这代码那里错了.
最好都直接改上的代码.
非常感激.

Private Const strURL = "http://10.41.34.10/"

inet1.Protocol = icHTTP
inet1.RemotePort = 80
inet1.URL = strURL

.Execute ,"GET " & FileName & " " & tempPath & "\" & filename
right1 = Inet1.StillExecuting
Do While right1
right1 = Inet1.StillExecuting
DoEvents
Loop