XPInstall API Reference:File Object:Methods:execute
From MDC
Contents |
[edit] execute
Queues the executing of a local file.
[edit] Method of
File object
[edit] Syntax
int execute ( FileSpecObject executableFile, [String aParameters] );
[edit] 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)
[edit] Returns
An integer error code. For a list of possible values, see Return Codes.
[edit] 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.
[edit] Example
f = getFolder("Program", "myTextEditor.exe");
err = File.execute(f, "myfile.txt");
// indicates that 'myfile.txt' will be
// opened in the editor