sumanth1980 Posted July 6, 2018 Posted July 6, 2018 Here i am wrote a simple lines to install basic applications but when i clicked on one application/program to install it was working fine but when i cancel the program in the middle to install another program it was not working. I am not an expert in this but i want a solution for this ... Can any one help me on this.... ORG-1.au3
sumanth1980 Posted July 6, 2018 Author Posted July 6, 2018 (edited) expandcollapse popup#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=f:\all-in-one.kxf $Form1_1 = GUICreate("All-IN-ONE-Console Ver-1.0", 479, 584, -1, -1) GUISetFont(8, 400, 0, "Verdana") GUISetBkColor(0x008080) $Button1 = GUICtrlCreateButton("Kaseya", 304, 152, 121, 25) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0xFFFBF0) $Button2 = GUICtrlCreateButton("FW-Ports-SQLTCP/IP-NS", 312, 376, 145, 25) GUICtrlSetFont(-1, 7, 400, 0, "Verdana") GUICtrlSetColor(-1, 0x000000) $Button4 = GUICtrlCreateButton(".Net Framework 3.5", 304, 184, 121, 25) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0xFFFBF0) $Button5 = GUICtrlCreateButton("Winrar", 24, 144, 121, 25) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0xC8C8C8) $Button6 = GUICtrlCreateButton("Oracle", 152, 144, 121, 25) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0xC8C8C8) $Button7 = GUICtrlCreateButton("POS", 152, 176, 121, 25) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0xC8C8C8) $Button8 = GUICtrlCreateButton("Acrobat-reader", 24, 176, 121, 25) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0xC8C8C8) $Button9 = GUICtrlCreateButton(".NET Framework 4.5", 304, 216, 121, 25) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0xFFFBF0) $Button10 = GUICtrlCreateButton("Desktop-Shortcuts", 312, 408, 145, 25) GUICtrlSetFont(-1, 7, 400, 0, "Verdana") GUICtrlSetColor(-1, 0x000000) $Button11 = GUICtrlCreateButton("ThinPrinter-64Bit", 168, 504, 121, 25) GUICtrlSetColor(-1, 0x000000) $Button13 = GUICtrlCreateButton("Liber-Office", 24, 208, 121, 25) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0xC8C8C8) $Button14 = GUICtrlCreateButton("MFS-Driver", 152, 208, 121, 25) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0xC8C8C8) $Button15 = GUICtrlCreateButton("MFS-Client-Service", 152, 240, 121, 25) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0xC8C8C8) $Button16 = GUICtrlCreateButton("Mozilla-Firefox", 24, 240, 121, 25) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0xC8C8C8) $Group1 = GUICtrlCreateGroup("Basic-Softwares", 8, 112, 465, 233) GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0xFFFFFF) GUICtrlCreateGroup("", -99, -99, 1, 1) $Button17 = GUICtrlCreateButton("VPN-Config-Import-32Bit", 312, 440, 145, 25) GUICtrlSetFont(-1, 7, 400, 0, "Verdana") GUICtrlSetColor(-1, 0x000000) $Button20 = GUICtrlCreateButton("EXIT", 312, 504, 145, 25) GUICtrlSetColor(-1, 0x000000) $Button21 = GUICtrlCreateButton("MS-SQL-32Bit", 24, 376, 121, 25) GUICtrlSetColor(-1, 0x000000) $Button22 = GUICtrlCreateButton("MS-SQL-64Bit", 168, 376, 121, 25) GUICtrlSetColor(-1, 0x000000) $Button23 = GUICtrlCreateButton("AX-Prerequ-64Bit", 168, 408, 121, 25) GUICtrlSetColor(-1, 0x000000) $Button24 = GUICtrlCreateButton("AX-Prerequ-32Bit", 24, 408, 121, 25) GUICtrlSetColor(-1, 0x000000) $Button27 = GUICtrlCreateButton("Async-Config-64Bit", 168, 536, 121, 25) GUICtrlSetColor(-1, 0x000000) $Button28 = GUICtrlCreateButton("Async-Config-32Bit", 24, 536, 121, 25) GUICtrlSetColor(-1, 0x000000) $Button29 = GUICtrlCreateButton("AX-32Bit", 24, 440, 121, 25) GUICtrlSetColor(-1, 0x000000) $Button30 = GUICtrlCreateButton("AX-64Bit", 168, 440, 121, 25) GUICtrlSetColor(-1, 0x000000) $Button31 = GUICtrlCreateButton("FortiCleint-64Bit", 168, 472, 121, 25) GUICtrlSetColor(-1, 0x000000) $Button32 = GUICtrlCreateButton("FortiClient-32Bit", 24, 472, 121, 25) GUICtrlSetColor(-1, 0x000000) $Group2 = GUICtrlCreateGroup("Core-Softwares", 8, 344, 465, 233) GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0xFFFFFF) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group3 = GUICtrlCreateGroup("Pre-Requirements", 8, 8, 465, 105) GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0xFFFFFF) $Button33 = GUICtrlCreateButton("Admin Enable-Password Set", 288, 32, 169, 25) $Button19 = GUICtrlCreateButton("System-Name-Change ", 291, 72, 169, 25) $Group9 = GUICtrlCreateGroup("Source-Path-Drive", 24, 32, 249, 65) GUICtrlSetFont(-1, 7, 400, 0, "Verdana") GUICtrlSetBkColor(-1, 0xA6CAF0) $Radio1 = GUICtrlCreateRadio("D", 48, 72, 41, 25) $Radio2 = GUICtrlCreateRadio("E", 101, 72, 41, 25) $Radio3 = GUICtrlCreateRadio("F", 157, 72, 41, 25) $Radio4 = GUICtrlCreateRadio("G", 213, 72, 41, 25) GUICtrlCreateGroup("", -99, -99, 1, 1) GUICtrlCreateGroup("", -99, -99, 1, 1) $Button35 = GUICtrlCreateButton("PAD", 24, 272, 121, 25) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0xC8C8C8) $Button36 = GUICtrlCreateButton("Generic-Printer", 152, 272, 121, 25) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0xC8C8C8) $Group4 = GUICtrlCreateGroup("Auto", 16, 128, 265, 209) GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0xB9D1EA) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group5 = GUICtrlCreateGroup("Manual", 296, 128, 137, 121) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0xA6CAF0) GUICtrlCreateGroup("", -99, -99, 1, 1) $Button12 = GUICtrlCreateButton("ALL", 304, 256, 129, 33) GUICtrlSetColor(-1, 0x000000) $Button37 = GUICtrlCreateButton("ThinPrinter-32Bit", 24, 504, 121, 25) GUICtrlSetColor(-1, 0x000000) $Button38 = GUICtrlCreateButton("VPN-Config-Import-64Bit", 312, 472, 145, 25) GUICtrlSetFont(-1, 7, 400, 0, "Verdana") GUICtrlSetColor(-1, 0x000000) $Button39 = GUICtrlCreateButton("WU-Disable", 152, 304, 121, 25) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0xC8C8C8) $Button40 = GUICtrlCreateButton("DailUp-Connection", 24, 304, 121, 25) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0xC8C8C8) $Group6 = GUICtrlCreateGroup("32Bit-Auto", 16, 360, 137, 209) GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0xA6CAF0) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group7 = GUICtrlCreateGroup("64Bit-Auto", 160, 360, 137, 209) GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0xA6CAF0) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group8 = GUICtrlCreateGroup("Gen-Settings-Auto", 304, 360, 161, 209) GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0xA6CAF0) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 main1() Case $Button2 main2() Case $Button4 main4() Case $Button5 main5() Case $Button6 main6() Case $Button7 main7() Case $Button8 main8() Case $Button9 main9() Case $Button10 main10() Case $Button11 main11() Case $Button12 main5() Sleep(200) main8() Sleep(200) main13() Sleep(200) main16() Sleep(200) main35() Sleep(200) main6() Sleep(200) main7() Sleep(200) main14() Sleep(200) main15() Sleep(200) main36() Sleep(200) main39() Sleep(200) Case $Button13 main13() Case $Button14 main14() Case $Button15 main15() Case $Button16 main16() Case $Button17 main17() Case $Button21 main21() Case $Button22 main22() Case $Button23 main23() Case $Button24 main24() Case $Button27 main27() Case $Button28 main28() Case $Button29 main29() Case $Button30 main30() Case $Button31 main31() Case $Button32 main32() Case $Button33 main33() Case $Button20 Exit Case $Radio1 Case $Radio2 Case $Radio3 Case $Radio4 EndSwitch WEnd ;For Kaseya Func main1() ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\KcsSetup.exe") EndFunc ;For FW-Ports & SQL TCP/Ip-NS Enable Func main2() ShellExecute("F:\AX_Softwares\Other_Softwares\Printer-Spooler\Support_Files\Firewall-Ports_Profiles-SQL-TCPIP-NS-Enable") EndFunc ;For .Net Framework 3.5 Func main4() ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\dotnetfx35.exe") EndFunc ;For Winrar installation Func main5() ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\Wrar.exe") Sleep(300); WinActivate("WinRAR 3.62") WinWaitActive("WinRAR 3.62") Send("{ENTER}"); Sleep(300); WinActivate("WinRAR Setup") WinWaitActive("WinRAR Setup") Send("{ENTER}"); Sleep(300); Send("{ENTER}"); Sleep(300) EndFunc ;For Oracle-6 Func main6() Global $FFInstdest = ("F:\AX_Softwares\SOFTWARE_DUMP\OracleXEUniv.exe") Global $FFSetupWin = ("InstallShield Wizard") Global $FFSetupWin1 = ("Oracle Database 10g Express Edition - Install Wizard") ShellExecute($FFInstdest) Sleep(500); WinWaitActive($FFSetupWin) WinActivate($FFSetupWin) Sleep(20000); WinWaitActive($FFSetupWin1) WinActivate($FFSetupWin1) Sleep(500) Send("{ENTER}"); Sleep(500); Send("!a"); Sleep(500); Send("{ENTER}"); Sleep(500) Send("!r"); WinWaitActive("Choose Folder") WinActivate("Choose Folder") Send("D:\oraclexe",1); Sleep(500); Send("{ENTER}"); Sleep(500); Send("!n"); Sleep(500); Send("{TAB}"); Sleep(500); Send("system",1); Sleep(500) Send("{TAB}"); Sleep(500); Send("system",1); Sleep(500); Send("{ENTER}"); Sleep(500); Send("!i") Sleep(15000); WinWaitActive($FFSetupWin1,"Setup has finished installing Oracle Database 10g Express Edition on your computer") WinActivate($FFSetupWin1,"Setup has finished installing Oracle Database 10g Express Edition on your computer") Sleep(100) Send("!l") Sleep(100) Send("{ENTER}") EndFunc ;For POS Func main7() ShellExecute("F:\AX_Softwares\SHOP_AX\Package\setup.exe") Sleep(300); WinActivate("possetup Setup") WinWaitActive("possetup Setup") Send("{ENTER}"); Sleep(300); Send("!c") Sleep(300) Send("D:\Shop") Sleep(300) Send("{TAB}") Sleep(300) Send("{TAB}") Sleep(300) Send("{TAB}") Sleep(300) Send("{ENTER}") Sleep(300) Send("{ENTER}") Sleep(300) WinActivate("possetup - Choose Program Group") WinWaitActive("possetup - Choose Program Group") Sleep(300) Send("{ENTER}") Sleep(300) WinActivate("Version Conflict") WinWaitActive("Version Conflict") Sleep(300) Send("{ENTER}") WinActivate("Version Conflict") WinWaitActive("Version Conflict") Sleep(400) Send("{ENTER}") WinActivate("Version Conflict") WinWaitActive("Version Conflict") Sleep(400) Send("{ENTER}") WinActivate("Version Conflict") WinWaitActive("Version Conflict") Sleep(400) Send("{ENTER}") WinActivate("possetup Setup") WinWaitActive("possetup Setup") Sleep(300) Send("{ENTER}") EndFunc ;For Acrobat-reader Installation Func main8() ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\Acrobat_Reader.exe") Sleep(8000); WinActivate("Adobe Reader X (10.1.1) - Setup","Ready to Install Adobe Reader X (10.1.1)") WinWaitActive("Adobe Reader X (10.1.1) - Setup","Ready to Install Adobe Reader X (10.1.1)") Sleep(200) Send("{ENTER}"); Sleep(5000); WinWaitActive("Adobe Reader X (10.1.1) - Setup", "Setup Completed") Sleep(200) Send("{ENTER}"); Sleep(1000); EndFunc ;For .net framework 4.5 Func main9() ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\dotnetfx45_full_x86_x64.exe") EndFunc ;For Desktop_Shortcuts Func main10() ShellExecute("F:\AX_Softwares\Other_Softwares\Printer-Spooler\Support_Files\Desktop_Shortcuts") EndFunc ;For ThinPrinter-64 bit Func main11() ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\Thin_Printer_RDP\ThinPrintRDPClient_x64") Sleep(300) WinWaitActive("ThinPrint Client Windows for RDP 10 - InstallShield Wizard") WinActivate("ThinPrint Client Windows for RDP 10 - InstallShield Wizard") Sleep(500) Send("{ENTER}") Sleep(500) WinWaitActive("ThinPrint Client Windows for RDP 10","The InstallShield(R) Wizard will install ThinPrint Client Windows for RDP 10 on your computer") WinActivate("ThinPrint Client Windows for RDP 10","The InstallShield(R) Wizard will install ThinPrint Client Windows for RDP 10 on your computer") Sleep(600) Send("!n") Sleep(300) Send("!a") Sleep(200) Send("{ENTER}") Sleep(300) Send("!i") Sleep(1500) WinWaitActive("ThinPrint Client Windows for RDP 10","The InstallShield Wizard has successfully installed ThinPrint Client Windows for RDP 10") WinActivate("ThinPrint Client Windows for RDP 10","The InstallShield Wizard has successfully installed ThinPrint Client Windows for RDP 10") Sleep(300) Send("{ENTER}") Sleep(300) EndFunc ;For LibreOffice installation Func main13() ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\LibreOffice.msi") WinActivate("LibreOffice 5.2.3.3 - Installation Wizard") WinWaitActive("LibreOffice 5.2.3.3 - Installation Wizard") Sleep(500); WinActivate("LibreOffice 5.2.3.3 - Installation Wizard") WinWaitActive("LibreOffice 5.2.3.3 - Installation Wizard") Send("{ENTER}"); Sleep(500); Send("{ENTER}"); Send("{TAB}"); Send("{TAB}"); Send("{SPACE}"); Send("{TAB}"); Send("{TAB}"); Sleep(500); Send("{ENTER}"); Sleep(500); Send("{ENTER}"); Sleep(500); Send("{ENTER}"); Sleep(1500); WinActivate("LibreOffice 5.2.3.3 - Installation Wizard","Installation Wizard Completed") WinWaitActive("LibreOffice 5.2.3.3 - Installation Wizard","Installation Wizard Completed") Send("{ENTER}"); EndFunc ;For MSF100driver-setup Installation Func main14() Global $FFInstdest = ("F:\AX_Softwares\SOFTWARE_DUMP\MFS\New_MFS\MFS100_Driver_Setup.exe") Global $FFSetupWin = ("Setup - MFS100 Fingerprint Sensor Driver") Global $FFSetupWin1 = ("Device Driver Installation Wizard") ShellExecute($FFInstdest) Sleep(50); WinActivate($FFSetupWin) WinWaitActive($FFSetupWin) Send("{ENTER}"); Sleep(200); Send("{ENTER}"); Sleep(200); Send("{ENTER}"); Sleep(200); Send("{ENTER}"); Sleep(200); WinWaitActive($FFSetupWin1) WinWaitActive($FFSetupWin1) Send("{ENTER}"); Sleep(200); WinWaitActive($FFSetupWin1,"Completing the Device Driver Installation Wizard") WinWaitActive($FFSetupWin1,"Completing the Device Driver Installation Wizard") Send("{ENTER}"); Sleep(200) WinWaitActive($FFSetupWin) WinWaitActive($FFSetupWin) Send("{ENTER}"); Sleep(200) EndFunc ;For MFS_Client_Service Func main15() Global $FFInstdest = ("F:\AX_Softwares\SOFTWARE_DUMP\MFS\New_MFS\MFS100ClientService.exe") Global $FFSetupWin = ("Setup - MFS100ClientService") Global $FFSetupWin1 = ("Setup - MFS100Driver") ShellExecute($FFInstdest) Sleep(50); WinWaitActive($FFSetupWin) WinActivate($FFSetupWin) Send("{ENTER}"); Sleep(200); Send("{ENTER}"); Sleep(200) WinWaitActive($FFSetupWin1) WinActivate($FFSetupWin1) Sleep(200); Send("{ENTER}"); Sleep(200); Send("{ENTER}"); Sleep(1000); WinWaitActive("Windows Security") WinActivate("Windows Security") Sleep(200) Send("!i") Sleep(400) WinWaitActive($FFSetupWin1) WinActivate($FFSetupWin1) Sleep(300) EndFunc ;For Mozilla firefox Func main16() Global $FFInstdest = ("F:\AX_Softwares\SOFTWARE_DUMP\Firefox Setup 9.0.1.exe") Global $FFSetupWin = ("Mozilla Firefox Setup") Run($FFInstdest) Sleep(1000); WinActivate($FFSetupWin) WinWaitActive($FFSetupWin) Send("{ENTER}"); Sleep(1000); Send("{ENTER}"); Sleep(1000); Send("{ENTER}"); Sleep(1000); WinWaitActive($FFSetupWin, "Completing the Mozilla Firefox Setup Wizard") Sleep(200) Send("!l") Sleep(200) Send("{ENTER}"); Sleep(1000) EndFunc ;For VPN_Config_import-32 Bit Func main17() ShellExecute("F:\AX_Softwares\Other_Softwares\Printer-Spooler\Support_Files\Forti_Client-Config-Import-32 Bit") EndFunc ;For Ms-Sql 32 bit version Func main21() Global $FFInstdest = ("F:\AX_Softwares\Other_Softwares\Printer-Spooler\Support_Files\SQL_Installation_32Bitexe") Global $FFSetupWin = ("SQL Server Installation Center") Global $FFSetupWin1 = ("SQL Server 2014 Setup") ShellExecute($FFInstdest) Sleep(1000); WinWaitActive($FFSetupWin) WinActivate($FFSetupWin) Sleep(500) Send("{TAB}") Send("{ENTER}") Sleep(500) WinWaitActive($FFSetupWin1) WinActivate($FFSetupWin1) Sleep(500) Send("!a") Sleep(500) Send("!n") WinWaitActive($FFSetupWin1,"Microsoft Update") WinActivate($FFSetupWin1,"Microsoft Update") Send("{TAB}") Sleep(400) Send("{TAB}") Sleep(400) Send("{TAB}") Sleep(400) Send("{TAB}") Sleep(400) Send("{TAB}") Sleep(400) Send("{ENTER}") Sleep(400) Send("!n") Sleep(400) Send("!n") Sleep(500) WinWaitActive($FFSetupWin1,"Feature Selection") WinActivate($FFSetupWin1,"Feature Selection") Send("!u") Sleep(400) Send("{DOWN}") Sleep(400) Send("{DOWN}") Sleep(400) Send("{DOWN}") Sleep(400) Send("{SPACE}") Sleep(400) Send("{DOWN}") Sleep(400) Send("{DOWN}") Sleep(400) Send("{DOWN}") Sleep(400) Send("{SPACE}") Sleep(400) Send("{DOWN}") Sleep(400) Send("{DOWN}") Sleep(400) Send("{SPACE}") Sleep(400) Send("{DOWN}") Sleep(400) Send("{DOWN}") Sleep(400) Send("{DOWN}") Sleep(400) Send("{SPACE}") Sleep(400) Send("!n") Sleep(400) WinWaitActive($FFSetupWin1,"Instance Configuration") WinActivate($FFSetupWin1,"Instance Configuration") Sleep(400) Send("!d") Sleep(400) Send("!n") WinWaitActive($FFSetupWin1,"Server Configuration") WinActivate($FFSetupWin1,"Server Configuration") Sleep(400) Send("{TAB}") Sleep(400) Send("{TAB}") Sleep(400) Send("{TAB}") Sleep(400) Send("{DOWN}") Sleep(400) Send("{DOWN}") Sleep(500) Send("Administrator",1) Sleep(500) Send("!c") Sleep(500) Send("{ENTER}") Sleep(500) Send("{TAB}") Sleep(500) Send("apollo@123",0) Sleep(500) Send("!n") Sleep(400) WinWaitActive($FFSetupWin1,"Database Engine Configuration") WinActivate($FFSetupWin1,"Database Engine Configuration") Sleep(400) Send("!m") Sleep(400) Send("{TAB}") Sleep(500) Send("apollo@123",0) Sleep(500) Send("{TAB}") Sleep(400) Send("apollo@123",0) Sleep(400) Send("{TAB}") Sleep(400) Send("{TAB}") Sleep(400) Send("{TAB}") Sleep(400) Send("{TAB}") Sleep(400) Send("{TAB}") Sleep(400) Send("{TAB}") Sleep(400) Send("{TAB}") Sleep(400) Send("{TAB}") Sleep(400) Send("{TAB}") Sleep(400) Send("{TAB}") Sleep(400) Send("{RIGHT}") Sleep(400) WinWaitActive($FFSetupWin1,"&Data root directory") WinActivate($FFSetupWin1,"&Data root directory") Sleep(400) Send("{TAB}") Sleep(400) Send("{BS}") Sleep(500) Send("D:\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA",0) Sleep(400) Send("!n") Sleep(13000) WinWaitActive($FFSetupWin1,"Your SQL Server 2014 installation completed successfully") WinActivate($FFSetupWin1,"Your SQL Server 2014 installation completed successfully") Sleep(300) Send("{TAB}") Sleep(200) Send("{TAB}") Sleep(300) Send("{TAB}") Sleep(300) Send("{TAB}") Sleep(300) Send("{ENTER}") Sleep(300) WinWaitActive($FFSetupWin) WinActivate($FFSetupWin) Sleep(300) Send("{ALT}{SPACE}") Sleep(300) Send("{UP}") Sleep(300) Send("{ENTER}") Sleep(300) EndFunc ;For Ms-Sql 64 bit version Func main22() Global $FFInstdest = ("F:\AX_Softwares\Other_Softwares\Printer-Spooler\Support_Files\SQL_Installation-64Bit.exe") Global $FFSetupWin = ("SQL Server Installation Center") Global $FFSetupWin1 = ("SQL Server 2014 Setup") ShellExecute($FFInstdest) Sleep(1000); WinWaitActive($FFSetupWin) WinActivate($FFSetupWin) Sleep(500) Send("{TAB}") Send("{ENTER}") Sleep(500) WinWaitActive($FFSetupWin1) WinActivate($FFSetupWin1) Sleep(500) Send("!a") Sleep(500) Send("!n") WinWaitActive($FFSetupWin1,"Microsoft Update") WinActivate($FFSetupWin1,"Microsoft Update") Send("{TAB}") Sleep(400) Send("{TAB}") Sleep(400) Send("{TAB}") Sleep(400) Send("{TAB}") Sleep(400) Send("{TAB}") Sleep(400) Send("{ENTER}") Sleep(400) Send("!n") Sleep(400) Send("!n") Sleep(500) WinWaitActive($FFSetupWin1,"Feature Selection") WinActivate($FFSetupWin1,"Feature Selection") Send("!u") Sleep(400) Send("{DOWN}") Sleep(400) Send("{DOWN}") Sleep(400) Send("{DOWN}") Sleep(400) Send("{SPACE}") Sleep(400) Send("{DOWN}") Sleep(400) Send("{DOWN}") Sleep(400) Send("{DOWN}") Sleep(400) Send("{SPACE}") Sleep(400) Send("{DOWN}") Sleep(400) Send("{DOWN}") Sleep(400) Send("{SPACE}") Sleep(400) Send("{DOWN}") Sleep(400) Send("{DOWN}") Sleep(400) Send("{DOWN}") Sleep(400) Send("{SPACE}") Sleep(400) Send("!n") Sleep(400) WinWaitActive($FFSetupWin1,"Instance Configuration") WinActivate($FFSetupWin1,"Instance Configuration") Sleep(400) Send("!d") Sleep(400) Send("!n") WinWaitActive($FFSetupWin1,"Server Configuration") WinActivate($FFSetupWin1,"Server Configuration") Sleep(400) Send("{TAB}") Sleep(400) Send("{TAB}") Sleep(400) Send("{TAB}") Sleep(400) Send("{DOWN}") Sleep(400) Send("{DOWN}") Sleep(500) Send("Administrator",1) Sleep(500) Send("!c") Sleep(500) Send("{ENTER}") Sleep(500) Send("{TAB}") Sleep(500) Send("apollo@123",0) Sleep(500) Send("!n") Sleep(400) WinWaitActive($FFSetupWin1,"Database Engine Configuration") WinActivate($FFSetupWin1,"Database Engine Configuration") Sleep(400) Send("!m") Sleep(400) Send("{TAB}") Sleep(500) Send("apollo@123",0) Sleep(500) Send("{TAB}") Sleep(400) Send("apollo@123",0) Sleep(400) Send("{TAB}") Sleep(400) Send("{TAB}") Sleep(400) Send("{TAB}") Sleep(400) Send("{TAB}") Sleep(400) Send("{TAB}") Sleep(400) Send("{TAB}") Sleep(400) Send("{TAB}") Sleep(400) Send("{TAB}") Sleep(400) Send("{TAB}") Sleep(400) Send("{TAB}") Sleep(400) Send("{RIGHT}") Sleep(400) WinWaitActive($FFSetupWin1,"&Data root directory") WinActivate($FFSetupWin1,"&Data root directory") Sleep(400) Send("{TAB}") Sleep(400) Send("{BS}") Sleep(500) Send("D:\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA",0) Sleep(400) Send("!n") Sleep(13000) WinWaitActive($FFSetupWin1,"Your SQL Server 2014 installation completed successfully") WinActivate($FFSetupWin1,"Your SQL Server 2014 installation completed successfully") Sleep(300) Send("{TAB}") Sleep(200) Send("{TAB}") Sleep(300) Send("{TAB}") Sleep(300) Send("{TAB}") Sleep(300) Send("{ENTER}") Sleep(300) WinWaitActive($FFSetupWin) WinActivate($FFSetupWin) Sleep(300) Send("{ALT}{SPACE}") Sleep(300) Send("{UP}") Sleep(300) Send("{ENTER}") Sleep(300) EndFunc ;For AX-64Bit Prerequasations Func main23() ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\AX_64bit\Pos_Prerequisites\Sync_Framework\hotfix\Synchronization-KB2703853-v2.1-x64-ENU.msi") Sleep(200) WinWait("Microsoft Sync Framework 2.1 Core Components (x64) ENU (KB2703853)") WinActivate("Microsoft Sync Framework 2.1 Core Components (x64) ENU (KB2703853)") Sleep(200) Send("{ENTER}") Sleep(200) Send("!a") Sleep(200) Send("{ENTER}") Sleep(200) Send("{ENTER}") Sleep(500) WinWaitActive("Microsoft Sync Framework 2.1 Core Components (x64) ENU (KB2703853)","Microsoft Sync Framework 2.1 Core Components (x64) ENU (KB2703853) has been successfully installed") WinActivate("Microsoft Sync Framework 2.1 Core Components (x64) ENU (KB2703853)","Microsoft Sync Framework 2.1 Core Components (x64) ENU (KB2703853) has been successfully installed") Sleep(200) Send("{ENTER}") Sleep(500) ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\AX_64bit\Pos_Prerequisites\Sync_Framework\hotfix\ProviderServices-KB2703853-v2.1-x64-ENU.msi") Sleep(200) WinWait("Microsoft Sync Framework 2.1 Provider Services (x64) ENU (KB2703853)") WinActivate("Microsoft Sync Framework 2.1 Provider Services (x64) ENU (KB2703853)") Sleep(200) Send("{ENTER}") Sleep(200) Send("!a") Sleep(200) Send("{ENTER}") Sleep(200) Send("{ENTER}") Sleep(500) WinWaitActive("Microsoft Sync Framework 2.1 Provider Services (x64) ENU (KB2703853)","Microsoft Sync Framework 2.1 Provider Services (x64) ENU (KB2703853) has been successfully installed") WinActivate("Microsoft Sync Framework 2.1 Provider Services (x64) ENU (KB2703853)","Microsoft Sync Framework 2.1 Provider Services (x64) ENU (KB2703853) has been successfully installed") Sleep(200) Send("{ENTER}") Sleep(500) ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\AX_64bit\Pos_Prerequisites\Sync_Framework\hotfix\DatabaseProviders-KB2703853-v3.1-x64-ENU.msi") Sleep(200) WinWait("Microsoft Sync Framework 2.1 Database Providers (x64) ENU (KB2703853)") WinActivate("Microsoft Sync Framework 2.1 Database Providers (x64) ENU (KB2703853)") Sleep(200) Send("{ENTER}") Sleep(200) Send("!a") Sleep(200) Send("{ENTER}") Sleep(200) Send("{ENTER}") Sleep(500) WinWaitActive("Microsoft Sync Framework 2.1 Database Providers (x64) ENU (KB2703853)","Microsoft Sync Framework 2.1 Database Providers (x64) ENU (KB2703853) has been successfully installed") WinActivate("Microsoft Sync Framework 2.1 Database Providers (x64) ENU (KB2703853)","Microsoft Sync Framework 2.1 Database Providers (x64) ENU (KB2703853) has been successfully installed") Sleep(200) Send("{ENTER}") Sleep(500) ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\AX_64bit\Pos_Prerequisites\Sync_Framework\Synchronization-v2.1-x64-ENU.msi") Sleep(200) WinWait("Microsoft Sync Framework 2.1 Core Components (x64) ENU ") WinActivate("Microsoft Sync Framework 2.1 Core Components (x64) ENU ") Sleep(200) Send("{ENTER}") Sleep(200) Send("!a") Sleep(200) Send("{ENTER}") Sleep(200) Send("{ENTER}") Sleep(500) WinWaitActive("Microsoft Sync Framework 2.1 Core Components (x64) ENU ","Microsoft Sync Framework 2.1 Core Components (x64) ENU has been successfully installed") WinActivate("Microsoft Sync Framework 2.1 Core Components (x64) ENU ","Microsoft Sync Framework 2.1 Core Components (x64) ENU has been successfully installed") Sleep(200) Send("{ENTER}") Sleep(400) ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\AX_64bit\Pos_Prerequisites\Sync_Framework\ProviderServices-v2.1-x64-ENU.msi") Sleep(200) WinWait("Microsoft Sync Framework 2.1 Provider Services (x64) ENU") WinActivate("Microsoft Sync Framework 2.1 Provider Services (x64) ENU") Sleep(200) Send("{ENTER}") Sleep(200) Send("!a") Sleep(200) Send("{ENTER}") Sleep(200) Send("{ENTER}") Sleep(500) WinWaitActive("Microsoft Sync Framework 2.1 Provider Services (x64) ENU ","Microsoft Sync Framework 2.1 Provider Services (x64) ENU has been successfully installed") WinActivate("Microsoft Sync Framework 2.1 Provider Services (x64) ENU ","Microsoft Sync Framework 2.1 Provider Services (x64) ENU has been successfully installed") Sleep(200) Send("{ENTER}") Sleep(500) ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\AX_64bit\Pos_Prerequisites\Sync_Framework\DatabaseProviders-v3.1-x64-ENU.msi") Sleep(200) WinWait("Microsoft Sync Framework 2.1 Database Providers (x64) ENU") WinActivate("Microsoft Sync Framework 2.1 Database Providers (x64) ENU") Sleep(200) Send("{ENTER}") Sleep(200) Send("!a") Sleep(200) Send("{ENTER}") Sleep(200) Send("{ENTER}") Sleep(500) WinWaitActive("Microsoft Sync Framework 2.1 Database Providers (x64) ENU","Microsoft Sync Framework 2.1 Database Providers (x64) ENU has been successfully installed") WinActivate("Microsoft Sync Framework 2.1 Database Providers (x64) ENU","Microsoft Sync Framework 2.1 Database Providers (x64) ENU has been successfully installed") Sleep(200) Send("{ENTER}") Sleep(500) EndFunc ;For AX-32 Bit Prerequasations Func main24() ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\AX_32bit\Pos_Prerequisites\Sync_Framework\hotfix\Synchronization-KB2703853-v2.1-x86-ENU.msi") Sleep(200) WinWait("Microsoft Sync Framework 2.1 Core Components (x86) ENU (KB2703853)") WinActivate("Microsoft Sync Framework 2.1 Core Components (x86) ENU (KB2703853)") Sleep(200) Send("{ENTER}") Sleep(200) Send("!a") Sleep(200) Send("{ENTER}") Sleep(200) Send("{ENTER}") Sleep(500) WinWaitActive("Microsoft Sync Framework 2.1 Core Components (x86) ENU (KB2703853)","Microsoft Sync Framework 2.1 Core Components (x86) ENU (KB2703853) has been successfully installed") WinActivate("Microsoft Sync Framework 2.1 Core Components (x86) ENU (KB2703853)","Microsoft Sync Framework 2.1 Core Components (x86) ENU (KB2703853) has been successfully installed") Sleep(200) Send("{ENTER}") Sleep(500) ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\AX_32bit\Pos_Prerequisites\Sync_Framework\hotfix\ProviderServices-KB2703853-v2.1-x86-ENU.msi") Sleep(200) WinWait("Microsoft Sync Framework 2.1 Provider Services (x86) ENU (KB2703853)") WinActivate("Microsoft Sync Framework 2.1 Provider Services (x86) ENU (KB2703853)") Sleep(200) Send("{ENTER}") Sleep(200) Send("!a") Sleep(200) Send("{ENTER}") Sleep(200) Send("{ENTER}") Sleep(500) WinWaitActive("Microsoft Sync Framework 2.1 Provider Services (x86) ENU (KB2703853)","Microsoft Sync Framework 2.1 Provider Services (x86) ENU (KB2703853) has been successfully installed") WinActivate("Microsoft Sync Framework 2.1 Provider Services (x86) ENU (KB2703853)","Microsoft Sync Framework 2.1 Provider Services (x86) ENU (KB2703853) has been successfully installed") Sleep(200) Send("{ENTER}") Sleep(500) ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\AX_32bit\Pos_Prerequisites\Sync_Framework\hotfix\DatabaseProviders-KB2703853-v3.1-x86-ENU.msi") Sleep(200) WinWait("Microsoft Sync Framework 2.1 Database Providers (x86) ENU (KB2703853)") WinActivate("Microsoft Sync Framework 2.1 Database Providers (x86) ENU (KB2703853)") Sleep(200) Send("{ENTER}") Sleep(200) Send("!a") Sleep(200) Send("{ENTER}") Sleep(200) Send("{ENTER}") Sleep(500) WinWaitActive("Microsoft Sync Framework 2.1 Database Providers (x86) ENU (KB2703853)","Microsoft Sync Framework 2.1 Database Providers (x86) ENU (KB2703853) has been successfully installed") WinActivate("Microsoft Sync Framework 2.1 Database Providers (x86) ENU (KB2703853)","Microsoft Sync Framework 2.1 Database Providers (x86) ENU (KB2703853) has been successfully installed") Sleep(200) Send("{ENTER}") Sleep(500) ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\AX_32bit\Pos_Prerequisites\Sync_Framework\Synchronization-v2.1-x86-ENU.msi") Sleep(200) WinWait("Microsoft Sync Framework 2.1 Core Components (x86) ENU ") WinActivate("Microsoft Sync Framework 2.1 Core Components (x86) ENU ") Sleep(200) Send("{ENTER}") Sleep(200) Send("!a") Sleep(200) Send("{ENTER}") Sleep(200) Send("{ENTER}") Sleep(500) WinWaitActive("Microsoft Sync Framework 2.1 Core Components (x86) ENU ","Microsoft Sync Framework 2.1 Core Components (x86) ENU has been successfully installed") WinActivate("Microsoft Sync Framework 2.1 Core Components (x86) ENU ","Microsoft Sync Framework 2.1 Core Components (x86) ENU has been successfully installed") Sleep(200) Send("{ENTER}") Sleep(400) ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\AX_32bit\Pos_Prerequisites\Sync_Framework\ProviderServices-v2.1-x86-ENU.msi") Sleep(200) WinWait("Microsoft Sync Framework 2.1 Provider Services (x86) ENU") WinActivate("Microsoft Sync Framework 2.1 Provider Services (x86) ENU") Sleep(200) Send("{ENTER}") Sleep(200) Send("!a") Sleep(200) Send("{ENTER}") Sleep(200) Send("{ENTER}") Sleep(500) WinWaitActive("Microsoft Sync Framework 2.1 Provider Services (x86) ENU ","Microsoft Sync Framework 2.1 Provider Services (x86) ENU has been successfully installed") WinActivate("Microsoft Sync Framework 2.1 Provider Services (x86) ENU ","Microsoft Sync Framework 2.1 Provider Services (x86) ENU has been successfully installed") Sleep(200) Send("{ENTER}") Sleep(500) ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\AX_32bit\Pos_Prerequisites\Sync_Framework\DatabaseProviders-v3.1-x86-ENU.msi") Sleep(200) WinWait("Microsoft Sync Framework 2.1 Database Providers (x86) ENU") WinActivate("Microsoft Sync Framework 2.1 Database Providers (x86) ENU") Sleep(200) Send("{ENTER}") Sleep(200) Send("!a") Sleep(200) Send("{ENTER}") Sleep(200) Send("{ENTER}") Sleep(500) WinWaitActive("Microsoft Sync Framework 2.1 Database Providers (x86) ENU","Microsoft Sync Framework 2.1 Database Providers (x86) ENU has been successfully installed") WinActivate("Microsoft Sync Framework 2.1 Database Providers (x86) ENU","Microsoft Sync Framework 2.1 Database Providers (x86) ENU has been successfully installed") Sleep(200) Send("{ENTER}") Sleep(500) EndFunc ;For Async service Configuration-64 Bit Func main27() ShellExecute("C:\%Program Files(x86)%\%Microsoft Dynamics AX%\60\CDX\Async Client\Package\AsyncClientConfigurationUtility.exe") EndFunc ;For Async Service Configuration-32Bit Func main28() ShellExecute("C:\%Program Files%\%Microsoft Dynamics AX%\60\CDX\Async Client\Package\AsyncClientConfigurationUtility.exe") EndFunc ;For AX-32 Bit Func main29() EndFunc ;For AX-64 Bit Func main30() EndFunc ;For Forticlient-64 Bit Installation Func main31() ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\VPN\FortiClientOnlineInstaller_6.0.0.exe") EndFunc ;For Forticlient-32 Bit installation Func main32() ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\VPN\FortiClientOnlineInstaller_6.0.0.exe") EndFunc ;For Administartor account enable-set Func main33() ShellExecute("F:\AX_Softwares\Other_Softwares\Printer-Spooler\Support_Files\Admin_Enable-Password") EndFunc ;For System Host name Change Func main34() $newName = InputBox("Rename PC", " Note:- Please Enter the SITE ID, *** If you Click on OK it will Restarts the system immediatley *** ") $WMI = ObjGet("winmgmts:" & "{impersonationLevel=impersonate}!\\" & "." & "\root\cimv2") $aItems = $WMI.ExecQuery ("Select Name from Win32_ComputerSystem") For $element In $aItems $action = $element.Rename($newName) If $action <> 0 Then MsgBox(0, "Error - " & $action, "Error renaming PC") Else Shutdown(6) EndIf Next EndFunc ;For PAD Installation Func main35() ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\Swiping\PAD\Win7\PADDaemonSetupWin7.msi") Sleep(100); WinActivate("PADDaemonWin7") WinWaitActive("PADDaemonWin7") Send("{ENTER}"); Sleep(100); Send("{ENTER}"); Sleep(100); Send("{ENTER}"); Sleep(500); WinWaitActive("PADDaemonWin7", "Installation Complete") Send("{ENTER}"); Sleep(100) EndFunc ;For Generic Printer-Installation Func main36() ShellExecute("F:\AX_Softwares\Other_Softwares\Printer-Spooler\Support_Files\ADD-Generic_Printer") EndFunc ;For ThinPrinter-32Bit Func main37() ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\Thin_Printer_RDP\ThinPrintRDPClient_x64") Sleep(300) WinWaitActive("ThinPrint Client Windows for RDP 10 - InstallShield Wizard") WinActivate("ThinPrint Client Windows for RDP 10 - InstallShield Wizard") Sleep(500) Send("{ENTER}") Sleep(500) WinWaitActive("ThinPrint Client Windows for RDP 10","The InstallShield(R) Wizard will install ThinPrint Client Windows for RDP 10 on your computer") WinActivate("ThinPrint Client Windows for RDP 10","The InstallShield(R) Wizard will install ThinPrint Client Windows for RDP 10 on your computer") Sleep(600) Send("!n") Sleep(300) Send("!a") Sleep(200) Send("{ENTER}") Sleep(300) Send("!i") Sleep(1500) WinWaitActive("ThinPrint Client Windows for RDP 10","The InstallShield Wizard has successfully installed ThinPrint Client Windows for RDP 10") WinActivate("ThinPrint Client Windows for RDP 10","The InstallShield Wizard has successfully installed ThinPrint Client Windows for RDP 10") Sleep(300) Send("{ENTER}") Sleep(300) EndFunc ;For VPN Config Import 64Bit Func main38() ShellExecute("F:\AX_Softwares\Other_Softwares\Printer-Spooler\Support_Files\Forti_Client-Config-Import-64 Bit") EndFunc ; For Windows Update Disable Func main39() ShellExecute("F:\AX_Softwares\Other_Softwares\Printer-Spooler\Support_Files\Windows_Update_Disable") EndFunc ;For Dailup-Connection Func main40() ShellExecute ("rasphone.exe") Sleep(200) WinWaitActive("Network Connections") WinActivate("Network Connections") Sleep(200) Send("{ENTER}") Sleep(200) WinWaitActive("Set up a new connection") WinActivate("Set up a new connection") Sleep(200) Send("{SPACE}") Sleep(200) Send("!a") Sleep(200) Send("{ENTER}") Sleep(200) WinWaitActive("Network Connections") WinActivate("Network Connections") Sleep(200) Send("{TAB}") Sleep(200) Send("{TAB}") Sleep(200) Send("{TAB}") Sleep(200) Send("{TAB}") Sleep(200) Send("{ENTER}") Sleep(200) ShellExecute("ncpa.cpl") Sleep(200) WinWaitActive("Network Connections") WinActivate("Network Connections") Sleep(200) EndFunc  Edited July 6, 2018 by Jos added CODEBOX <>
Developers Jos Posted July 6, 2018 Developers Posted July 6, 2018 Since you are doing WinWait() and Send() commands, the script will continue until it has done all steps. Are you sure those installers don't have a silent (/S) option that avoid having to do any interaction? Jos Earthshine 1 SciTE4AutoIt3 Full installer Download page  - Beta files    Read before posting   How to post scriptsource   Forum etiquette Forum Rules  Live for the present, Dream of the future, Learn from the past.Â
Moderators Melba23 Posted July 6, 2018 Moderators Posted July 6, 2018 Moved to the appropriate forum, as the Developer General Discussion forum very clearly states: Quote General development and scripting discussions. If it's super geeky and you don't know where to put it - it's probably here. Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums. Moderation Team  Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Â
Earthshine Posted July 6, 2018 Posted July 6, 2018 if they are msi installers, when you cancel, they roll back. you need to wait for one to finish fully before trying to start another, one at a time. My resources are limited. You must ask the right questions Â
Earthshine Posted July 6, 2018 Posted July 6, 2018 (edited) oh and @Jos gave you the answer. You are installing all msi installers, ALL support silent installation. Look up MSI silent install on google for more. that way, each install would be one line of code, maybe two Edited July 6, 2018 by Earthshine My resources are limited. You must ask the right questions Â
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