Detect if the client installing the software is located in US or other countries

80 Views Asked by At

My installer needs to do some tailoring for users living in United States.

What is the best practice to detect if an end-user is most likely from US?

Will this code work properly so that most Indian and other world-wide people are recognized?

procedure InitializeWizard();
var
  LocaleName : String;
  S : AnsiString;
begin
  if RegQueryStringValue(HKEY_CURRENT_USER, 'Control Panel\International', 'LocaleName', LocaleName) then
  begin
    if (LocaleName = 'en-US') then 
    begin
     // US
    end
    else 
    begin
      // INDIA ETC
    end
  end   
end;
0

There are 0 best solutions below