I've made several changes to your WinExe module and figured I would share them with you to see if you wanted to merge them in. Basically, these are the changes:
If available, use the version of winexe in the systems path
Make the object an event emitter and emit stderr and stdout events for each line of child process output
When using PaExec, don't split on spaces inside quotes
Added an option to use the elevate bit (only for PaExec)
Added an option to use the system account
Make the options hash passed into the constructor an object field (an empty hash was being created in the constructor before)
Feel free to ask me any questions or make any requests in the pull request comments.
I've made several changes to your WinExe module and figured I would share them with you to see if you wanted to merge them in. Basically, these are the changes:
winexe
in the systems pathstderr
andstdout
events for each line of child process outputFeel free to ask me any questions or make any requests in the pull request comments.