H
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? this is needed so sccm will report success. I tried exit and exit (0).
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$pidThenProcessClose($pid)If$CmdLine[0]=1AndStringIsDigit($CmdLine[1])ThenSleep($CmdLine[1]*1000)If$CmdLine[0]=1And$CmdLine[1]="/?"Then MsgBox(32,@ScriptName,"Usage: """&@ScriptName&""" [start-in-#-of-seconds]"&_ @CRLF&@CRLF&"Example: """&@ScriptName&""" 30"_ ) ExitEndIf$setupLogFile="C:\setupSA2013.log"FileWriteLine($setupLogFile,"INFO: Currently in: "&@WorkingDir)$setupFile=@ScriptDir&"\setup\setup.exe"IfNotFileExists($setupFile)Then $setupFileErrMsg="ERROR: "&$setupFile&" not found." FileWriteLine($setupLogFile,$setupFileErrMsg) MsgBox(32,@ScriptName,$setupFileErrMsg&@CRLF&@CRLF&"(log file in C:\)") ExitEndIfRun($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 NowWinWaitActive("Sage 50 - Product Activation","Company Name")Send("XX{TAB 3}") ; Registered company nameSend("XXXXXX-XXXXX-XXXXX{TAB}{DOWN}") ; Account I.D.Send("XXXXXXXXXXXXXXXXXXXXXX{ENTER}") ; Registration CodeWinWaitActive("Sage 50 - Product Activation","Activation Successful")Send("{ENTER}")