how can i make auto-it download a file from given URL, and run it ?
I want the file to be saved automatically to Program File. Once it's downloaded, I need to run the file.
I found this code but it prompts to save the file.
$FileURL = "http://somesite.com/setup.exe"
$FileName = "Setup.exe"
$FileSaveLocation = FileSaveDialog("Save Location...",@ScriptDir,"All (*.*)",18,$FileName)
$FileSize = InetGetSize($FileURL)
InetGet($FileURL,$FileName,0,1)
ProgressOn("","")
While @InetGetActive
$Percentage = @InetGetBytesRead * 100 / $FileSize
ProgressSet($Percentage,"Downloaded " & @InetGetBytesRead & " of " & $FileSize & " bytes","Downloading " & $FileName)
Sleep(250)
Wend
ProgressOff()