Experimenting with Microsoft Applocale

A question was recently raised in one of Michael Kaplan’s blog entries: can you avoid the “Applocale is a temporary solution” message? Well, some have found out a way, by hacking the Applocale executable. Another way is to take advantage of the fact that Applocale is just another compatibility layer that has been installed in the system. All compatibility layers use an environment variable named __COMPAT_LAYER to activate themselves. So with Applocale, the compatibility layer is named ApplicationLocale. If we search google for ApplicationLocale and __COMPAT_LAYER then we see that others have already made the same discovery. Let’s try the following experiment:

create a batch file named apploc.bat

in it include the following:
set __COMPAT_LAYER=ApplicationLocale
set AppLocaleID=0408
start c:\myapp\myapp.exe

where c:\myapp\myapp.exe is the application you want to run in AppLocale

now, run the batch file, and notice that it runs the app in the locale you specified in AppLocaleID. An easy way to get around the limitation of AppLocale.

Important to note: you must actually have Applocale installed on the machine you try this on. It’s not a compatibility layer that is shipped with the operating system.

The other main benefit to this approach compared to using an Applocale shortcut is that you can avoid running as administrator the app that you’re trying to use Applocale with. In certain cases, running as administrator can disable functionality of your application such as OLE drag and drop.

About these ads

About tedwvc
On this blog you'll find some tips and tricks for dealing with Visual C++ issues.

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

%d bloggers like this: