|
-
Aug 14th, 2007, 11:46 AM
#1
Thread Starter
Fanatic Member
Retrieving IPCONFIG into ListBox
I trying to retrieve IPCONFIG data into a ListBox using vb.net. The only code I have found that will do that is as per below. However, the code does not work. Is there a good way to do this?
Dim i As Integer
Dim Shell = CreateObject("Wscript.Shell")
Shell.run("cmd /c ipconfig /all >> C:\ipconfig.txt")
Dim sr As New IO.StreamReader("C:\ipconfig.txt")
Dim s As String = sr.ReadToEnd
For i = 0 To sr.ReadToEnd.LastIndexOf(i)
ListBox1.Items.Add(s(i).ToString)
Next
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|