Windows - VBScript - Determine IP address of computer on network

Posted by tward on Stack Overflow See other posts from Stack Overflow or by tward
Published on 2009-02-06T17:30:32Z Indexed on 2010/03/25 8:23 UTC
Read the original article Hit count: 329

I have written some VBScripts to automate tasks that I perform on computers over the network. These work great for most tasks however within our network we have problems with the IP address in DNS being correct all the time. This mainly occurs with laptops where we have different IP ranges for machines on the wireless and wired network.

For example a machine may boot up wired in the morning and get an IP address: 10.10.10.1

When it switches to wireless it will obtain an address in a different subnet: 10.11.10.1

When you try to connect to that machine it still returns the old IP address (10.10.10.1) even though the computer now has a new one.

I have found that I can still connect to that computer's C$ share via \computer name\c$ even though the machine does not ping. Obviously there is some other kind of address resolution going on, my question is how do I harness this to allow my VBScripts connect to WMI?

Thanks!

© Stack Overflow or respective owner

Related posts about vbscript

Related posts about windows-xp