i have developed a project in WFP in which i launch a command via Powershell.exe, but i would like the return language of the script output to be English and not French, how can i do?
private void myfunction()
{
Process myprocess= new Process();
myprocess.StartInfo = new ProcessStartInfo()
{
UseShellExecute = false,
CreateNoWindow = true,
WindowStyle = ProcessWindowStyle.Hidden,
FileName = "Powershell.exe",
Arguments = "netsh wlan show interface",
RedirectStandardError = true,
RedirectStandardOutput = true
};
process.Start();
String mystring= process.StandardOutput.ReadToEnd();
process.WaitForExit();
}
I tried to use this, to change the language but nothing,the output remains in French
CultureInfo newCulture = CultureInfo.CreateSpecificCulture("en-US");
Thread.CurrentThread.CurrentUICulture = newCulture;
Thread.CurrentThread.CurrentCulture = newCulture;