Possible Duplicate:
Vbscript - Read ini or text file for specific section
I am trying to check whether IPaddress of other PC can be accessed or not. If IPaddress is static, following code is ok.
vbscript code
Dim Shell, strCommand, strHost, ReturnCode
strHost = "192.168.10.1"
Set Shell = wscript.createObject("wscript.shell")
strCommand = "ping -n 1 -w 300 " & strHost
ReturnCode = Shell.Run(strCommand, 0, True)
If ReturnCode = 0 Then
wscript.echo strHost & " is pingable"
Else
wscript.echo strHost & " is not pingable"
End If
As I want to check dynamic IPaddress, use ini file.
ini file
[IPaddress]
IP001 = "192.168.10.1";
IP002 = "192.168.10.2";
Now, I would like to know how to connect ini file and vbscript code. Please explain it to me.