Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Keep some files when new version is installed
 

Keep some files when new version is installed

In setup project, how can i keep/overwrite the config files based on user selection ?
rajan_b  Thursday, April 10, 2008 11:50 AM

Hi rajan_b,

I performed a test about upgrading my application using the Application Settings (user-scoped settings) to let change the configuration of my application, when I release a new version, the user settings didn’t reset. Since the non-default (changed by end user) user-scoped settings are stored in a new file, user.config, where user is the user name of the person currently executing the application, it is not uninstall during uninstall. More information, please check the following article:

· http://msdn2.microsoft.com/en-us/library/8eyb2ct1.aspx

If you are working with a common xml file, I would suggest you not remove this xml file when the application is uninstalled by set the Permanent Property to true. When upgrading the application, you can use a File Launch Condition to determine whether to install the xml file. If the File Search finds the xml file, you should not install the xml file, otherwise, install it.

Hope this helps.
Best regards.
Rong-Chun Zhang

Rong-Chun Zhang  Tuesday, April 15, 2008 3:36 AM

Hi rajan_b,

I performed a test about upgrading my application using the Application Settings (user-scoped settings) to let change the configuration of my application, when I release a new version, the user settings didn’t reset. Since the non-default (changed by end user) user-scoped settings are stored in a new file, user.config, where user is the user name of the person currently executing the application, it is not uninstall during uninstall. More information, please check the following article:

· http://msdn2.microsoft.com/en-us/library/8eyb2ct1.aspx

If you are working with a common xml file, I would suggest you not remove this xml file when the application is uninstalled by set the Permanent Property to true. When upgrading the application, you can use a File Launch Condition to determine whether to install the xml file. If the File Search finds the xml file, you should not install the xml file, otherwise, install it.

Hope this helps.
Best regards.
Rong-Chun Zhang

Rong-Chun Zhang  Tuesday, April 15, 2008 3:36 AM

You can use google to search for other answers

Custom Search

More Threads

• package deployments
• Installed program is not running in a ‘userâ€?account.
• Q&A database import
• Security issue with strong named hosted DLL
• Deployment Project - Install to Framework Folder
• User option to select "Log on" when installing VB .NET Windows Service
• Error During ClickOnce Deployment...
• obfuscate windows form project and referenced projects before they are packaged into setup project
• Save setup file in Default Path in windows application
• Override Uninstall being ignored