Forum Discussion
Hi Anupa,
I recommend that you use Alex's suggestion since using the object is exactly the same thing as feeding keyboard input to cmd.exe, and in addition to that, this approach is faster and more reliable, actually. Also, you can try working with input and output streams of cmd.exe directly as it is shown in the Testing Console Applications help topic. Note that the script waits until the previous command is processed before sending the next command, and your script does not do this.
If none of the "best practices" approaches meets your needs and you still need to check how keystrokes are processed by the cmd.exe application, please let us know why using the least reliable approach is a requirement for you and let us know what operating system you are using - we will try to reproduce the behavior on our side.
Related Content
- 7 months agosohailalam2696
Recent Discussions
- 5 hours agoMW_Didata
- 16 hours agod_gfleetwood92