OverviewExamples
number Shell.Execute ( |
Performs a shell execute on a target with a given shell verb.
(string) The file or folder path to use.
(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. |
|
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.
(string) The command line arguments to pass to the file.
(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.
(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. |
SW_HIDE |
0 |
The file will launch hidden. |
(boolean) Whether the application will wait until the executable has exited before continuing:
VALUE |
DESCRIPTION |
true |
Wait. |
false |
Don't wait. (Default) |
(number) The process return code if the WaitForReturn parameter is set to true. If WaitForReturn is set to false 0 is returned. You can use Application.GetLastError to determine whether this action failed, and why.
Note: If the specified
process has not terminated, the termination status returned is STILL_ACTIVE.
If the process has terminated, the termination status returned may be
one of the following:
The exit value specified in the ExitProcess or TerminateProcess function.
The return value from the main or WinMain function of the process.
The exception value for an unhandled exception that caused the process
to terminate.
See also: Related Actions