2

I have some windows services running on an Windows 2008R2 server. My system locale on that server is English (US).

Is there any way you can force a windows services to use a specific locale (without changing the system locale)?

For example, services #1 I want to force it to use locale Japanese because it needs the Japanese locale to do the windows code page. Services #2 I want to force it to use Chinese (smplified).

Is this possibly without changing anything in windows services code?

I find some tips online about using a user account(that has a specific locale set) to run the windows service. I'm not sure how to do that.

Thank you.

0

Do it the perfect way, ask the tool maker to handle a variable for you.

setlocale, _wsetlocale is the Windows API to call in the service and/or program to change the local for the process.

  • Sets or retrieves the run-time locale
  • You mean the services code need to accept a parameter as locale setting, that it passes locale to services code, which would call setlocale function to make sure services run in the specific locale? Thanks. – rvpals Feb 23 '16 at 19:23
  • @rvpals Yes, it's what I mean, as I don't know any forced method when you run the .exe – yagmoth555 Feb 23 '16 at 19:42

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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