0

I know of whoami.exe. Is there a version called whereami.exe

The output should be able to tell me if I am on a LAN, wireless or VPN.

the machines would be running Windows Xp or better.

squillman
  • 37,883
  • 12
  • 92
  • 146
ggonsalv
  • 390
  • 1
  • 12

2 Answers2

2

What about ipconfig /all?

Seriously, there is no way to know what kind of network you're connected to, other than looking at the network device's name and guessing. There are proprietary tools made by some system vendors (mainly laptops) which can switch between LAN and wireless, but there's nothing "universal" you can just run on any computer and which can tell you "this is a wireless network".

Massimo
  • 70,200
  • 57
  • 200
  • 323
0

LAN, wireless, VPN. Those three are not mutually exclusive. You could be on Wireless & VPN, LAN & VPN, LAN and wireless, etc.

Some of the info you're looking for is probably available through the Windows Network Location Awareness service. I have no idea how you'd go about getting at this information programmatically, though.

EEAA
  • 109,363
  • 18
  • 175
  • 245
  • WMI? Any ideas. – ggonsalv Apr 26 '10 at 17:59
  • WMI has the same limitations Massimo mentions above - a human needs to define what the data means. You can write an app that uses WMI to collect local data, but you'd have to define in advance what that local data means - like you know that a device on the 123.123.123 subnet is where VPN traffic comes from, or if 123.123.1.5 is the dhcp server, then this machine is in wireless mode. – RobW Apr 26 '10 at 19:11