<div dir="ltr"><div><span style="font:13px/16.9px Arial,"Helvetica Neue",Helvetica,sans-serif;margin:0px;padding:0px;border:0px currentColor;text-align:left;color:rgb(36,39,41);text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;font-size-adjust:none;font-stretch:normal;background-color:rgb(255,255,255)">Hi Karl,</span></div><div><span style="font:13px/16.9px Arial,"Helvetica Neue",Helvetica,sans-serif;margin:0px;padding:0px;border:0px currentColor;text-align:left;color:rgb(36,39,41);text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;font-size-adjust:none;font-stretch:normal;background-color:rgb(255,255,255)"> Your idea of a couple lines of shell script is great. However, my manager wants me to write a C++ program to start the C# executable, Audio_Recorder.exe, as a service and also create and write a log file in an user-specified location. How might I do that? I tried char *argv[] = {"/bin/sh", "mono-service.exe", "Audio_Recorder.exe", "--debug", ">&", "log.txt",0) followed by execve(argv[0], &argv[0], envp) with no success.</span><span style="font:13px/16.9px Arial,"Helvetica Neue",Helvetica,sans-serif;text-align:left;color:rgb(36,39,41);text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;float:none;display:inline!important;white-space:normal;font-size-adjust:none;font-stretch:normal;background-color:rgb(255,255,255)"><span> </span></span></div><div><span style="font:13px/16.9px Arial,"Helvetica Neue",Helvetica,sans-serif;text-align:left;color:rgb(36,39,41);text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;float:none;display:inline!important;white-space:normal;font-size-adjust:none;font-stretch:normal;background-color:rgb(255,255,255)"><span> Quoting your previous email "I'm not sure, but to use the ">" syntax I think you may have to exec a
shell, and pass the rest as a command pipe for the shell to execute." How might I do that?</span></span></div><div><span style="font:13px/16.9px Arial,"Helvetica Neue",Helvetica,sans-serif;text-align:left;color:rgb(36,39,41);text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;float:none;display:inline!important;white-space:normal;font-size-adjust:none;font-stretch:normal;background-color:rgb(255,255,255)"><span> Thank you again.</span></span></div><div><span style="font:13px/16.9px Arial,"Helvetica Neue",Helvetica,sans-serif;text-align:left;color:rgb(36,39,41);text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;float:none;display:inline!important;white-space:normal;font-size-adjust:none;font-stretch:normal;background-color:rgb(255,255,255)"><span> Frank</span></span></div></div>