Home > Batch Scripting, Remote Desktop Services (RDS) > Configuring “Language for non-Unicode programs” via the registry in Server 2003.

Configuring “Language for non-Unicode programs” via the registry in Server 2003.

As a break from server 2008 r2 profiles, I recently had a customer with a character display issue in our xenapp environment. Their local characters were not displaying correctly when run from our English XenApp servers. The language in question was Czech and numerous characters were incorrect or null in application menu’s and data contained in the application.

Testing the Microsoft AppLocale utility ended in utter failure, so we had no choice but to modify the default unicode option on the server 2003 operating system to change this to Czech.

Now this is all very simple to do from a console, start > run > intl.cpl > advanced and choose your language from a drop down list. But what if you want to automate, or script it?

No group policy exists for managing this option, and the documentation / forums online do not cover a full answer to the question. This also cannot be applied on a per user basis, this is strictly a per machine setting.

In my case, the language needed was Czech, and the below steps assume Czech language, this probably will work for any other… but let it be known here’s your disclaimer!

The process we’ll use, is to capture the regional and language options from one server, then export them for the remaining servers.

Step 1: create the necessary changes:

  • As mentioned above, click start, run, Intl.cpl.
  • Choose the advanced tab:

  • Choose the language you wish from the drop down list:

  • Hit Apply
  • Choose “yes” from the dialogue box, to skip the file copy if needed

  • Choose “no” to restart later.

click “Ok” to close.

Step 2: capture the changes:

  • Create a folder on the root of the c: drive, called “c:\unicode-export”
  • Once you’ve made the changes listed above, fire up regedit (start > run > regedit).
  • Export the following keys to the c:\unicode-export folder to .reg files:
  • (right click the key, and choose export, I named them 1-6 respectively for convenience.)
  1. [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontMapper]
  2. [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts]
  3. [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes]
  4. [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\GRE_Initialize]
  5. [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls]
  6. [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\Current\Software\Fonts]
  • Copy the following file to the c:\unicode-export folder:
  1. c:\windows\system.ini

Once finished, you should end up with 6 registry files, and 1 ini file in the “c:\unicode-export” folder:

Step 3: import the settings on the subsequent servers:

  • Copy the c:\unicode-export folder from your source server to the target server:
  • import the keys / ini with this simple script:

for /f /%%a in (‘dir /s /b c:\unicode-export\*.reg’) do regedit -s %%a

copy /y c:\unicode-export\system.ini c:\windows\

Note: (if you run this from a command line, outside of a batch file, replace %%a with %a.)

And that’s it, once the script is finished you can delete the c:\unicode-export folder and restart the server.

This was a massive pain in the arse to get to the bottom of (excuse the pun) so I hope its useful to somebody! I’ll also be reviewing this by the end of the year for server 2008 r2.

About these ads
  1. November 22, 2013 at 5:22 pm

    Hi Did you manage to review this for Windows server 2008? I need to do exactly the same thing on windows server 2008 SE and R2 so any help would be appreciated!

  2. March 18, 2014 at 9:18 am

    Great man! you saved my day. For some strange reason ‘Reagional Settings” was not opening so I tried your method and everything worked like a charm! thank you again!

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 2,300 other followers

%d bloggers like this: