Q:

Application Data Folder and Company Name With Underscores

My VB.NET 2008, .NET 3.5 application is using an app.config with settings defined as User. As expected, it created the folder:
C:\Documents and Settings\<user>\Local Settings\Application Data\<company name>\

In this folder are the sub-folders for the application to store the user settings. However, the folder of the company name has underscores:
C:\Documents and Settings\<user>\Local Settings\Application Data\This__Is_My_Company\

None of the other folders in this directory have underscores, and it looks stupid. Is there any way to tell the application to create the folder without underscores in the name?
UPDATE (26-Mar-2012):
This appears to be more of an issue on Windows 7 (at least - could be XP too but I'm already off XP). If I use the .NET Framework to create the folder if it doesn't exist ...
Const TEST_FOLDER_PATH As String = "{0}\{1}"

Dim appDataFolderPath As String = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)
Dim companyName As String = My.Application.Info.CompanyName

MessageBox.Show(String.Format(TEST_FOLDER_PATH, appDataFolderPath, companyName))

... then it will produce a folder path without underscores in the company name. Oddly enough, .NET 3.5 still creates its own folder in \AppData\Local\ for the user's app.config settings with underscores.
I end up with one folder with underscores for the user's app.config data, and one folder without underscores so I can tell our third-party spell checker where to store the user-dictionary.txt file. Looks like I'll have to hard-code the company name in order to keep everything to one folder, or live with two folders. Wonderful ...

A:

The LocalFileSettingsProvider class is responsible by default for storing config settings in .NET. It seems to put in underscores for all managed applications by default - I see it in several apps in my local settings directory. If you are really concerned about the name, you could:

Use the technique described in Changing the .NET application configuration file name question.
Create your own SettingsProvider and have it use the right filename. This sounds like re-inventing the wheel though.
Use camel-case for your company name.

