Shell.Execute

Shell.Execute ( 

string Filename,

string Verb = "open",

string Arguments = "",

string WorkingFolder = "",

number WindowMode = SW_SHOWNORMAL )

Description

Performs a shell execute on a target with a given shell verb.

Note: If you are looking to run an executable file, you may want to use the File.Run action instead. It contains features such as waiting for return.

Parameters

Filename

(string) The file or folder path to use.

Verb

(string) The verb to use in the shell command. Choose from:

VERB

DESCRIPTION

open

Opens the file. This is the same as if you double clicked on the file in Windows.

explore

Opens the file/folder in Windows Explorer.

edit

Opens the file for editing using the associated editor.

print

Uses the associated viewer to print the file.

Note: If you set this verb to an empty string (""):
- For systems prior to Windows 2000, the default verb is used if it is valid and available in the registry. If not, the "open" verb is used.
- For Windows 2000 and later systems, the default verb is used if available. If not, the "open" verb is used. If neither verb is available, the system uses the first verb listed in the registry.

Arguments

(string) The command line arguments to pass to the file.

WorkingFolder

(string) The working directory that will be used for the file.

Note: This sets the current directory for the operation to something other than the folder that the file is in. Normally, you can just leave it blank.

WindowMode

(number)  The window mode to use. Choose from:

CONSTANT

VALUE

DESCRIPTION

SW_SHOWNORMAL

1

The file will launch normally.

SW_MAXIMIZE

3

The file will launch maximized.

SW_MINIMIZE

6

The file will launch minimized.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.

See also:  Related Actions