csho
asked on
Programatically download EXE from web into specified directory.
I want to be able to download an executable from an internet site into a specified folder. I want to have my cake and eat it to in that I don't want to decrease my security settings, yet I also don't want to see any warnings. Can this be done?
ASKER
Maybe I should have said I'm using vb 5.0...does this make a difference? This doesn't seem to work.
I'm guessing on theload, it should be DownloadToFile and then my url, correct?
I'm guessing on theload, it should be DownloadToFile and then my url, correct?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks a ton, kind of scary this can be done so easily...shouldn't some security setting prohibit this?
No trouble, leave some feedback if you like :)
Function DownloadToFile(URL As String, Path As String)
Dim fName As String
myPath = "c:\" ' you path to download to
fileName = "myExe.exe"
URLDownloadToFile 0&, URL, myPath & fName, &H10, 0&
End Function
Private Sub Form_Load()
DownloadFile yourUrl
End Sub