EXECUTE command

Used to execute an application or process external to ACL. Emulates the Windows Run command. Can be used to interact with the Windows command prompt.


Because the EXECUTE command gives you the ability to interact with the operating system and applications external to ACL, technical issues may arise that are beyond the scope of ACL's native functionality. ACL Support Services can assist with operation of the EXECUTE command inside ACL, but issues that arise with processes and applications external to ACL are not covered under Support Services.


EXECUTE Windows_Run_command_syntax <ASYNC>



Specifies the name of the application to execute, the folder or file to open, or the command to run, and any required arguments or command switches. The parameter requires valid Windows Run command syntax enclosed by quotation marks.


Optional. Specifies asynchronous mode. In asynchronous mode, the process started by the EXECUTE command runs at the same time as ACL and at the same time as any subsequent ACLScript commands. If you use EXECUTE from the ACL command line, you must specify ASYNC.

If you do not specify ASYNC, the default synchronous mode is used in which any process started by the EXECUTE command must complete before the next line in an ACL script executes, or the next process begins, and ACL is inaccessible while external processes are running.

ACL output variables


Stores the application return code that results from using the command to run a process external to ACL. The RETURN_CODE variable is created when the command is used synchronously, but not when the command is used asynchronously.


The EXECUTE command allows you to run Windows and DOS commands from the ACL command line or from an ACL script. You can use this ability to increase the automation of ACL scripts by performing a variety of useful tasks that are not possible using ACLScript syntax alone:

Specific details of how to perform any of these tasks are beyond the scope of the ACL Language Reference. For assistance, consult appropriate Windows operating system documentation, or other third-party documentation.

Additional details:




Open an application


EXECUTE "AcroRd32.exe"

Close an application

EXECUTE "TASKKILL /f /im Excel.exe"


Use the ‘/f’ switch with caution. It forces an application to close without presenting any dialog boxes, such as those for saving changes.

Open a file

EXECUTE '"C:\ACL Projects\Source Data\AP_Trans.xlsx"'

Create a new folder

EXECUTE 'cmd /c MD "C:\ACL Projects\Source Data"'

Run external scripts or non-ACL batch files (.bat)

EXECUTE '"C:\ACL Projects\Batch Files\My_Batch.bat"'

Pass parameters to a non-ACL batch file

EXECUTE '"C:\ACL Projects\Batch Files\My_Batch.bat" param1 %v_param2%'

Parameters can be literals or ACL variables.

Run ACL scripts in other ACL projects

EXECUTE 'aclwin.exe "C:\ACL Projects\AP Trans Tests.acl" /b AP_Trans_script'


Running an ACL script in another project launches a second instance of ACL. The script in the second project should end with the QUIT command so that the second instance of ACL closes and control is returned to the initial instance of ACL.

Incorporate a waiting period in an ACL script



EXECUTE "cmd /c PING -n 31 > nul"

Both examples create a waiting period of 30 seconds.

(C) 2013 ACL Services Ltd. All Rights Reserved. | Send feedback