Help - Search - Members - Calendar
Full Version: Integrate AutoIT Script to executables?
MSFN Forums > Unattended Windows Discussion & Support > Application Installs

   


Google Internet Forums Unattended CD/DVD Guide
frankokasilda
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 unsure.gif

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 ^^
iamtheky
use the 'fileinstall' command.

http://www.autoitscript.com/autoit3/docs/f...FileInstall.htm




and google translate smile.gif
frankokasilda
"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 :/
iamtheky
Post your .au3 and desired output. Trying to decipher what you want from generics is brutal.



QUOTE
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=ntbackup

ntbackup 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.
frankokasilda
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.
iamtheky
I may be peppering the wrong target, but I'll keep taking shots smile.gif

"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

frankokasilda
First, thank you very much for your patient, i know the languaje is an obstacle confused.gif

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!
MHz
QUOTE (frankokasilda @ Feb 21 2009, 07:09 AM) *
... 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
CODE

; extract Alcohol installer from the AutoIt executable and put it in the temp folder
If 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')
EndIf

The 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.

smile.gif
IcemanND
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.
radix
Probably he want to build a sfx archive and run compiled file after extraction.
frankokasilda
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

CODE
#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:


CODE
#NoTrayIcon
FileInstall("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 wacko.gif , you help me very much, thank you!!





Google Internet Forums Unattended CD/DVD Guide

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.