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.