frankokasilda Posted February 20, 2009 Share Posted February 20, 2009 (edited) Hello! I have searched the way to integrate an AutoIT Script to executables, getting an executable that doesn´t need AutoIt installed in the PC.. do you understand me? Because I don´t speak english and to read in english is difficulty for me I have the AutoIt script and the executable, but i want to get a single executable....How can I do that?Thank you for your help!Sorry if the section is incorrect, I can´t find the place to post.I need to learn more english ^^ Edited February 20, 2009 by frankokasilda Link to comment Share on other sites More sharing options...
iamtheky Posted February 20, 2009 Share Posted February 20, 2009 use the 'fileinstall' command.http://www.autoitscript.com/autoit3/docs/f...FileInstall.htmand google translate Link to comment Share on other sites More sharing options...
frankokasilda Posted February 20, 2009 Author Share Posted February 20, 2009 (edited) "Files maintain their original creation/modification timestamps when installed."That means that i always must have the original archives? I don´t want that, i only want the script + programs be independent of AutoIt. I use File Install but, after compilation, the script is executed by Auto IT :/ Edited February 20, 2009 by frankokasilda Link to comment Share on other sites More sharing options...
iamtheky Posted February 20, 2009 Share Posted February 20, 2009 (edited) Post your .au3 and desired output. Trying to decipher what you want from generics is brutal.That means that i always must have the original archives?not totally, it means that it is wrapped into your executable in its current state.I have a specialized backup autoit that utilized fileinstall=ntbackupntbackup is inside my exe, and is usable on windows systems regardless of if ntbackup is accessible or even present in the win32 folder on the target system. Edited February 20, 2009 by iamtheky Link to comment Share on other sites More sharing options...
frankokasilda Posted February 20, 2009 Author Share Posted February 20, 2009 (edited) The .au3 is like this:FileInstall ( "C:\Documents and Settings\Administrador\Escritorio\Alcohol1.9.8.7117.exe", "C:\Archivos de programa\Alcohol Soft\Alcohol 120")$title = "Alcohol 120% 1.9.8.7117"Run("Alcohol1.9.8.7117.exe")WinWait($title)ControlClick($title, "Click Next to continue.", "&Next >")WinWait($title)ControlClick($title, "Please review the license", "I &Agree")WinWait($title)ControlClick($title, "Choose Components", "&Next >")WinWait($title)ControlClick($title, "Choose Install Location", "&Install")WinWait($title, "Click Finish to close this wizard.")Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{SPACE}") Send("{DOWN}") Send("{SPACE}") ControlClick($title, "Alcohol 120% has been installed on your computer.", "&Finish")The installation is totally automatic, but at the moment of the installation i would like that the AutoIt isn´t necessary at the PC.*Edit: surely i´m writing a wrong code, i don´t know. Edited February 20, 2009 by frankokasilda Link to comment Share on other sites More sharing options...
iamtheky Posted February 20, 2009 Share Posted February 20, 2009 I may be peppering the wrong target, but I'll keep taking shots "just use the FileInstall to install the file to the @TempDir and then use FileMove() with the flag set to 9 (Overwrite + create folder structure) to put the file where you want it."- using that you could call the file from where it was moved to via a batch and tag a self delete to the end of the autoit.http://www.autoitscript.com/forum/lofivers...php?t19404.html-installing alcohol from the batch silently with /qn /REBOOT=ReallySuppress or-delete the autoit from the end of the batch-because it should have finished as soon as it executed the bat Link to comment Share on other sites More sharing options...
frankokasilda Posted February 20, 2009 Author Share Posted February 20, 2009 (edited) First, thank you very much for your patient, i know the languaje is an obstacle And well, the archives are next:Without the AutoIt installed at PC, it worked fine.I could say "all is finished", but i want to know if there is any way to do that the two archives be only one, only the Unntended.exe.I repeat, thank you again! Edited February 20, 2009 by frankokasilda Link to comment Share on other sites More sharing options...
MHz Posted February 21, 2009 Share Posted February 21, 2009 ... i want to know if there is any way to do that the two archives be only one, only the Unntended.exe.I believe that iamtheky was refering to a script like this; extract Alcohol installer from the AutoIt executable and put it in the temp folderIf FileInstall("Alcohol1.9.8.7117.exe", @TempDir & '\Alcohol1.9.8.7117.exe') Then ; execute Alcohol installer with silent switches RunWait('"' & @TempDir & '\Alcohol1.9.8.7117.exe" /qn /REBOOT=ReallySuppress', @TempDir) ; pause for half second Sleep(500) ; remove temp copy of Alcohol installer FileDelete(@TempDir & '\Alcohol1.9.8.7117.exe')EndIfThe Alcohol installer is stored with in the AutoIt created executable when compiled. This means that you only need the AutoIt executable and not the Alcohol installer as the Alcohol installer is with in the AutoIt executable and the Alcohol installer will be extracted to Temp dir when executed and will install Alcohol and then delete the Alcohol installer. Link to comment Share on other sites More sharing options...
IcemanND Posted February 21, 2009 Share Posted February 21, 2009 I think what you are after is to compile your AU3 script to and EXE. Use the "compile script to exe" from the autoit3 programs menu.Doing this adds a stub autoit3 executable in the final exe so that your au3 script that was compiled can run aon any machine with or without autoit installed on it. Link to comment Share on other sites More sharing options...
radix Posted February 21, 2009 Share Posted February 21, 2009 Probably he want to build a sfx archive and run compiled file after extraction. Link to comment Share on other sites More sharing options...
frankokasilda Posted February 21, 2009 Author Share Posted February 21, 2009 yes! finally, i have finished the totally automated installation, now i understand the function of some more commands.. i didn´t know how to write some lines, especify FileInstall and Runwait..well, i made two scripts, one in the other, like this:first script name: Alcohol 1.exe#NoTrayIcon$title = "Alcohol 120% 1.9.8.7117"Run("Alcohol1.9.8.7117.exe")WinWait($title)ControlClick($title, "Click Next to continue.", "&Next >")WinWait($title)ControlClick($title, "Please review the license", "I &Agree")WinWait($title)ControlClick($title, "Choose Components", "&Next >")WinWait($title)ControlClick($title, "Choose Install Location", "&Install")WinWait($title, "Click Finish to close this wizard.")Send("{TAB}")Send("{TAB}")Send("{TAB}")Send("{TAB}")Send("{SPACE}")Send("{DOWN}")Send("{SPACE}")ControlClick($title, "Alcohol 120% has been installed on your computer.", "&Finish")Later, i made other script, like this:#NoTrayIconFileInstall("Alcohol1.9.8.7117.exe", @TempDir & '\Alcohol1.9.8.7117.exe')FileInstall("Alcohol 1.exe", @TempDir & '\Alcohol 1.exe')RunWait('"' & @TempDir & '\Alcohol 1.exe', @TempDir)Sleep(500)FileDelete(@TempDir & '\Alcohol1.9.8.7117.exe')FileDelete(@TempDir & '\Alcohol 1.exe')Like this, the second script uses the first for automated installation, and later they are deleted..I hope you understand me, sorry for the bad english , you help me very much, thank you!! 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