Jump to content
sumanth1980

Installation of parallel programs using (Koda( Form Designer)) auto it not working !!!! - (Moved)

Recommended Posts

sumanth1980

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

Share this post


Link to post
Share on other sites
sumanth1980
Posted (edited)
#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 by Jos
added CODEBOX <>

Share this post


Link to post
Share on other sites
Jos

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

  • Like 1

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Melba23

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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Earthshine

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

 

Share this post


Link to post
Share on other sites
Earthshine
Posted (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 by Earthshine

My resources are limited. You must ask the right questions

 

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • nooneclose
      By nooneclose
      Hey. I'm working on a new project and was wondering if there is a better way to "update" my Column E array. 
      Here is my code: 
      Local $nI  = 0                                                            ;Creates a name index of 0: nI = Name index Local $nII = 1                                                            ;Creates a name index of 1 for second loop: nII = Name Index 2 For    $iN = 0 To $IndexRows Step 1                                       ;Checks the roster for any names that appear twice      For $iN2 = 0 To $IndexRows Step 1          if $d_Names[$nI] == $d_Names[$nII] And $d_Names[$nII] <> "" Then              Local $timeSheetName = _ArraySearch($e_Names, $d_Names[$nI], 0, 0, 0, 0, 1)              ;MsgBox($MB_SYSTEMMODAL, "Found it", $d_Names[$nI] & " In column E on Row " & $timeSheetName)              Local $eI  = $timeSheetName + 1              ;ConsoleWrite($timeSheetName & @CRLF)              ;ConsoleWrite($eI & @CRLF)              ;ConsoleWrite(@CRLF)              _Excel_RangeInsert($OpenWorkbook.ActiveSheet, "E" & $eI & ":F" & $eI, $xlShiftDown)                                                                          ;Inserts a empty cell in columns E and F.              _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $d_Names[$nII], "E" & $eI)                                                                         ;Fills the empty cell in columns E with the doubled name              $aArray_Index = 2                                           ;Array element counter              For $Index = 2 To $IndexRows Step 1                        ;Loops through every row in the Excel file unto no rows are found or a null row is found                  $Array_Value_E = _Excel_RangeRead($OpenWorkbook, Default, "E"&$Index)                  $e_names[$aArray_Index] = $Array_Value_E                ;While the code loops every value in column E is stored in the E array (updating the array)                  $aArray_Index += 1              Next              ExitLoop          EndIf      Next      $nI  += 1      $nII += 1 Next Basically, It checks a roster for people whose name appears twice then inserts a new "row" for that person because they work in two different departments.
      I have to find that name however in Column E if two appear in column D. My code works but I think it is not as efficient as it could be. 
      Any ideas on how to improve the "update" for my array?
      (once it finds the double names in Column D it then searches for that name by going name by name in the Column E array and once it finds it inserts a new row. However, the E array doesn't have that new row stored in it so I have to "update" the array to properly find the next name)
      Any and all tips would be greatly appreciated. 
       
      NOTE: Just assume I'm opening the excel file properly please do not add that code in, it only complicates your answer. 
    • Miliardsto
      By Miliardsto
      Hello Im wondering if using this https://ohtejera.github.io/ImperiusAutoIt/#started
      UDF can i make that I can control my windows application with phone?
      like for example click button Start on android phone and then something would be done in my windows app?
    • nooneclose
      By nooneclose
      How do I properly convert this to Autoit? This is a VBA macro that I recorded in Excel.
       ActiveSheet.Outline.ShowLevels RowLevels:=2 I need this to close my subtotal once it is finished. 
      any help will be greatly appreciated. 
    • iMacg3
      By iMacg3
      Hi,
      I was looking into a way to delete a registry key (not a specific value, an entire key) if it is present. I was considering using RegRead and RegDelete. However, RegRead appears to only read values, not just keys. Is there a way to delete an entire registry key if it is present? I have heard that the below function may help.
       
      #include-once ; #UDF# ======================================================================================================================= ; Title .........: Reads\Search the name of a Key\Subkey\Value ; AutoIt Version : 3.3.8.1 ; Language ......: English ; Description ...: Lists all Keys\Subkeys\Values in a specified registry key ; Author(s) .....: DXRW4E ; Notes .........: ; =============================================================================================================================== ; #CURRENT# ===================================================================================================================== ;~ _RegEnumKeyEx ;~ _RegEnumValEx ; =============================================================================================================================== #Region ;**** Global constants and vars **** Global Const $sValueTypes[12] = ["REG_NONE","REG_SZ","REG_EXPAND_SZ","REG_BINARY","REG_DWORD","REG_DWORD_BIG_ENDIAN","REG_LINK","REG_MULTI_SZ","REG_RESOURCE_LIST","REG_FULL_RESOURCE_DESCRIPTOR","REG_RESOURCE_REQUIREMENTS_LIST","REG_QWORD"] #EndRegion ;**** Global constants and vars **** ; #FUNCTION# ======================================================================================================================== ; Name...........: _RegEnumKeyEx ; Description ...: Lists all subkeys in a specified registry key ; Syntax.........: _RegEnumKeyEx($KeyName[, $iFlag = 0[, $sFilter = "*"]]) ; Parameters ....: $KeyName - The registry key to read. ; $iFlag - Optional specifies Recursion (add the flags together for multiple operations): ; |$iFlag = 0 (Default) All Key-SubKeys Recursive Mod ; |$iFlag = 1 All SubKeys Not Recursive Mod ; |$iFlag = 2 Include in ArrayList in the first element $KeyName ; |$iFlag = 16 $sFilter do Case-Sensitive matching (By Default $sFilter do Case-Insensitive matching) ; |$iFlag = 32 Disable the return the count in the first element - effectively makes the array 0-based (must use UBound() to get the size in this case). ; By Default the first element ($array[0]) contains the number of strings returned, the remaining elements ($array[1], $array[2], etc.) ; |$iFlag = 64 $sFilter is REGEXP Mod, See Pattern Parameters in StringRegExp ; |$iFlag = 128 Enum value's name (_RegEnumKeyEx Return a 2D array, maximum Array Size limit is 3999744 Key\Value) ; |$iFlag = 256 Reads a value data, this flag will be ignored if the $iFlag = 128 is not set ; $sFilter - Optional the filter to use, default is *. (Multiple filter groups such as "All "*.XXx|*.YYY|*.ZZZ") ; Search the Autoit3 helpfile for the word "WildCards" For details. ; $vFilter - Optional the filter to use for ValueName, $vFilter will be ignored if the $iFlag = 128 is not set ; default is *. (Multiple filter groups such as "All "*.XXx|*.YYY|*.ZZZ") Search the Autoit3 helpfile for the word "WildCards" For details. ; $iValueTypes - Optional, set Value Types to search (Default $iValueTypes = 0 Read All), $iValueTypes will be ignored if the $iFlag = 128 is not set ; (add the flags together for multiple operations): ; 1 = REG_SZ ; 2 = REG_EXPAND_SZ ; 3 = REG_BINARY ; 4 = REG_DWORD ; 5 = REG_DWORD_BIG_ENDIAN ; 6 = REG_LINK ; 7 = REG_MULTI_SZ ; 8 = REG_RESOURCE_LIST ; 9 = REG_FULL_RESOURCE_DESCRIPTOR ; 10 = REG_RESOURCE_REQUIREMENTS_LIST ; 11 = REG_QWORD ; Return values .: Success - Return Array List (See Remarks) ; Failure - @Error ; |1 = Invalid $sFilter ; |2 = No Key-SubKey(s) Found ; |3 = Invalid $vFilter ; |4 = No Value-Name(s) Found ; Author ........: DXRW4E ; Modified.......: ; Remarks .......: The array returned is one-dimensional and is made up as follows: ; $array[0] = Number of Key-SubKeys returned ; $array[1] = 1st Key\SubKeys ; $array[2] = 2nd Key\SubKeys ; $array[3] = 3rd Key\SubKeys ; $array[n] = nth Key\SubKeys ; ; If is set the $iFlag = 128 The array returned is 2D array and is made up as follows: ; $array[0][0] = Number of Key-SubKeys returned ; $array[1][0] = 1st Key\SubKeys ; $array[1][1] = 1st Value name ; $array[1][2] = 1st Value Type (REG_NONE or REG_SZ or REG_EXPAND_SZ ect ect) ; $array[1][3] = 1st Value Data (If is set $iFlag = 256 Else Value Data = "") ; $array[2][0] = 2nd Key\SubKeys ; $array[2][1] = 2nd Value name ; $array[2][2] = 2nd Value Type (REG_NONE or REG_SZ or REG_EXPAND_SZ ect ect) ; $array[2][3] = 2nd Value Data (If is set $iFlag = 256 Else Value Data = "") ; $array[n][0] = nth Key\SubKeys ; Related .......: _RegEnumValEx() ; Link ..........: ; Example .......: _RegEnumKeyEx("HKEY_CURRENT_USER\Software\AutoIt v3") ; Note ..........: ; =================================================================================================================================== Func _RegEnumKeyEx($KeyName, $iFlag = 0, $sFilter = "*", $vFilter = "*", $iValueTypes = 0) If StringRegExp($sFilter, StringReplace("^\s*$|\v|\\|^\||\|\||\|$", Chr(BitAND($iFlag, 64) + 28) & "\|^\||\|\||\|$", "\\\\")) Then Return SetError(1, 0, "") Local $IndexSubKey[101] = [100], $SubKeyName, $BS = "\", $sKeyList, $I = 1, $sKeyFlag = BitAND($iFlag, 1), $sKeyFilter = StringReplace($sFilter, "*", "") If BitAND($iFlag, 2) Then $sKeyList = @LF & $KeyName If Not BitAND($iFlag, 64) Then $sFilter = StringRegExpReplace(BitAND($iFlag, 16) & "(?i)(", "16\(\?\i\)|\d+", "") & StringRegExpReplace(StringRegExpReplace(StringRegExpReplace(StringRegExpReplace($sFilter, "[^*?|]+", "\\Q$0\\E"), "\\E(?=\||$)", "$0\$"), "(?<=^|\|)\\Q", "^$0"), "\*+", ".*") & ")" While $I $IndexSubKey[$I] += 1 $SubKeyName = RegEnumKey($KeyName, $IndexSubKey[$I]) If @error Then $IndexSubKey[$I] = 0 $I -= 1 $KeyName = StringLeft($KeyName, StringInStr($KeyName, "\", 1, -1) - 1) ContinueLoop EndIf If $sKeyFilter Then If StringRegExp($SubKeyName, $sFilter) Then $sKeyList &= @LF & $KeyName & $BS & $SubKeyName Else $sKeyList &= @LF & $KeyName & $BS & $SubKeyName EndIf If $sKeyFlag Then ContinueLoop $I += 1 If $I > $IndexSubKey[0] Then $IndexSubKey[0] += 100 ReDim $IndexSubKey[$IndexSubKey[0] + 1] EndIf $KeyName &= $BS & $SubKeyName WEnd If Not $sKeyList Then Return SetError(2, 0, "") If BitAND($iFlag, 128) <> 128 Then Return StringSplit(StringTrimLeft($sKeyList, 1), @LF, StringReplace(BitAND($iFlag, 32), "32", 2)) $sKeyList = _RegEnumValEx(StringSplit(StringTrimLeft($sKeyList, 1), @LF), $iFlag, $vFilter, $iValueTypes) Return SetError(@Error, 0, $sKeyList) EndFunc ; #FUNCTION# ======================================================================================================================== ; Name...........: _RegEnumValEx ; Description ...: Lists all values in a specified registry key ; Syntax.........: _RegEnumValEx($KeyName[, $iFlag = 0[, $sFilter = "*"]]) ; Parameters ....: $KeyName - The registry key to read Or one-dimensional array RegKeyList ; use _RegEnumKeyEx() to get $RegKeyList (example $RegKeyList = [3, 1st Key\SubKeys, 2st Key\SubKeys, nth Key\SubKeys]) ; |$iFlag = 16 $sFilter do Case-Sensitive matching (By Default $sFilter do Case-Insensitive matching) ; |$iFlag = 32 Disable the return the count in the first element - effectively makes the array 0-based (must use UBound() to get the size in this case). ; By Default the first element ($array[0]) contains the number of strings returned, the remaining elements ($array[1], $array[2], etc.) ; |$iFlag = 64 $sFilter is REGEXP Mod, See Pattern Parameters in StringRegExp ; |$iFlag = 256 Reads a value data ; $sFilter - Optional the filter to use, default is *. (Multiple filter groups such as "All "*.XXx|*.YYY|*.ZZZ") ; Search the Autoit3 helpfile for the word "WildCards" For details. ; $iValueTypes - Optional, set Value Types to search (Default $iValueTypes = 0 Read All) ; (add the flags together for multiple operations): ; 1 = REG_SZ ; 2 = REG_EXPAND_SZ ; 3 = REG_BINARY ; 4 = REG_DWORD ; 5 = REG_DWORD_BIG_ENDIAN ; 6 = REG_LINK ; 7 = REG_MULTI_SZ ; 8 = REG_RESOURCE_LIST ; 9 = REG_FULL_RESOURCE_DESCRIPTOR ; 10 = REG_RESOURCE_REQUIREMENTS_LIST ; 11 = REG_QWORD ; Return values .: Success - Return Array List (See Remarks) ; Failure - @Error ; |3 = Invalid $sFilter ; |4 = No Value-Name(s) Found ; Author ........: DXRW4E ; Modified.......: ; Remarks .......: The array returned is 2D array and is made up as follows: ; $array[0][0] = Number of Key-SubKeys returned ; $array[1][0] = 1st Key\SubKeys ; $array[1][1] = 1st Value name ; $array[1][2] = 1st Value Type (REG_NONE or REG_SZ or REG_EXPAND_SZ ect ect) ; $array[1][3] = 1st Value Data (If is set $iFlag = 256 Else Value Data = "") ; $array[2][0] = 2nd Key\SubKeys ; $array[2][1] = 2nd Value name ; $array[2][2] = 2nd Value Type (REG_NONE or REG_SZ or REG_EXPAND_SZ ect ect) ; $array[2][3] = 2nd Value Data (If is set $iFlag = 256 Else Value Data = "") ; $array[n][0] = nth Key\SubKeys ; Related .......: _RegEnumKeyEx() ; Link ..........: ; Example .......: _RegEnumValEx("HKEY_CURRENT_USER\Software\AutoIt v3") ; Note ..........: ; =================================================================================================================================== Func _RegEnumValEx($aKeyList, $iFlag = 0, $sFilter = "*", $iValueTypes = 0) If StringRegExp($sFilter, "\v") Then Return SetError(3, 0, "") If Not IsArray($aKeyList) Then $aKeyList = StringSplit($aKeyList, @LF) Local $aKeyValList[1954][4], $iKeyVal = Int(BitAND($iFlag, 32) = 0), $sKeyVal = 1953, $sRegEnumVal, $iRegEnumVal, $RegRead = BitAND($iFlag, 256), $vFilter = StringReplace($sFilter, "*", "") If Not BitAND($iFlag, 64) Then $sFilter = StringRegExpReplace(BitAND($iFlag, 16) & "(?i)(", "16\(\?\i\)|\d+", "") & StringRegExpReplace(StringRegExpReplace(StringRegExpReplace(StringRegExpReplace($sFilter, "[^*?|]+", "\\Q$0\\E"), "\\E(?=\||$)", "$0\$"), "(?<=^|\|)\\Q", "^$0"), "\*+", ".*") & ")" For $i = 1 To $aKeyList[0] $iRegEnumVal = 0 While 1 If $iKeyVal = $sKeyVal Then If $sKeyVal = 3999744 Then ExitLoop $sKeyVal *= 2 ReDim $aKeyValList[$sKeyVal + 1][4] EndIf $aKeyValList[$iKeyVal][0] = $aKeyList[$i] $iRegEnumVal += 1 $sRegEnumVal = RegEnumVal($aKeyList[$i], $iRegEnumVal) If @Error <> 0 Then If $iRegEnumVal = 1 And $vFilter = "" Then $iKeyVal += 1 ExitLoop EndIf $aKeyValList[$iKeyVal][2] = $sValueTypes[@Extended] If BitAND(@Extended, $iValueTypes) <> $iValueTypes Then ContinueLoop If $vFilter And Not StringRegExp($sRegEnumVal, $sFilter) Then ContinueLoop $aKeyValList[$iKeyVal][1] = $sRegEnumVal If $RegRead Then $aKeyValList[$iKeyVal][3] = RegRead($aKeyList[$i], $sRegEnumVal) $iKeyVal += 1 WEnd Next $sRegEnumVal = $iKeyVal - Int(BitAND($iFlag, 32) = 0) If Not $sRegEnumVal Or ($sRegEnumVal = 1 And $vFilter = "" And $aKeyValList[$iKeyVal - $sRegEnumVal][2] = "") Then Return SetError(4, 0, "") ReDim $aKeyValList[$iKeyVal][4] If Not BitAND($iFlag, 32) Then $aKeyValList[0][0] = $iKeyVal - 1 Return $aKeyValList EndFunc Thanks.
       
    • great77
      By great77
      ; put the root in a variable $sRoot = "C:\Project\PHexample\" Global $sCurrentTime = _NowCalc() ; We can use that variable here Global $aList = _FileListToArray($sRoot, Default, 2) If @error Then Exit ;;;;;;MsgBox(0, "Error", "_FileListToArray returned @error = " & @error) ;;;;;;;;;;;This is a loop that runs from 1 to the number of items listed in the first element of the returned  array For $i = 1 To UBound($aList) - 1     MsgBox(0, "Folder date", $sRoot & "" & $aList[$i] & @CRLF & @CRLF & FileGetTime($sRoot & "" & $aList[$i], 1, 1))     MsgBox(0, "Folder date", FileGetTime($sRoot & "" & $aList[$i], 1, 1))      $a_filenew = StringReplace(StringReplace(StringReplace(_NowCalc(), "/", ""), ":", ""), " ", "")       MsgBox(0, "Folder date", $a_filenew) $adex =  _DateDiff('D', FileGetTime($sRoot & "" & $aList[$i], 1, 1), $a_filenew)  MsgBox(0,"ade", $adex) Next I have a code as seen above, but the difference in time is returning zero. I understand that the date yyyymmddhhmmss but how can I find the difference.
      The purpose is to try find the difference in days. Any suggestion?  
×