AddExtender("WWPRT44i.DLL") AddExtender("wwipg34i.dll") AddExtender("wwsop34i.DLL") Addextender("WWWNT34I.DLL") ;~~~~~~~~PUT YOUR LIST OF COMPUTERS HERE~~~~~~~~~~~~~~ ListOfSystems="c:\computers.txt" ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ;~~~~~~~~PUT LOCATION OF YOUR LOG FILE HERE~~~~~~~~~~~ OutPutFile="c:\cynthia.txt" ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ num=0 ListNum=0 List_System=Fileopen(ListOfSystems,"read") while 1 ListRead=fileread(List_System) if ListRead=="*EOF*" then break ListNum=ListNum+1 endwhile fileclose(List_System) ListOfSystems=Fileopen(ListOfSystems,"read") astatusbar(0,"PingSys","Looking for live systems.%@CRLF% Number of Systems to search= %ListNum%",ListNum,num) ;Filewrite(OutPutFile,"Printers Found") d=datetime() errormode(@OFF) while @true system=Fileread(ListOfSystems) if system=="*EOF*" then break systemFQDN=strcat(system,".foxhollowtech.com") png=ipping( systemFQDN,3) png_err= ipGetLastErr() Switch png_err case 1 png_e="Buffer is to small." break case 2 png_e="Destination net unreachable." break case 3 png_e="Destination host unreachable." break case 4 png_e="Destination prot unreachable." break case 5 png_e="Destination port unreachable." break case 6 png_e="IP_BAD_OPTION" break case 8 png_e="IP_HW_ERROR" break case 9 png_e="IP_PACKET_TOO_BIG" break case 10 png_e="IP_REQ_TIMED_OUT" break case 11 png_e="IP_BAD_REQ" break case 12 png_e="IP_BAD_ROUTE" break case 13 png_e="IP_TTL_EXPIRED_TRANSIT" break case 14 png_e="IP_TTL_EXPIRED_REASSEM" break case 15 png_e="IP_PARAM_PROBLEM" break case 16 png_e="IP_SOURCE_QUENCH" break case 17 png_e="IP_OPTION_TOO_BIG" break case 18 png_e="IP_BAD_DESTINATION" break Endswitch if png==@true ;~~~~~~~~PLACE ACTIONS TO BE PERFORMED HERE~~~~~~~~~~~~~~~~~ ;debug(@ON) rem_sys=strcat("\\",system) function=RegConnect(rem_sys, @REGMACHINE) ; Connects to a predefined registry handle on another computer. ;key=RegOpenkey(function, "SOFTWARE\QAD\QAD Applications\1.1.207") itsthere=RegExistKey(function, "SOFTWARE\QAD\QAD Applications\1.1.207") if itsthere==@TRUE D=RegDeleteKey(rem_sys,"SOFTWARE\QAD\QAD Applications\1.1.207" ) ; Deletes a key and data items associated with the key. if D==@TRUE OutPutFile=Fileopen(OutPutFile,"append") Filewrite(OutPutFile,"%system% Key Deleted") fileclose(OutPutFile) endif endif RegClosekey(function) ;d=strcat("\\",system,"\c$\Program Files\Java") ; if direxist(d)==@TRUE ; d_write=DirItemize("%d%\*") ; Returns a delimited list of directories. ; Filewrite(OutPutFile,"%system%, %d_write%") ;CHANGE THIS TO WHAT YOU WANT WRITTEN IN YOUR LOG FILE ; else ; Filewrite(OutPutFile,"%system%,JRE not detected.") ;CHANGE THIS TO WHAT YOU WANT WRITTEN IN YOUR LOG FILE ; endif ; else ; Filewrite(OutPutFile,"%system%,Ping Failure,%png_e%") endif num=num+1 remains=listnum-num astatusbar(1,"PingSys","Checking -> %system% %@CRLF%Systems remaining= %remains%",ListNum,num) endwhile astatusbar(2,"","","",0) fileclose(ListOfSystems) fileclose(OutPutFile) exit