ChuckyUchiwa Posted April 26, 2007 Share Posted April 26, 2007 Hello to all AutoIt's users, This is my problem : I've done a script which install many program such as (Izarc, openoffice, pdfcreator...) I've used the Run() fonction to run the setup in the current directory but in fact i'd like to run the setup from a server. Is it possible to do a thing like : Run("http://www.exemple.com/setup/openoffice.exe") ? I've tried this but it doesn't work... xD Pliz can anyone help me ? Thanks. Link to comment Share on other sites More sharing options...
BrettF Posted April 26, 2007 Share Posted April 26, 2007 Hello to all AutoIt's users, This is my problem : I've done a script which install many program such as (Izarc, openoffice, pdfcreator...) I've used the Run() fonction to run the setup in the current directory but in fact i'd like to run the setup from a server. Is it possible to do a thing like : Run("http://www.exemple.com/setup/openoffice.exe") ? I've tried this but it doesn't work... xD Pliz can anyone help me ?Thanks.Well thats a hard one to me. I'm not really sure if it can be done in that way (like in the download box in IE, you can open it sometimes.) My first port of call would be to look at InetGet. Download it the run it . Also Have you tried Shellexecute. Don't know if it will make a difference, but all well... Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 26, 2007 Share Posted April 26, 2007 (edited) The good Mr. Brett called it, use InetGet(): ; Pick a mirror from: http://distribution.openoffice.org/mirrors/#mirrors Global $SelectedMirror = "http://mirrors.ibiblio.org/pub/mirrors/openoffice/stable/2.2.0" ; Select filename of particular distribution version you want Global $FileName = "OOo_2.2.0_Win32Intel_install_en-US.exe" Global $URL = $SelectedMirror & "/" & $FileName Global $OooInstaller = @ScriptDir & "\" & $FileName $FileSize = InetGetSize($URL) If $FileSize Then InetGet($URL, $OooInstaller, 1, 1) ProgressOn("OO.o Install: Downloading", $FileName, "", 100, 100) While @InetGetActive If @InetGetBytesRead = -1 Then MsgBox(16, "Error", "Error occured downloading: " & $URL) Exit EndIf $Percent = @InetGetBytesRead / $FileSize * 100 ProgressSet($Percent, @InetGetBytesRead & "/" & $FileSize & " = " & $Percent & "%") Sleep(500) WEnd Else MsgBox(16, "Error", "Error! Could not get file size: " & $URL) EndIf Run($OooInstaller, @TempDir) MsgBox(64, "OO.o Install", "Launched installer...") Edited April 26, 2007 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now