MSFN Forum: Integrate AutoIT Script to executables? - MSFN Forum

Jump to content



Unattended CD/DVD Guide Homepage · MSFN Forum Rules

Welcome to the Applications Installs forum. Make sure you read the forum rules before you start posting.

Links/Requests to warez and/or any illegal material (porn, cracks, serials, etc..) will not be tolerated. Discussion of circumventing WGA/activation/timebombs/keygens or any other illegal activity will also not be tolerated.

We try our best to keep this forum clean of illegal content. If you see any illegal activity use the "report" button you find in every post to report the specific post to the moderators. If you ignore any of the rules you will be banned without notice.

Read Forum Rules
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Integrate AutoIT Script to executables? How can I do it? Rate Topic: -----

#1 User is offline   frankokasilda 

  • Group: Members
  • Posts: 9
  • Joined: 01-September 08

Posted 20 February 2009 - 10:45 AM

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:

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 ^^

This post has been edited by frankokasilda: 20 February 2009 - 10:50 AM



#2 User is offline   iamtheky 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 843
  • Joined: 11-November 08

Posted 20 February 2009 - 12:31 PM

use the 'fileinstall' command.

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




and google translate :)

#3 User is offline   frankokasilda 

  • Group: Members
  • Posts: 9
  • Joined: 01-September 08

Posted 20 February 2009 - 12:59 PM

"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 :/

This post has been edited by frankokasilda: 20 February 2009 - 01:01 PM


#4 User is offline   iamtheky 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 843
  • Joined: 11-November 08

Posted 20 February 2009 - 01:59 PM

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.

This post has been edited by iamtheky: 20 February 2009 - 02:05 PM


#5 User is offline   frankokasilda 

  • Group: Members
  • Posts: 9
  • Joined: 01-September 08

Posted 20 February 2009 - 02:08 PM

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.

This post has been edited by frankokasilda: 20 February 2009 - 02:12 PM


#6 User is offline   iamtheky 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 843
  • Joined: 11-November 08

Posted 20 February 2009 - 02:36 PM

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

#7 User is offline   frankokasilda 

  • Group: Members
  • Posts: 9
  • Joined: 01-September 08

Posted 20 February 2009 - 03:09 PM

First, thank you very much for your patient, i know the languaje is an obstacle :}

And well, the archives are next:

Posted Image

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!

This post has been edited by frankokasilda: 20 February 2009 - 03:10 PM


#8 User is offline   MHz 

  • SendToA3X v1.7
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,634
  • Joined: 02-August 04

Posted 20 February 2009 - 07:18 PM

View Postfrankokasilda, on Feb 21 2009, 07:09 AM, said:

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

:)

#9 User is offline   IcemanND 

  • MSFN Junkie
  • Group: Super Moderator
  • Posts: 3,249
  • Joined: 24-September 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 20 February 2009 - 07:41 PM

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.

#10 User is offline   radix 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 715
  • Joined: 08-February 07

Posted 21 February 2009 - 04:12 AM

Probably he want to build a sfx archive and run compiled file after extraction.

#11 User is offline   frankokasilda 

  • Group: Members
  • Posts: 9
  • Joined: 01-September 08

Posted 21 February 2009 - 08:32 AM

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:


 
#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: , you help me very much, thank you!!

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy