A simple way
Code:
filecreatedir, c:\temp
filedelete, c:\temp\downloader.exe
fileinstall, downloader.exe, c:\temp\downloader.exe
filedelete, c:\temp\tempdl.txt
;///////// Put in the url below & the file name...
URL = http://www.somesite.com/somefile.exe
file = somefile.exe
fileappend,
(
[download]
url=%URL%
[filename]
file=%file%
), c:\temp\tempdl.txt
run, c:\temp\downloader.exe
sleep, 3000
loop, 10
{
Process, Exist, downloader.exe
If errorLevel
sleep, 1000 ;time to sleep X loop amount
Process, Exist, downloader.exe
If ! errorLevel
Break
}
Process, Exist, downloader.exe
If errorLevel
{
process, close, downloader.exe
sleep, 500
process, close, downloader.exe
sleep, 500
process, close, downloader.exe
sleep, 500
process, close, downloader.exe
sleep, 500
process, close, downloader.exe
}
downloader.exe
Code:
#notrayicon
#SingleInstance ignore
setbatchlines, -1
iniread, dl, c:\temp\tempdl.txt, download, url
iniread, fl, c:\temp\tempdl.txt, filename, file
filedelete, %file%
urldownloadtofile, %dl%, %FL%
ugly n fat but it works.
BTW, I still have about 5% of my clients with IE8 unable to get urldownloadtofile to work. After installing IE7, and removeing IE8,it works.
Hi. Mr. Tank, been down and out.. but i am almost back...