nsExec
------
nsExec will execute command-line based programs and capture the output
without opening a dos box.


Usage
-----
nsExec::Exec [/TIMEOUT=x] path

-or-

nsExec::ExecToLog [/TIMEOUT=x] [/ABORT=xpos,ypos] path

-or-

nsExec::ExecToStack [/TIMEOUT=x] path

All functions are the same except ExecToLog will print the output
to the logwindow and ExecToStack will push up to ${NSIS_MAX_STRLEN}
characters of output onto the stack after the return value.

The timeout value is optional.  The timeout is the time in
milliseconds nsExec will wait for output.  If output from the
process is received, the timeout value is reset and it will
again wait for more output using the timeout value.  See Return 
Value for how to check if there was a timeout.

To ensure that command are executed without problems on all windows versions,
is recommended to use the following syntax:

   nsExec::ExecToStack [OPTIONS] '"PATH" param1 param2 paramN'

This way the application path may contain non 8.3 paths (with spaces)

The abort value is optional and is only available when using ExecToLog currently.  The values xpos and ypos set where the top left corner of the button will be placed with the button auto-sizing to the 'Abort' text. The button will only be displayed while the process being run is working and there is no output available to display.


Return Value
------------
If nsExec is unable to execute the process, it will return "error"
on the top of the stack, if the process timed out it will return
"timeout", if the process was aborted it will return
"abort", else it will return the return code from the
executed process.


Copyright Info
--------------
Copyright (c) 2002 Robert Rainwater
Thanks to Justin Frankel and Amir Szekely
Modifications by Darren Owen (2003)