I'm trying to remotely use a software called Sunetplus installed on a local machine from a Windows 2012 Server. I only have to run a line in the command prompt to do what I have to do (which is import new data in the software database). The command works well on my machine and is set to work on the server as well. The only issue is this : when I use this command line, the software launches normally but then display an error :
CurrentCulture and CurrentUICulture define not the same language
I looked into it and found out that the CurrentCulture of my Server is fr-CH
and the CurrentUICulture is en-US
. So I went to:
- ControlPanel
- Language
- Change date, time, or number formats
- Changed the
Format
toEnglish(United States)
... and ran the command line again, and victory!
It worked without a problem. But I am actually not allowed to do that and should never change the date format of the server.
So I tried to run my command line in a Powershell script, using this Using-Culture
function to set the CurrentCulture properly.
#using-culture is defined before this part of the code
using-culture en-US{
#Command line to call Sunetplus and its parameters
& "\\MyLocalComputer\BBT Software\Sunetplus\SunetplusConsole.exe" -import Config='\\MyLocalComputer\Script\autoImport.xml' Password=****
[System.Threading.Thread]::CurrentThread
}
[System.Threading.Thread]::CurrentThread
When I output the currentCulture of the thread using [System.Threading.Thread]::CurrentThread
, it is correctly set to en-US
, but the software still displays the same error.
I also tried to contact the developers of the software, and after some discussions the only answer I got was "Just run the command line on your local machine and not on the server".
Maybe I did something wrong in my Powershell script (it is my first PS script), or maybe it's just a lost cause. If anyone has a beautiful idea, I'm all ears :) Sorry for the long post, thank you for your help !