23176
Drag&Drop Robot / Re: Suggestion: Use Comspec
« Last post by mouser on June 06, 2008, 06:11 PM »Just to reiterate in case there is still some confusion. it's not a matter of me using %COMSPEC% in place of cmd. because i never use "cmd". The OS chooses to use cmd and the OS invokes it when i call CreateProcess.
So the solution cannot be to use %comspec% in pace of cmd in my code. The solution could be to modify the commandline given to CreateProcess and to manually override the OS choice of command processor by explicitly passing something like CreateProcess("%COMSPEC% NORMAL_COMMANDLINE_HERE") instead of the normal CreateProcess("NORMAL_COMMANDLINE_HERE"). If that works without issue then it's a reasonable solution. I just have to see if that works ok and doesn't break io redirection piping.
So the solution cannot be to use %comspec% in pace of cmd in my code. The solution could be to modify the commandline given to CreateProcess and to manually override the OS choice of command processor by explicitly passing something like CreateProcess("%COMSPEC% NORMAL_COMMANDLINE_HERE") instead of the normal CreateProcess("NORMAL_COMMANDLINE_HERE"). If that works without issue then it's a reasonable solution. I just have to see if that works ok and doesn't break io redirection piping.

Recent Posts
keep it up!!