Loads an application. If a copy of the application is already running, it loads a new instance of the application.


ShellExecute "commandLine"[, windowStyle[, "directory" ["applicationName"]]]

Argument Description
commandLine Specifies the executable file to run and any command line arguments. You do not have to include the application's .exe extension. If commandLine does not specify a full file path, the application must be in the Dragon Program folder or in a directory that is searched when Windows starts a program. You cannot use long file names or include spaces in the executable path.
windowStyle Controls how the window appears when you activate the application. Must be one of the following:
  1, 5, or 9 default window size; active (default)
  2 minimized window; active
  3 maximized window; active
  4 or 8 default window size; not active
  6 or 7 minimized window; not active
directory Assigns a working directory for the application. The default is the directory that contains the executable file.
applicationName Lets you name the application. This name is used by the AppBringUp and AppSwapWith commands. The application name must be unique. ShellExecute reports an error if the name is already in use.


This instruction starts an instance of WordPad with its window maximized and sets the working directory to C:\DOCS. This instance of WordPad has the name "letter", and you can now use the AppBringUp and AppSwapWith scripting commands with the argument "letter" to activate the window while it is open.

ShellExecute "WordPad", 3, "c:\docs", "letter"