My.Settings values are incorrect?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello, I have an application that uses my.settings to hold a boolean value if
the program has been setup (IsProgramSetup). When it is installed the value
is False, and the first time the application opens, an extra process is ran.
When the process completes it sets the my.settings.IsProgramSetup to True and
saves the settings. My problem is if the application is uninstalled and
reinstalled it doesn't seem to be using the correct [Application
Name].exe.config file. When it is uninstalled the file is removed from the
hard drive, and when the program is installed the file is reinstalled. When
the program is ran the value is true but the file says that it is false.
Where is it gettign the true value from? Does the .Net framework save these
settings somewhere else?
 
Hi Hank,

Sounds like you setting, IsProgramSetup, has it's scope set to "User".
That means the the value is stored in a location similar to
C:\Documents and Settings\[user]\Local Settings\Application
Data\[application name]\
(May vary on different OS, AFAIK).

If you want the extra proces to run for the first time on a pr user
basis, this is good. But you might be forced to do some manual cleanup
when uninstalling as the user settings survives the uninstall. Maybe
the Reset method does the trick... ?

Was this helpful?

Kind regards,
Christer
 
Back
Top