Hi
I am hoping one of you can help me with a slight problem I am having. How do I make this script exit when complete, so there is no Autoit Icon in the system tray?
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.8.1
Author: CZ
Script Function:
Install the Sage 50 Accounting 2013-Canadian Edition software.
#ce ----------------------------------------------------------------------------
$pid = ProcessExists("TSProgressUI.exe")
If $pid Then ProcessClose($pid)
If $CmdLine[0] = 1 And StringIsDigit($CmdLine[1]) Then Sleep($CmdLine[1] * 1000)
If $CmdLine[0] = 1 And $CmdLine[1] = "/?" Then
MsgBox(32, @ScriptName, "Usage: """ & @ScriptName & """ [start-in-#-of-seconds]" & _
@CRLF & @CRLF & "Example: """ & @ScriptName & """ 30" _
)
Exit
EndIf
$setupLogFile = "C:\setupSA2013.log"
FileWriteLine($setupLogFile, "INFO: Currently in: " & @WorkingDir)
$setupFile = @ScriptDir & "\setup\setup.exe"
If Not FileExists($setupFile) Then
$setupFileErrMsg = "ERROR: " & $setupFile & " not found."
FileWriteLine($setupLogFile, $setupFileErrMsg)
MsgBox(32, @ScriptName, $setupFileErrMsg & @CRLF & @CRLF & "(log file in C:\)")
Exit
EndIf
Run($setupFile)
WinWaitActive("Sage 50 Accounting 2013 - InstallShield Wizard", "Select a language")
Send("{ENTER}")
WinWaitActive("Installing Sage 50 Accounting 2013 Release 2...", "Type of installation")
Send("{ENTER}")
WinWaitActive("Installing Sage 50 Accounting 2013 Release 2...", "serial number")
Send("252P1U28415294{ENTER}")
WinWaitActive("Installing Sage 50 Premium Accounting 2013 Release 2...", "End User License Agreement")
Send("{TAB 3}{SPACE}")
Send("!i")
WinWaitActive("Installing Sage 50 Premium Accounting 2013 Release 2...", "Installation successful")
Send("!f")
WinWaitActive("Sage 50 - Registration", "Product Registration")
Send("{SPACE}") ; Activate Now
WinWaitActive("Sage 50 - Product Activation", "Company Name")
Send("XX{TAB 3}") ; Registered company name
Send("XXXXXX-XXXXX-XXXXX{TAB}{DOWN}") ; Account I.D.
Send("XXXXXXXXXXXXXXXXXXXXXX{ENTER}") ; Registration Code
WinWaitActive("Sage 50 - Product Activation", "Activation Successful")
Send("{ENTER}")
Exit