I searched and read Google for many hours, tried different command line arguments, created a new user to test with, double-checked that seclogon (Secondary Logon or "Вторичный вход в систему" in Russian) service is up and running, looked through local security policies to find anything related, even ran a malware detection utility. No luck. I even went so far as creating a small C# snippet that tried to run a process with different credentials:
var pswd = new System.Security.SecureString(); foreach(char ch in "test123") pswd.AppendChar(ch); var psi = new ProcessStartInfo { UserName = @"my-pc/testuser", Password = pswd, FileName = @"c:\windows\system32\notepad.exe", WorkingDirectory = @"c:\", UseShellExecute = false }; Process.Start(psi);It failed with exactly the same error.
Finally, desperate and disappointed of wasting so much time, I found the cause - the Control Panel/"Clock, Language, and Region"/"Region and Language"/"Administrative"/"Language for non-Unicode programs"/"Change system locale" was set to "English" and that totally broke the internal user account mappings for the underlying system call.
Here is the screenshot of where it is in Russian version of Win7:
Once I had changed the setting to "Russian" and restarted the box everything started to work as expected.
What can I say about that experience? Now I hate localized versions of Windows even more than before.
Thank you!
ReplyDeleteСпасибо огромное! кто бы мог подумать, что эта ошибка связана с настрйоками языка системы!
ReplyDeleteА еще нужно создавать логин только из английских букв и цифр и длиной не более 8 символов. Много любви иначе с разнообразием не-ms пром-софта.
ReplyDelete