Running application from setup project not returning UI culture


Running application from setup project not returning UI culture



I created a localized wpf apllication. To install the application in the system I used msi installer provided by visual studio. Upon completion of the installation i run the application by running the commit custom action command.
In the application I have written the below code to get the current UI Culture


commit custom action


CultureInfo ci = CultureInfo.CurrentUICulture;
string name = ci.Name;



My systems current language is in Spanish, but on installing the application via the installer it is returning to en-US culture but should remain Spanish. Once i close the application and run it again using the desktop icon it returns to the correct culture.


en-US



Can anyone help why it is returning en-US on running application using MSI.





Whether you see the installer running in Spanish or English?
– dhilmathy
Jun 29 at 10:31





Installer is in English, but my wpf application is localized. when it runs by the installer then aplication window was opening in English which should be in Spanish
– Sunil Gupta
2 days ago





Why can't you make the installer language to Spanish and give it a try.
– dhilmathy
2 days ago




1 Answer
1



It's related to this:



Windows installer using the NT AUTHORITYSYSTEM instead of login user



Custom actions run from Visual Studio setup projects run with the local system account, not with the installing user's credentials. There isn't a good solution to this (see the related link) because there's no good way to start a program from the install as if it was started from the logged on interactive user.






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Comments

Popular posts from this blog

paramiko-expect timeout is happening after executing the command

Opening a url is failing in Swift

Export result set on Dbeaver to CSV