otherside Posted November 21, 2003 Posted November 21, 2003 Hey guys, is there any other way to run a dos command than system.diagnostics.process.start("filename") for example i need to run a nslookup command and pass arguments to it like writting on CMD: nslookup blabla.com >> file.txt in the case of system.diagnostics.process.start("C:\windows\system32\nslookup.exe blabla.com >> file.txt") doesn't work ... any ideas ... or any ideas instead using nslookup to see if a domain exists and return the result to the application ? thanks Quote
Leaders Squirm Posted November 22, 2003 Leaders Posted November 22, 2003 Why not just use the methods which are provided in the framework? Namely, the Dns class which is part of the System.Net namespace. Quote Search the forums | Still IRCing | Be nice
datz Posted December 1, 2003 Posted December 1, 2003 Unfortunatly the DNS class has no methods for registering/binding an ip with a DNS server. If anyone has an idea on how to use nsupdate which also needs a file or multiple arguments as params it would be appreciated. Quote
otherside Posted December 1, 2003 Author Posted December 1, 2003 The DNS class has some simple methods and works for what i wanted to do. But a solution that i thought about the previous problem is an intermediate .bat or .cmd file get your parameters and create the complete string you would type to the command promt, save it to a .bat or .cmd file and then use the system.diagnostics.process.start to run this file that way the complete command is executed. Quote
datz Posted December 1, 2003 Posted December 1, 2003 hehe, actually a .bat file is my current solution. Just wanted to neat things up a bit. Thanks anyway. Quote
manishkaushik Posted August 20, 2005 Posted August 20, 2005 Hi Friends How can i send 2 parameter for calling an exe file from System.diagnostic.process.start() function in Vb.net Forms on win 2000 Operating System I tried the following way 1. System.Diagnostics.Process.Start("C:\Denet\myexe", strEnteredName glborgCode) Error : Comma,')', or a valid expression continuation expected. 2. System.Diagnostics.Process.Start("C:\Denet\myexe", strEnteredName, glborgCode) Error : Overload resolution failed because no accissible 'Start' accepts this number of arguments. Please guide me Thanks & Regards Manish Kaushik Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.