ajtsystems
IS-IT--Management
Hi,
I am new to HTA but have a ping script. Is there a way to get this code to be integrated into hta so that the ip address can be input and a button presses to fire the command?
Can I right the output to the actual hta line by line.
Set objShell = CreateObject("WScript.Shell")
Set objWshScriptExec = objShell.Exec("ping 192.168.1.1")
Set objStdOut = objWshScriptExec.StdOut
Do Until objStdOut.AtEndOfStream
strLine = objStdOut.ReadLine
If Len(strLine) > 2 Then
WScript.Echo Now & " -- " & strLine
Else
Wscript.Echo strLine
Loop
to adjust the ping length of time instead of a loop i will just ad a timeout in the objshell.exec.
James
I am new to HTA but have a ping script. Is there a way to get this code to be integrated into hta so that the ip address can be input and a button presses to fire the command?
Can I right the output to the actual hta line by line.
Set objShell = CreateObject("WScript.Shell")
Set objWshScriptExec = objShell.Exec("ping 192.168.1.1")
Set objStdOut = objWshScriptExec.StdOut
Do Until objStdOut.AtEndOfStream
strLine = objStdOut.ReadLine
If Len(strLine) > 2 Then
WScript.Echo Now & " -- " & strLine
Else
Wscript.Echo strLine
Loop
to adjust the ping length of time instead of a loop i will just ad a timeout in the objshell.exec.
James