How do you read the default values from the appName.exe.config file? My application only reads these values on first installation. Subsequently, it reads the updated values sitting in the user.config file. Please assist. Thanks

Recommended Answers

All 2 Replies

Are you talking about the values accessed via My.Settings? If so, please post your code. Check if your settings are defined with Application or User scope.

(AppInstallation is set to True in the App.config file)

If My.settings.AppInstallation=True Then

If File.Exists(f1name) Then
File.Delete(f1name)
File.Copy(f2name,f1name)
End if

My.Settings.AppInstallation=False
My.Settings.Save

End If

Properties are set to:
GenerateDefaultValue: True
Roaming: False
Scope: User

So on every installation I want the executable file to pick up a TRUE value for Appinstallation (from an upgraded appName.exe.config file) in order to delete the file, if it exists. and when an app is run/launched it should pick up a FALSE value. But that does not seen to happpen. The .exe.config is always negative unti I delete the user.config file.

_______________________________________________________________

Are you talking about the values accessed via My.Settings? If so, please post your code. Check if your settings are defined with Application or User scope.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.