home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 March / CMCD0304.ISO / Software / Freeware / Programare / nullsoft / nsis20.exe / Contrib / nsExec / nsExec.txt < prev    next >
Text File  |  2003-09-16  |  1KB  |  47 lines

  1. nsExec
  2. ------
  3. nsExec will execute command-line based programs and capture the output
  4. without opening a dos box.
  5.  
  6.  
  7. Usage
  8. -----
  9. nsExec::Exec [/TIMEOUT=x] path
  10.  
  11. -or-
  12.  
  13. nsExec::ExecToLog [/TIMEOUT=x] path
  14.  
  15. -or-
  16.  
  17. nsExec::ExecToStack [/TIMEOUT=x] path
  18.  
  19. All functions are the same except ExecToLog will print the output
  20. to the logwindow and ExecToStack will push up to ${NSIS_MAX_STRLEN}
  21. characters of output onto the stack after the return value.
  22.  
  23. The timeout value is optional.  The timeout is the time in
  24. milliseconds nsExec will wait for output.  If output from the
  25. process is received, the timeout value is reset and it will
  26. again wait for more output using the timeout value.  See Return 
  27. Value for how to check if there was a timeout.
  28.  
  29. To ensure that command are executed without problems on all windows versions,
  30. is recommended to use the following syntax:
  31.  
  32.    nsExec::ExecToStack [OPTIONS] '"PATH" param1 param2 paramN'
  33.  
  34. This way the application path may contain non 8.3 paths (with spaces)
  35.  
  36. Return Value
  37. ------------
  38. If nsExec is unable to execute the process, it will return "error"
  39. on the top of the stack, if the process timed out it will return
  40. "timeout", else it will return the return code from the
  41. executed process.
  42.  
  43.  
  44. Copyright Info
  45. --------------
  46. Copyright (c) 2002 Robert Rainwater
  47. Thanks to Justin Frankel and Amir Szekely