|
-
January 21st, 2000, 08:45 AM
#1
Ping instruction
Hi everybody
I want to make a little program which will make a ping to a server at the dos prompt and which will indicate if the ping works.
My question is : How can I know if the ping works???
More generally, how can I get the information in the dos windows?
Ex : I got an environmental variable called MYVAR
If I enter "set MYVAR" at the dos prompt, How can I get the information ??
Thanx
Fzz
-
January 21st, 2000, 01:04 PM
#2
Re: Ping instruction
option Explicit
private Sub Form_Click()
Dim sCommand as string, i as Integer
' execute command
sCommand = "Ping "
Shell "command.com /c " & sCommand & " > c:\info.txt"
' wait
for i = 1 to 10000
DoEvents
next
' show file
Shell "notepad c:\info.txt", vbNormalFocus
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|