I use the VB6 / COM + application, which displays the date / time values based on the short date settings on the control panel, regional settings, for the user who runs it. The program, which then analyzes this output, has a custom parameter for the date format that it expects and presents in the user interface.
eg. If the locale for the user is set to mm / dd / yyyy and it issues 06/18/2009, the application expecting "06/18/2009" fails with "String was not recognized as a valid DateTime".
Since we usually run this application as a service account that we did not enter interactively to create a profile, we usually set the correct date format and then check “Apply all settings to the current user account and default user profile”.
I would like to make the C # configuration utility that I wrote for this mess in order to be able to set the date format programmatically for a given user.
Edit I would only like to change the code, but I have no way to do this at this time.
I also know that what I ask is bad. As for “this should be a user choice” - I am this user, since I create it explicitly for the task; I just want to set the date format using a script, instead of clicking on myself.
source share