Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

  • 2 weeks later...
Posted

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.

Posted

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.

  • 1 year later...
Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...