set objShell = CreateObject( "WScript.Shell" )
set objScriptExec = objShell.Exec("ipconfig")
do while not objScriptExec.StdOut.AtEndOfStream
strLine = objScriptExec.StdOut.ReadLine
if (inStr(strLine, "IPv4")) then
intPos = inStr(strLine, ":") + 1
strIP = mid(strLine, intPos)
strIPs = strIPs & vbNewLine & strIP
end if
loop
msgbox strIPs
Aucun commentaire:
Enregistrer un commentaire