Wondering where does Windows Service pick the Locale Settings from?

Boy! couple of months back I had encountered an issue where my application which is running as Windows NT Service, always used the Locale settings thats entirely different from what is set in the control panel by the logged in user.

I thought if I had provided an User Account to be used as the credentials for the service, then the windows service might use that particular user’s locale settings. But Hard Luck!

Later on further weaving thru the Windows Registry, realized that windows captures the Locale Settings that I had provided during the initial Installation of the WinXP Operating System.

This basically means Windows maintains TWO Locale information, one about the logged in user and the other which is the default that was provided during Windows Installation.

The following Registry Key stores Current Users Locale Configuration
HKEY_CURRENT_USER\Control Panel\International

The following Registry Key stores the Default Users Locale Configuration
HKEY_USERS\.DEFAULT\Control Panel\International

Tough Find !!!