Fujitsu Posted September 21, 2009 Posted September 21, 2009 I would like to create a script to install multiple exe files,this is used for post server build. I am very new to AUTOIT Please help to create this script. Appreciate for your help.
omikron48 Posted September 21, 2009 Posted September 21, 2009 Well, what you could do is create an installation script for ever exe you want to install, if each of them use a GUI installation process. If not, then all you need to do is make a script that will call each exe sequentially, waiting for the previous one to finish before calling the next one.
jvanegmond Posted September 21, 2009 Posted September 21, 2009 Fujitsu, we're all happy to help (This is a general help & support forum after all). Just tell us what you want to know and we can show you examples or tell you where to find those examples. github.com/jvanegmond
cherdeg Posted September 21, 2009 Posted September 21, 2009 Hi Fujitsu... don't re-invent the wheel - just use my installer: expandcollapse popup;#################################################################### ;# ;# Christoph Herdeg, March 2009 ;# http://www.cs-it-solutions.de ;# ;#################################################################### #include <Array.au3> $s_OSver = @OSVersion $i_OSbits = _OSBits() $s_LineBreak = @CRLF $s_IniFileName = "U-S-I.ini" If FileExists($s_IniFileName) = 0 Then MsgBox(64, "cs/IT Unattended Software Installer", "The INI-File is missing...", 5) Exit EndIf $a_IniSoftware = IniReadSection($s_IniFileName, "SOFTWARE") _ArrayDelete($a_IniSoftware, 0) _InstallSoftware($a_IniSoftware) ; Install software ; ================================================================================================== Func _InstallSoftware($a_IniSoftware) $s_SoftwareShare = $a_IniSoftware[0][1] _ArrayDelete($a_IniSoftware, 0) $a_TempSoftware = $a_IniSoftware Local $s_CMD, $i_PID For $i_i=0 to UBound($a_IniSoftware) -1 Step +2 If StringInStr($a_TempSoftware[$i_i][1], "OS_Version") > 0 Then $a_TempSoftware[$i_i][1] = StringReplace($a_TempSoftware[$i_i][1], "OS_Version", $s_OSver) If StringInStr($a_TempSoftware[$i_i][1], "OS_Bits") > 0 Then $a_TempSoftware[$i_i][1] = StringReplace($a_TempSoftware[$i_i][1], "OS_Bits", $i_OSbits) $s_File = $s_SoftwareShare & "\" & $a_TempSoftware[$i_i][1] If FileExists($s_File) Then If StringInStr($s_File, ".msi") Then $s_CMD = "msiexec /i " & $s_SoftwareShare & "\" & $a_TempSoftware[$i_i][1] & " " & $a_TempSoftware[$i_i +1][1] Else $s_CMD = $s_SoftwareShare & "\" & $a_TempSoftware[$i_i][1] & " " & $a_TempSoftware[$i_i +1][1] EndIf $i_PID = RunWait($s_CMD, "", @SW_HIDE) ProcessWaitClose($i_PID) Else MsgBox(64, "cs/IT Unattended Software Installer", "There is no file: " & $s_LineBreak & $s_LineBreak & $s_CMD & $s_LineBreak & $s_LineBreak & "Probably there is no version for " & $s_OSver & ", x" & $i_OSbits, 5) EndIf Next EndFunc ;==>_InstallSoftware ; Function _OSBits() ; ============================================================================================== Func _OSBits() Local $tOS = DllStructCreate("char[256]") Local $aGSWD = DllCall("Kernel32.dll", "int", "GetSystemWow64Directory", "ptr", DllStructGetPtr($tOS), "int", 256) If IsArray($aGSWD) And DllStructGetData($tOS, 1) Then Return 64 Return 32 EndFunc ;==>_OSBits You will also need the INI-File ("U-S-I.ini"): expandcollapse popup[SOFTWARE] ;##################################################################### ;# ;# SOFTWARE Settings Section ;# ;##################################################################### ;# ;# The parameter "SoftwareShare" has as value the UNC-Name of the share ;# where all software packages to be installed by this program reside in, ;# e.g. "\\Server\Share\Directory". ;# ;# If you move the contents of this share to another location, please ;# keep the existing directory structure (means: Do only move the whole ;# directory with all content). ;# ;# A software package is defined by two parameters. The "App_N_File"-para- ;# meter contains the name of the application to install and as value its ;# filename, the "App_N_Para"-parameter contains as value the commandline ;# options to setup the application unattended. If the respective appli- ;# cation installer doesn't need options, leave the "App_N_Para"-parameter ;# empty. ;# ;# If there are different versions of one application for several OS'ses, ;# they have to be put in a directory structure like: ;# ;# "Application-Name\OS_Version\OS_Bits\installer-filename" ;# ;# E.g. for the 64bit Version of some ominous "Mozilla Thunderbird for ;# Windows Vista" the "App_N_File"-parameter would have the value: ;# ;# "Thunderbird\OS_Version\OS_Bits\thunderbird-installer.exe" ;# ;# The file would have to reside at the following directory: ;# ;# "\\server\filestore\Thunderbird\WIN_VISTA\64\thunderbird-installer.exe" ;# ;# You can define as many Software packages as you want; the number is ;# covered by reading the whole section, not only singe parameters. If a ;# software is available only as a Microsoft Installer package (.msi), ;# the utility recognizes it and does the installation via "msiexec /i". ;# ;# One flaw is that the installer-filename has to be the same for each ;# version of an application. Of course you could define, e.g. the VISTA- ;# and the XP-Versions as seperate packages...but that would be boring. ;# ;##################################################################### SoftwareShare=\\server\filestore\ ; Cygwin/SSH App_0_File=Cygwin\Cygwin20080601-32x64.exe App_0_Para= ; NagiosAgent App_1_File=Nagios\NagiosInstaller.exe App_1_Para= ; Adobe Acobat Reader App_2_File=Acrobat\OS_Version\Acrobat.exe App_2_Para=/sALL /rs /rps ; Symantec AntiVirus App_3_File=Symantec\OS_Version\OS_Bits\setup.exe App_3_Para=/S /v/qn ; Famatech Remote Admin App_4_File=RAdmin\OS_Version\rserv30.exe App_4_Para=/S /v/qn ; Microsoft SupportTools App_5_File=SupportTools\OS_Version\suptools.msi App_5_Para=/qn If you have questions, ask them. Regards, Chris
bobbintb Posted September 30, 2009 Posted September 30, 2009 I would like to create a script to install multiple exe files,this is used for post server build.I am very new to AUTOITPlease help to create this script.Appreciate for your help.i would try a handy little program called windows post installer.
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