locked
How to modify a settings file after the application has been deployed? RRS feed

  • Question

  • Hi all. I have a Windows WPF application which uses the SettingsProvider class, and a .settings file generated by Visual Studio, as explained in this MSDN article: http://msdn.microsoft.com/en-us/library/aa730869%28VS.80%29.aspx . The functionality works fine, but I have one question left: How would I change a settings value after my application is deployed? I don't see the .settings file in the client where I installed it.

    Thanks.
    :. HUGONNE .: Please mark as answer if the post helps. Coding tips - http://hugonne.blogspot.com/
    Monday, February 15, 2010 3:14 PM

Answers

  • If you are using Application settings, the settings are in the app.exe.config file.

    If you are using User settings, the settings are in each user's documents and settings subdirectory.

    Hope this helps.
    www.insteptech.com ; msmvps.com/blogs/deborahk
    We are volunteers and ask only that if we are able to help you, that you mark our reply as your answer. THANKS!
    • Marked as answer by Aland Li Thursday, February 18, 2010 11:05 AM
    Monday, February 15, 2010 3:44 PM
  • Please refer to the MSDN article: Application Settings Architecture. There you can find a section named Settings File Locations.

    Marcel

    • Marked as answer by Aland Li Thursday, February 18, 2010 11:05 AM
    Monday, February 15, 2010 5:39 PM
  • As an example, the user settings for one of my applications is here:

    C:\Users\Deborah\AppData\Local\InStep_Technologies\SampleApplicationCSharp.v_Url_h1ks3qr5egg143fk4d1wbauw1i3mdwpi\1.0.0.0

    In this example, the user name is "Deborah". The Company name set in the Application Information is "InStep Technologies". The application was "SampleApplicationCSharp".

    Hope this helps.
    www.insteptech.com ; msmvps.com/blogs/deborahk
    We are volunteers and ask only that if we are able to help you, that you mark our reply as your answer. THANKS!
    • Marked as answer by Aland Li Thursday, February 18, 2010 11:05 AM
    Tuesday, February 16, 2010 4:58 AM

All replies

  • If you are using Application settings, the settings are in the app.exe.config file.

    If you are using User settings, the settings are in each user's documents and settings subdirectory.

    Hope this helps.
    www.insteptech.com ; msmvps.com/blogs/deborahk
    We are volunteers and ask only that if we are able to help you, that you mark our reply as your answer. THANKS!
    • Marked as answer by Aland Li Thursday, February 18, 2010 11:05 AM
    Monday, February 15, 2010 3:44 PM
  • Thanks. Do I have to look in any particular folder inside Documents and Settings? Does the .settings file keep its name? Thanks again.

    :. HUGONNE .: Please mark as answer if the post helps. Coding tips - http://hugonne.blogspot.com/
    Monday, February 15, 2010 5:14 PM
  • Please refer to the MSDN article: Application Settings Architecture. There you can find a section named Settings File Locations.

    Marcel

    • Marked as answer by Aland Li Thursday, February 18, 2010 11:05 AM
    Monday, February 15, 2010 5:39 PM
  • As an example, the user settings for one of my applications is here:

    C:\Users\Deborah\AppData\Local\InStep_Technologies\SampleApplicationCSharp.v_Url_h1ks3qr5egg143fk4d1wbauw1i3mdwpi\1.0.0.0

    In this example, the user name is "Deborah". The Company name set in the Application Information is "InStep Technologies". The application was "SampleApplicationCSharp".

    Hope this helps.
    www.insteptech.com ; msmvps.com/blogs/deborahk
    We are volunteers and ask only that if we are able to help you, that you mark our reply as your answer. THANKS!
    • Marked as answer by Aland Li Thursday, February 18, 2010 11:05 AM
    Tuesday, February 16, 2010 4:58 AM