command is a char array that has the full path of the binary you wish to run

this is *nix code though and you keep talking about cmd.exe so does this mean yout trying to create a program on windoze?