## page was renamed from DevCenter/Documentation/ExtensionObjects/Exec = Exec = Purpose: Allow XSL stylesheets to execute external programs and process results. Namespace: {{{urn:WebWorks-XSLT-Extension-Execute}}} Prefix: {{{wwexec}}} Returns: <>Exec XML Document Namespace: {{{urn:WebWorks-XSLT-Extension-Execute}}} Prefix: {{{wwexec}}} Format: Provides the return code, stdout, and stderr results from the running process. {{{ Standard output will show up here, aka stdout. Standard error will show up here, aka stderr. }}} Methods: Execute(string commandLine): Runs the command line using the current target's output directory as the working directory. <
> Returns: [[#exec_xml_document|Exec XML Document]] Example: Execute {{{prettycool.exe --stdout "Isn't this grand?" --stderr nothing}}}. {{{ }}} !ExecuteInDirectory(string directoryPath, string commandLine): Runs the command line in the specified working directory. <
> Returns: [[#exec_xml_document|Exec XML Document]] Example: Execute {{{prettycool.exe --stdout "Isn't this grand?" --stderr nothing}}} in the directory {{{C:\workingdir}}}. {{{ }}} !ExecuteProgramWithArguments(string program, string arguments): Runs the specified program with arguments formatted as a string using the current target's output directory as the working directory. <
> Returns: [[#exec_xml_document|Exec XML Document]] Example: Execute {{{prettycool.exe --stdout "Isn't this grand?" --stderr nothing}}}. {{{ }}} !ExecuteProgramWithArgumentsInDirectory(string directoryPath, string program, string arguments): Runs the specified program with arguments formatted as a string in the specified working directory. <
> Returns: [[#exec_xml_document|Exec XML Document]] Example: Execute {{{prettycool.exe --stdout "Isn't this grand?" --stderr nothing}}} in the directory {{{C:\workingdir}}}. {{{ }}} !ExecuteCommand(string command, ''string argument1'', ''string argument2'', ''string argument3'', ''string argument4'', ''string argument5'', ''string argument6'', ''string argument7'', ''string argument8'', ''string argument9'', ''string argument10'', ''string argument11'', ''string argument12'', ''string argument13'', ''string argument14'', ''string argument15'', ''string argument16'', ''string argument17'', ''string argument18'', ''string argument19'', ''string argument20''): Runs the specified program with zero or more arguments using the current target's output directory as the working directory. <
> Returns: [[#exec_xml_document|Exec XML Document]] Example: Execute {{{prettycool.exe --stdout "Isn't this grand?" --stderr nothing}}}. {{{ }}} !ExecuteCommandInDirectory(string directoryPath, string command, ''string argument1'', ''string argument2'', ''string argument3'', ''string argument4'', ''string argument5'', ''string argument6'', ''string argument7'', ''string argument8'', ''string argument9'', ''string argument10'', ''string argument11'', ''string argument12'', ''string argument13'', ''string argument14'', ''string argument15'', ''string argument16'', ''string argument17'', ''string argument18'', ''string argument19'', ''string argument20''): Runs the specified program with zero or more arguments in the specified working directory. <
> Returns: [[#exec_xml_document|Exec XML Document]] Example: Execute {{{prettycool.exe --stdout "Isn't this grand?" --stderr nothing}}} in the directory {{{C:\workingdir}}}. {{{ }}}