srivalli Posted November 6, 2003 Posted November 6, 2003 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 i'm 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 Quote
Administrators PlausiblyDamp Posted November 6, 2003 Administrators Posted November 6, 2003 try pi.FileName = "Net" pi.Arguments = "view" instead of pi.verb = "Net Send" Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts