startapp

(startapp application [filename])

The startapp function executes another Windows® application.

 Note: startapp is not functional on other OS platforms than Windows®.

Arguments

application specifies the application to start. The argument must be a string. If application contains no valid path specification, the function browses the environment variable PATH for the application.

The optional string argument filename specifies a file to be opened.

Return Value

If successful, the function returns an integer value greater than 0. Otherwise, the function returns 0.

Examples

The following example starts Notepad and opens the file sample.txt.

(startapp "notepad" "sample.txt")

The following example starts Windows® Explorer.

(startapp "explorer")

Related Functions

findfile, getenv