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.

link|improve this question

75% accept rate
feedback

2 Answers

up vote 0 down vote accepted

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.

link|improve this answer
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
feedback

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".

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.