In Windows 7 (and Vista I think), a network you’re connected to is assigned to a “location” e.g. Home / Work or Public.
Is it possible to determine the current network location programatically?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Using Windows API Code Pack, you are able to get the same list of networks that Windows shows, by using
NetworkListManager.GetNetworks(NetworkConnectivityLevels.All).Then, there’s a property named
Categoryon each network which tells whether it is public or private (home / work). There seems to be no way to distinguish from ‘home’ and ‘work’ though.