locked
OpenExeConfiguration returns different values than realy in file. (Vista) RRS feed

  • Question

  •  

    Hi there,

    I use OpenExeConfiguration to read some settings, then do some work, then save the settings back to the file.

    After installing the application in Vista (with a setup made using VS 2005), the application works fine, it behaves

    like the settings are actually saved in the MyApp.exe.config file, and also the settings are there after closing and restaring the application. All work fine. The problem is that when I open the MyApp.exe.config file the settings are there untouched, like the application was when first installed.

    It looks like OpenExeConfiguration reads the configuration from someplace else instead of the MyApp.Exe.config file.

    This causes me problems because I cannot modify the settings manually (the app will simpy not "see" them), and also those settings are preserved even after uninstalling and resinstalling back the application!

     

    I have tried both OpenExeConfoguration(ConfigurationUserLevel.None) and

    OpenExeConfiguration(Application.ExecutablePath)

     

    It seems like Vista is saving some kind of application environment elsewhere which stays there forever.

     

    Any ideas?

     

    Thank you all in advance.

     

    Monday, January 21, 2008 9:59 AM

All replies

  •  

    Oops!

    Wrong forum.

    Sorry for that...

     

     

    Monday, January 21, 2008 10:50 AM
  • Well either way, I'd check the value you are passing in.  It should be blah.dll, make sure it isn't blah.exe that you are passing in.
    Monday, January 21, 2008 1:25 PM