Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
;Written by James Lee 12/19/2005 AddExtender("WWINT44I.DLL") AddExtender("wwwsk44I.dll") AddExtender("wwsop34i.DLL") wxParmSet(2, 3) oline="" steps=254 currentstep=0 title="IP Subnet Device Search." ;IntControl(1002, 0, 0, 0, 0) FileDelete("ipdevicelist.txt") td=TimeDate() handle = FileOpen("ipdevicelist.txt", "Write") FileWrite(handle, "Last Run on:%@TAB%%td%%@CRLF%Device IP:%@TAB%Name:") FileClose(handle) aStatusbar(0,title,"Process Starting",steps,currentstep) :START For i=1 To 254 currentstep=i t="172.17.1." ;change this to your subnet I.E. "192.168.55." or "10.1.0." only leave off the last number but include everything and the last dot t="%t%%i%" a=wxPing(t) reslt=wxGetLastErr() msg=wxGetErrDesc(reslt) aStatusbar(1,"Testing %t% Step %currentstep% of %steps%","Testing...",steps,currentstep) If reslt=="0" a=iAddr2Host(t,5) If a=="" handle = FileOpen("ipdevicelist.txt", "APPEND") FileWrite(handle, "%t%%@TAB%Response received - Host Name Unknown") FileClose(handle) aStatusbar(1,"Testing %t% Step %currentstep% of %steps%","%t%%@TAB%Response received - Host Name Unknown%@CRLF%",steps,currentstep) Else handle = FileOpen("ipdevicelist.txt", "APPEND") FileWrite(handle, "%t%%@TAB%%a%") FileClose(handle) aStatusbar(1,"Testing %t% Step %currentstep% of %steps%","%t%%@TAB%%a%%@CRLF%",steps,currentstep) EndIf Else handle = FileOpen("ipdevicelist.txt", "APPEND") FileWrite(handle, "%t%%@TAB%No Response") FileClose(handle) aStatusbar(1,"Testing %t% Step %currentstep% of %steps%","%t%%@TAB%No Response%@CRLF%",steps,currentstep) EndIf TimeDelay(1) Next i xx = aMsgTimeout(10,"Finished","Would you like to review the results?","Accept","Cancel") If xx=="2" Then Run("Notepad.exe","ipdevicelist.txt") Else Exit
Article ID: W17226
File Created: 2007:07:03:14:28:54
Last Updated: 2007:07:03:14:28:54