' LocaleStart ' ' Start a legacy (non-unicode) program under the specified locale (code-page) ' without changing the system-wide locale ' ' Parameters: ' 1 - Locale (LCID) in hexa, without the "0x" prefix. ' See http://www.microsoft.com/globaldev/nlsweb/default.asp for a list ' 2 - Program to run ' 3..n - Optional parameters ' ' Example, to start WinAmp with Cyrillic locale: ' ' C:\bin\LocaleStart.vbs 0419 "C:\Program files\WinAmp\WinAmp.exe" ' ' Written by Alex Sirota (alex@elbrus.com) 2004 ' Use is freely, as long as this header is kept as is. ' Set objArgs = WScript.Arguments If objArgs.Count < 2 Then WScript.Quit Set Sh = CreateObject("WScript.Shell") Set Env = Sh.Environment("Process") Env("__COMPAT_LAYER")="#ApplicationLocale" Env("AppLocaleID")=objArgs(0) Cmd = """" + objArgs(1) + """" For I = 2 to objArgs.Count - 1 Cmd = Cmd + " " + objArgs(I) Next Sh.Run Cmd