i send email with the following :
Set objShell = WScript.CreateObject("WScript.Shell")
objExec4=objShell.run("D:\Temp\SMTPSend.exe -fvalentin.mihul@mozzartbet.com -tvalentin.mihul@mozzartbet.com -sHost_" & arrName(i) & "_is_" & arrStatus(x) & " -hmail.mozzartbet.com",1,True)
but now its...
something like this?
Option Explicit
Const sDataFile = "d:\temp\hosts1.txt"
Const ForReading = 1
Const ForWriting = 2
Dim arrIP(), arrName(), arrStatus()
Dim x, c, p, s
ReadData
For x = LBound(arrIP) To UBound(arrIP)
c = 0
p = 0
for c = 0 to 3
If Ping(arrIP(x)) = True Then
p = 1...
i understood this part...but i want to send 4 pings in each ip every time i run the script...if ping is 50 % true then arrStatus = up
if ping is under 50 % then arrstatus = down
after that i want to check if the current stus matches the one from the previous script runing. if the status dont...
i dont understand how to use the script u send me...i want to ping a location but i want to ping it 4 times/1 script run. each time i have a counter witch is increasing if the ping its true or 0 if the ping is false. after that, is the counter is biger than 0 then the ping is up, if not is down...
sorry guitarzan but im to noob to understand what u wrote can u give me an yahoo messenger id to tell u what i want to do, maybe u can help me with that
i dont know how to recreate the text file...
im writeing in it but in the end i have only one line in it not 15 like i had at the begining
this is the script:
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("d:\temp\hosts1.txt", ForReading)
Set...
the program its supose to do this:
i have in a file 3 variables: ip, name and state
the script reads an ip from a file, send a ping in that ip, check if the state of the ping is the same with the state in the file and if not sends an email and after that writes in the file the ping state for...
i found a way to write something in the new txt file but now i dont know what to do
i have a txt file with ip addresses and names. i want to put in it another column with the state of connection witch is up or down. i know how to read it thanks to u but i dont know how to write on the 3rd column...
now everything its working just fine but can u tell me something...how can i create a txt file witch is not empty and has the string "down" in it ?because i didnt find in any tutorial this...
for all the ips i made a txt file were the script put the last state... because if im checkig if its up then the script will send me hundreds of emails until the connection is up again...if its checking last state will send me a message when its down and a message when its up again...thats why i...
can u tell me where im wrong?
this is the script:
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("d:\temp\hosts.txt", ForReading)
Const ForReading = 1
Dim arrFileLines()
i = 0
Do Until objFile.AtEndOfStream
Redim Preserve arrFileLines(i)...
i know how to read from a txt file...i know how to write into one..i know how to ping...i dont know how to read a variable and from a row in a txt file and to return a variable from the same row but another column
i want something simple like a txt file and ill like to look like this:
ip computername
192.168.1.4 computer1
192.168.1.10 computer2
192.168.1.100 computer3
and i want to ping the ip's and if 192.168.1.10 is not responding to send me an email with the text: "computer2 is not responding"
in...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.