Urgent- Need Help with N/w Connectivity

srivalli

Member
Joined
Nov 5, 2003
Messages
5
Hi

Excuse me for the long mail !!!
i need to check if the machine is in a LAN or not thru VB .Net Code.

I have tried using Net View command, but im not able to run it successfully through the following code:
Dim pi As New ProcessStartInfo
pi.Verb = "net view"
pi.UseShellExecute = False
pi.RedirectStandardOutput = True

Dim p As New Process
p.StartInfo = pi
p.Start()
Dim s As String = p.StandardOutput.ReadToEnd

This gives the error, FileName Not Specified.

Also, is there a way to do it through any classes of DNS Namespace.

Please give me some pointers to this.
Thanks in Advance
 
Back
Top