Introduction
I have a long history of automating programs, particularly installs. Most of these installs are AutoIt scripts which make life much easier than using the traditional batch programs. AutoIt is a free program and will make compiling these to an EXE a simple task. For those looking to use a different script, looking at how these work should be fairly straight-forward as many are just simply calling an EXE or MSI with parameters!
What kind of install will this perform
I will simply be listing the code for the program without description aside from possible comments within the code. These installs are geared towards being a passive unattended install, which essentially is a fully automated (hands-off) install with a progress bar. If no passive install was available I would default to a fully silent install.
Scripts are generally set up to be able to work off a network share. Generally I put all installation files within a folder ‘Data’ or if the program has different architectures into 32bit/64 bit data folders.
Program Listings
Last updated (4/18/2013)
Adobe Acrobat Professional 9
#RequireAdmin ; /log %temp%\acrolog.txt can be used as a parameter for logging program install output ; UPDATE SERIAL KEY WITH YOURS! RunWait('msiexec /i "Data\Adobe Acrobat 9 Pro\acropro.msi" /T c:\acropro.mst /qb ISX_SERIALNUMBER=1118-1000-1000-1000-1000-1000')
Adobe Acrobat Professional 9
#RequireAdmin ;ABCPY.INI in Adobe dir holds info that can be modified such as serial key FileChangeDir(@WorkingDir & "\Data") RunWait("msiexec /i AcroPro.msi /qb")
Adobe Air 3
#RequireAdmin RunWait("Data\AdobeAIRInstaller.exe -silent -eulaAccepted")
Adobe Flash 11.x x32/x64
#RequireAdmin RunWait('msiexec /i "' & @ScriptDir & '\Data\install_flash_player_11_active_x.msi" /passive /norestart') RunWait('msiexec /i "' & @ScriptDir & '\Data\install_flash_player_11_plugin.msi" /passive /norestart')
Adobe Reader 10.x
#RequireAdmin RunWait("Data\AdbeRdr1013_en_US.exe /sAll /rs /msi EULA_ACCEPT=YES")
Adobe Reader 11.x
Same as above!
#RequireAdmin RunWait("Data\AdbeRdr11002_en_US.exe /sAll /rs /msi EULA_ACCEPT=YES")
Adobe Shockwave 11.6
#RequireAdmin RunWait("msiexec /i Data\sw_lic_full_installer.msi /norestart /passive")
Autodesk TrueView 2011
FileChangeDir(@WorkingDir & "\Data") RunWait("Setup.exe /w /t /q Data\setup.ini") ;.NET runs some optimization afterwards, I think it can be interupted by a reboot but might as well give it some time first. Sleep(30000)
Autodesk TrueView 2013
#RequireAdmin If @OSArch = "X86" Then FileChangeDir(@WorkingDir & "\Data\32Bit") Else FileChangeDir(@WorkingDir & "\Data\64Bit") EndIf RunWait("Setup.exe /Q /W /I setup.ini") ;.NET runs some optimization afterwards, I think it can be interrupted by a reboot but might as well give it some time first. Sleep(30000)
Corel Wordperfect X3
Create copy of Setup.ini into WPOX3 folder. Under [Startup] have CmdLine=SERIALNUMBER=WP13WNX-SERIAL-KEY ADDLOCAL=ALL REMOVE=WPYahoo /qb /L*
#RequireAdmin RunWait(@WorkingDir & "\Data\WPOX3\Setup.exe")
Digiteo Scilab 5
#RequireAdmin RunWait('Data\scilab-5.3.0_x64.exe /SILENT /LOG')
ESET AntiVirus 4
Script copies file locally then runs as folder installed from must have write access. CFG.XML created through ESET administrative tools.
#RequireAdmin AutoItSetOption("ExpandEnvStrings", 1) FileCopy(@ScriptDir & "\Data\cfg.xml", "%temp%\cfg.xml", 1) If @OSArch = "X86" Then FileCopy(@ScriptDir & "\Data\eavbe_nt32_enu_4276.msi", "%temp%\eset42.msi", 1) Else FileCopy(@ScriptDir & "\Data\eavbe_nt64_enu_4276.msi", "%temp%\eset42.msi", 1) EndIf ShellExecuteWait("%temp%\eset42.msi", "/passive /norestart", "%temp%")
GhostScript 9.02
FileChangeDir(@WorkingDir & "\Data") RunWait("gs902w32.exe /S")
GhostView 4.9
Not auto-it. Argument is where it is to be installed.
setup.exe "%programfiles%\gsview"
IBM SPSS 19 /w Patches
#RequireAdmin ;VC Redistributable RunWait('vcredist_x64.exe /Q') ;Install SPSS 19 RunWait('msiexec /i "' & @WorkingDir & '\Install x64\IBM SPSS Statistics 19.msi" TRANSFORMS="1033.mst" LICENSETYPE="Site" /passive /l "' & @TempDir & '\SPSS19_Install_Log.txt"') If @error Then MsgBox(1,"Error","Failed on main SPSS install") Exit(1) EndIf ;Install Patch FP001 RunWait('msiexec /i "' & @WorkingDir & '\Patch FP001 x64\SPSSStatistics19.0.1Patch-64bit.msi" /passive /norestart') If @error Then ;ClipPut('msiexec /i "' & @WorkingDir & '\Patch FP001 x64\SPSSStatistics19.0.1Patch-64bit.msi" /passive /norestart') MsgBox(1,"Error","Failed on installing SPSS FP001 Patch") Exit(2) EndIf ;Install Patch FP003 RunWait('"' & @WorkingDir & '\Patch FP001 to IF003 x64\Install.exe"') If @error Then MsgBox(1,"Error","Failed on installing SPSS FP003 Patch") Exit(3) EndIf
IBM SPSS 20 /w Patches
Adjust yourauthcode in script.
#RequireAdmin ;/L*v logfile.txt If @OSArch = "X86" Then RunWait('msiexec /i "' & @WorkingDir & '\32\IBM SPSS Statistics 20.msi" /qb AUTHCODE="<strong>yourauthcode</strong>" /norestart') Sleep(7000) RunWait('msiexec /i "' & @WorkingDir & '\32\Patch\SPSS_Statistics_20002_win32_Patch.msi" /qn /norestart') ClipPut('msiexec /i "' & @WorkingDir & '\32\Patch\SPSS_Statistics_20002_win32_Patch.msi" /qn /norestart') Else RunWait('msiexec /i "' & @WorkingDir & '\64\IBM SPSS Statistics 20.msi" /qb AUTHCODE="<strong>yourauthcode</strong>" /norestart') Sleep(7000) RunWait('msiexec /i "' & @WorkingDir & '\64\Patch\SPSS_Statistics_20002_win64_Patch.msi" /qb /norestart') ClipPut('msiexec /i "' & @WorkingDir & '\64\Patch\SPSS_Statistics_20002_win64_Patch.msi" /qb /norestart') EndIf
Maple 16
Requires activation
#RequireAdmin AutoItSetOption("ExpandEnvStrings", 1) If @OSArch = "X32" Then FileCopy("ANSWERFILEx32", "%temp%\MAPLE16ANSWERFILE", 1) RunWait('"Data\Windows\Disk1\InstData\VM\Maple16WindowsInstaller.exe" -f "%temp%\MAPLE16ANSWERFILE"') Else FileCopy("ANSWERFILEx64", "%temp%\MAPLE16ANSWERFILE", 1) RunWait('"Data\Windows64\Disk1\InstData\VM\Maple16WindowsX86_64Installer.exe" -f "%temp%\MAPLE16ANSWERFILE"') EndIf
ANSWERFILEx32 – upload pending
ANSWERFILEx64- upload pending
Microsoft Office 2007
Run setup.exe /admin and generate MST file.
FileChangeDir(@WorkingDir & "\Data") ;Run through office 2007 setup (unattended) RunWait("setup.exe /adminfile Updates\Office2007Automated_NoFinishNotice.MSP")
Optional script that opens Office and selects automatic updates and default settings.
Opt('ExpandEnvStrings', 1) ; Run Office 2007 Run("c:\program files (x86)\Microsoft Office\Office12\Winword.exe") Run("c:\program files\Microsoft Office\Office12\Winword.exe") SetError(0) WinWaitActive("Microsoft Word") Sleep(2500) WinActivate("Welcome to the 2007") WinWaitActive("Welcome to the 2007") ControlClick("Welcome to the 2007 Microsoft Office system", "", "", "left", 1, 526, 381) Sleep(500) ControlClick("Welcome to the 2007 Microsoft Office system", "", "", "left", 1, 87, 176) ControlClick("Welcome to the 2007 Microsoft Office system", "", "", "left", 1, 526, 381) Sleep(2500) Send("!f") Send("x") WinWaitClose("Microsoft Word") ;Finished, now windows updates will get updates for 2007
Microsoft Office 2010
See this post for detailed instructions
Microsoft Office Save As PDF (2007 Plugin)
FileChangeDir(@WorkingDir & "\Data") RunWait("SaveAsPdf.exe /quiet")
MikTex 2.8 (2.9 is similar)
FileChangeDir(@WorkingDir & "\Data") RunWait("basic-miktex-2.8.3761.exe --auto-install=yes --unattended --paper-size=Letter")
1 Comments
Very useful reference, thanks so much for posting this!
Leave a Reply