Wednesday, August 22, 2007

Launching applications in another culture

A while ago I searched a way to launch Windows Live Write (WLW) with en-US culture. WLW doesn't enable spelling in systems that was not configured to use the en-US culture, Hebrew in my case. Roy Osherove wrote a little utility to overcome this. You can read about it here.

In his blog Fredrik asked for help about launching PowerShell with en-US culture. I think the same can be applied to Fredrik's problem. Based on the code Roy wrote, I'm launching WLW from within PowerShell with this:

$wlw = "C:\Program Files\Windows Live Writer\WindowsLiveWriter.exe";
[System.Threading.Thread]::CurrentThread.CurrentCulture = "en-US";

Some more help on AppDomain class on MSDN

1 comment:

Fredrik Wall said...

I have tried a similar way to launch PowerShell allready. I did It with C# and compiled It.

The result was the same as now with your code for PowerShell.

I don't think PowerShell likes to be launched in that way.

But I will try the function that you post on by blog by Scott Henselman as well.