I know of the Shell method to run files, but how can I execute normal command prompt commands like nslookup, and capture the output as a string?
Thanks for the help! Every google search has just turned up the shell method >_>
I know of the Shell method to run files, but how can I execute normal command prompt commands like nslookup, and capture the output as a string?
Thanks for the help! Every google search has just turned up the shell method >_>
There are many examples here on SO to System.Diagnostics.Process, which is what you'd need.
Since nslookup is and exe in windows - yes. If it was a built in command like say echo, then you'd use the cmd.exe as the program and using the arguments /c "echo hello program"
Edit: Here is another exmaple
To create a bat file, just open a text editor and add the command you want and save with a .bat extension.