execute

execute

Queues the executing of a local file.

Method of

File object

Syntax

int execute ( FileSpecObject executableFile, [String aParameters] );

Parameters

The execute method has the following parameters:

executableFile
A FileSpecObject representing the local file already on disk to be executed. Note that file names are case sensitive.
aParameters
An optional parameter string that is passed to the executable. (Ignored on Mac OS)

Returns

An integer error code. For a list of possible values, see Return Codes.

Description

The specified file is not actually executed until the performInstall method is called. See performInstall for more information about queued commands during the installation process.

Example

f = getFolder("Program", "myTextEditor.exe");
err = File.execute(f, "myfile.txt");
// indicates that 'myfile.txt' will be
// opened in the editor

Document Tags and Contributors

 Last updated by: Sheppy,