473,386 Members | 1,733 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to determine if a pc is on the same lan...

I'm backing up pc's across the lan (My Documents folders). A lot of
these pc's are laptops which may travel. They are still on the intranet,
but in a different building so the speed is tremendously slower. I
think the best way is to check that the default gateway is the same as
the machine doing the backup.

So how can I check the local/remote default gateway IP address? (aside
from calling IP config and parsing the return?)

Thanks.

*** Sent via Developersdex http://www.developersdex.com ***
Nov 21 '05 #1
1 868
In vb6 i'd do this:

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colNetAdapters = objWMIService.ExecQuery ("Select * from
Win32_NetworkAdapterConfiguration " & "where IPEnabled=TRUE")

For Each objAdapter In colNetAdapters
etc
Next

objAdapter contains the information you need.

Good luck
"Terry Olsen" <to******@hotmail.com> wrote in message
news:O9**************@TK2MSFTNGP15.phx.gbl...
I'm backing up pc's across the lan (My Documents folders). A lot of
these pc's are laptops which may travel. They are still on the intranet,
but in a different building so the speed is tremendously slower. I
think the best way is to check that the default gateway is the same as
the machine doing the backup.

So how can I check the local/remote default gateway IP address? (aside
from calling IP config and parsing the return?)

Thanks.

*** Sent via Developersdex http://www.developersdex.com ***

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
by: Christopher W. Douglas | last post by:
I am writing a VB.NET application in Visual Studio 2003. I have written a method that handles several events, such as closing a form and changing the visible status of a form. I have some code...
9
by: Adam | last post by:
Can someone please help!! I am trying to figure out what a font is? Assume I am working with a fixed font say Courier 10 point font Question 1: What does this mean 10 point font Question 2:...
7
by: semedao | last post by:
Hi all, I view many posts about this issue , the connected property does not tell us the current status of the socket. based on couple of suggestions of msdn , and some article here , I try to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.