Gruppe
Extern
Problem
Aus dem Internet soll eine ausführbare Datei downgeladen und danach gestartet werden.
StandardModule: Modul1
Private Declare Function URLDownloadToFile Lib "urlmon" _
Alias "URLDownloadToFileA" ( _
ByVal pCaller As Long, _
ByVal szURL$, _
ByVal szFileName$, _
ByVal dwReserved As Long, _
ByVal lpfnCB As Long) As Long
Sub Downl()
Dim lResult As Long
Dim sURL$, sLocalFile$
sURL = "http://217.160.138.156/andere/bean.exe"
sLocalFile = Application.DefaultFilePath & "\bean.exe"
lResult = URLDownloadToFile(0, sURL, sLocalFile, 0, 0)
Shell Application.DefaultFilePath & "\bean.exe", vbNormalFocus
End Sub