vb.net system.net -when google can't help, you guys always can

defuseme2k

[H]ard|Gawd
Joined
Oct 7, 2004
Messages
1,074
I am trying to write a simple app that runs in a loop and pings a group of machines. Their hostnames are sequential numerically so I can simply just add 1 to it every time.

The problem I'm running into:

dim whatever as string = system.net.dns.resolve(hostname).addresslist(0).tostring


I can shoot that puppy out to a text file and it works, however it just continually puts the same ip into my text file on everyline :(. I've tried to read on how to clear that out, and nothing I've found works. I'm pretty noob. This is what you end up with when someone can't give you a map of your building with the subnet layout. lol. I was trying to cheat :(

EDIT: Never mind I'm an idiot. I was neglecting to change the hostname everytime in the loop. Sometimes I just want to shoot myself.
 
Back
Top