Check is coputer online/live

  • Thread starter Thread starter Michi Albatross
  • Start date Start date
M

Michi Albatross

Hy.
I need to check:
- is the target machine online.
How can i do it?

if machine_is_online =true then
online = yes
else
online = no
end iF

thanks
 
Ping it:

http://support.microsoft.com/default.aspx?scid=kb;en-us;828993

Another way if its a web server is to use the Process.Start method:

System.Diagnostics.Process.Start(http://www.yourwebpagehere.com)

If you get a 404 page error or a time out then the site is probably down,
otherwise its ok. Me personally would use ping first, which you could just
use ping directly from the command prompt instead of creating the ping
utility above

Crouchie1998
BA (HONS) MCP MCSE
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top