Click here to Skip to main content
15,900,258 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have redirected command prompt to my VB 2010 application. I do not want the user to see what i have typed, but i want him to the output. Any ideas?
Posted

1 solution

Change the application.

If you are using Console.ReadLine or similar in your App then it echoes the characters to the "screen" as if they were typed, and there isn't a way to override that from the outside.
So, if it's your app, change it so talk directly, instead of using the keyboard input.
 
Share this answer
 
Comments
vbGoof 5-Aug-14 6:49am    
I don't enter the commands directly from the keyboard, they are from textboxes e.g [txtCommand.text = "powercfg /x standby-timeout-ac 1440"]. This gets displayed in the listbox together with the output. I have even tried to remove the last item before data is displayed with [ lisbox1.Items.RemoveAt(lisbox1.Items.Count - 1)]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900