How to detect in which country / region installer is running (offline).
Share
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.
You should access registry key
HKEY_CURRENT_USER/Control Panel/International/sCountryor possiblysLanguage.Note this will give you the cultural conventions and language the user wants rather the actual geographical location.
A possible alternative is
HKEY_CURRENT_USER/Software/Microsoft/Windows NT/TimeZones/TimeZoneKeyNamewhich may give you a clue as to the real location.Otherwise you could use a web service like
http://www.ip-adress.com/which will tell you the location of the machines ISP, which may well be in a different country from the machine itself given the tortured topology of some corporate networks.What usually works best is to ask the user to “Select Country” from a pull-down menu.