1) each individual test can decide upon its input stream (<NUL, <CON, echo "xyz" | ...); so there's no absolute need to bind cmd's std input to NUL 2) if cmd's input has to be changed, IMO it should be bound to console's input (as some builtin commands use stdin, other reopen the console; so that's a saner default). Didn't test it, but passing GetStdHandle(STD_INPUT_HANDLE) in CreateProcess instead could help.