oliv6862
Messages postés1Date d'inscriptionjeudi 23 juillet 2020StatutMembreDernière intervention23 juillet 2020
-
Modifié le 31 juil. 2020 à 00:10
Whismeril
Messages postés18630Date d'inscriptionmardi 11 mars 2003StatutContributeurDernière intervention29 septembre 2023
-
23 juil. 2020 à 14:22
Bonjour,
J'ai le script suivant pour effectuer des ping. Il ne s'arrete jamais. Il tourne en continue.Comment le stopper.
Merci par avance
Dim strComputer(28)
Dim i
Dim i1
Dim Liste(4)
Liste(0) = " Centrale de mesure Etamic BERCEAU"
Liste(1) = " Centrale de mesure Marposs Pivot N"
Liste(2) = " Centrale de mesure Marposs Pivot N"
Liste(3) = " Centrale de mesure Etamic Pivot T1/N"
strComputer(0) = "muie01"
strComputer(1) = "muie02"
strComputer(2) = "muie03"
strComputer(3) = "muie05"
'Ping version Win2000
Set objShell = CreateObject("WScript.Shell")
for i = 0 To 4
Set objScriptExec = objShell.Exec( _
"%COMSPEC% /c ping -n 2 -w 2000 " & strComputer(i))
strPingResults = LCase(objScriptExec.StdOut.ReadAll)
If InStr(strPingResults, "perdus = 0") Then
' msgbox (strComputer(i) & " repond au ping !")
Else
Call msgbox (strComputer(i) & " - " & Liste(i) & " n'a pas repondu au ping!")
End If
Next
WScript.Quit