Windows: Send command input indirectly

Application can hang if the stdin is sent immediately.