To PING address use this code:
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
Dim textvar As String = TextBox1.Text
Shell("CMD.EXE /K PING " & textvar)
i like the project but i have some problem the problem is when i come to execute the command it tell me that con't fend CMD. please help
Thanks very much. I had a problem with the encoding but solved it like this:With psi
.UseShellExecute = False
.RedirectStandardError = True
.RedirectStandardOutput = True
.RedirectStandardInput = True
.CreateNoWindow = True
.StandardOutputEncoding = Encoding.GetEncoding(Globalization.CultureInfo.CurrentUICulture.TextInfo.OEMCodePage)
.StandardErrorEncoding = Encoding.GetEncoding(Globalization.CultureInfo.CurrentUICulture.TextInfo.OEMCodePage)
How about using 3 space? like net stop spooler?
Translated with Google translatorHi, it works very well but if I want to connect to Telnet i skip error (telnet 192.168.1.1)
Cms. Start ()
As I can do that by pressing 1 button connect to cmd/telnet/192.168.1.1?????
not working. only ping works. dir ,cd not working at all.
tried typing in "dir" but got error message. Why "ping" works but "dir" does not?
Im getting a error? Can you help me
Hi LearnToTeach ,
i'm trying to Tracetcp but i got " WIN32 EXCEPTION WAS UNHANDLE"CMD.START
HOW DO I USE TRACETCP HERE?
wmic /node:USERNAME computersystem get username – I tried to run this and the system reports me "A first chance exception of type 'System.InvalidOperationException' occurred in System.dll" and the textbox keep empty, do you know whats happening?
Nice video, How would i constantly output every second so if i do "ping 192.168.0.1 -t -l 5000" it will constantly output into the textbox
Good Job, I have a small question your Code i can only add a single space command like ping google.com can you tell me how to add two space command like ping google.com -t and how also how to add a predefined prefix text like the ping is a predefined command if type google.com i should get the result ……Thanks in advance
getting error with systemencoding
First of all: Great code! It was exactly what I was looking for to help with a problem.
Next: In searching youTube I also found another video that was exactly what I was looking for. So exact, in fact, it WAS this video!
Seems a few months back a user by the name of "IT Chipnet" posted this video. He doesn't say it's his, but then again he DOESN'T say it's not.
This code is awesome dude. Thanks for the share, it works like a charm. But I'm kinda missing some ordinary commands like "cls, ipconfig/release, ipconfig/renew, nbtstat -R, nbtstat -RR, netsh winsock reset, netsh advfirewall reset" I'm currently working with a little program that can execute some DOS commands if not all if possible, but it's focused on using some small ordinary commands that many times can fix internet issues. I don't really know why it gives me the errors, but well I'm only decent at vb u know 🙂
just what I need thank you!
Private psi As ProcessStartInfo Private cmd As Process Private Delegate Sub InvokeWithString(ByVal text As String) Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
bro can u tell me about these code means? what is psi?
i got error on cmd start. please help
Hi The code works perfectly. Thanks. But I have a question. I want to modify it to run commands from Volatility instead of command prompt. Is it possible?
help please gmail: [email protected]
I keep getting:
An unhandled exception of type 'System.ComponentModel.Win32Exception' occurred in System.dllAdditional information: The parameter is incorrect
Any idea what this could be? Loic may have already figured it out
Thanks! This is excellent! I have a question. Is possible to use a remote cmd? I'm testing with PsExec and trying something like this and I'm already lost.
doesnt work 🙁 program stop with error at line cmd.Start() with error code : Win32Exception 'System.ComponentModel.Win32Exception' occured in System.dll
this works brilliant, however, I want to use PSINFO -s for this but it throws an error "the system cannot find the file specified", however, psinfo works fine when running from command.thanks!
Hi! Thanks for this great example! I have a question. If i will for example run qwinsta command, than it is does not work. You know maybe why, or what is missing? Thx!
Your email address will not be published. Required fields are marked *
Save my name, email, and website in this browser for the next time I comment.