vickerps 0 Posted July 21, 2004 Hi Guys I know about @IPadress1 But i also want Subnet and Gateway how can i get these Share this post Link to post Share on other sites
ezzetabi 3 Posted July 21, 2004 Parsing IPConfig /all result? Share this post Link to post Share on other sites
Davman 0 Posted July 22, 2004 This should do ya: ipconfig /all > c:\temp1.txt Will dump the result in C:\temp1.txt $filename = "C:\temp1.txt" $file = FileOpen($filename, 0) If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf While 1 $line = FileReadLine($file) If @error = -1 Then ;Do what you like... EndIf if StringInStr($line, "Subnet") <> 0 Then ;You've found the line with "Subnet" in it, so parse this as you like EndIf if StringInStr($line, "Gateway") <> 0 Then ;You've found the line with "Gateway" in it, so parse this as you like EndIf Wend Something like that anyway, this is untested, so dont quote me on it. Sitting comfortably behind the code. Share this post Link to post Share on other sites