Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Upgrade a non-versioned file during upgrade a previous installation??
 

Upgrade a non-versioned file during upgrade a previous installation??

Hi Experts,
i have created a simple setup, which doesn't have any custom action specified and having a single folder structure in file system editor as follows.
Application Folders --> TestProject -- Bin-->exe and execonfig
|_____MessageFiles-->some xml files.

all the required properties for the upgrade are set properly.
on very first installation the folder is getting properly created and my application is working fine.
then i created upgrade installer for my application, which properly upgrades all the files with version, however unable to update all non version files like message file(.xml).


i have tried REINSTALLMODE = VOMUS and REINSTALL= ALL(as command line argument while installation) property for the above problem but these are not very helpful in my case(may be i am using the in incorrect way).

please tell me the proper way to use such properties and let me know if we can go for up gradation of a particular item while installing/upgrading our application.



Go Green... Save Mother Earth...
Girish.Agrawal  Tuesday, September 01, 2009 12:32 PM
If a data file has been updated between the first install and the upgrade then it doesn't get replaced because of the file replacement rules. Files that have been updated by the user don't get replaced.
You can't use those properties because what you're doing with RemovePreviousVersions is (internally) a Windows Installer major upgrade, and those properties don't apply during a major upgrade.

The easiest detour is simply to change the install folder so that all your files go in a new folder and the old ones in the other folder get removed. Add [ProductVersion] to your application folder's directory tree, for example.

Other than that, VS 2008 upgrades behave like updates, and the best general approach is for you to do an update too. Use a custom action, andif you find the Xml file in your app folder then update it in your custom action withnew data.

Another choice is to change your setup to behave like VS 2005 so it uninstalls all the old product first.

http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/519faa07-5b4e-4546-bfb3-6f233bf7286f
Phil Wilson
PhilWilson  Tuesday, September 01, 2009 6:57 PM
If a data file has been updated between the first install and the upgrade then it doesn't get replaced because of the file replacement rules. Files that have been updated by the user don't get replaced.
You can't use those properties because what you're doing with RemovePreviousVersions is (internally) a Windows Installer major upgrade, and those properties don't apply during a major upgrade.

The easiest detour is simply to change the install folder so that all your files go in a new folder and the old ones in the other folder get removed. Add [ProductVersion] to your application folder's directory tree, for example.

Other than that, VS 2008 upgrades behave like updates, and the best general approach is for you to do an update too. Use a custom action, andif you find the Xml file in your app folder then update it in your custom action withnew data.

Another choice is to change your setup to behave like VS 2005 so it uninstalls all the old product first.

http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/519faa07-5b4e-4546-bfb3-6f233bf7286f
Phil Wilson
PhilWilson  Tuesday, September 01, 2009 6:57 PM

You can use google to search for other answers

Custom Search

More Threads

• No real world ClickOnce samples out there?
• Click Once Application - Deploy Icon and Desktop Shortcut?
• 'mage.exe' is not recognized as an internal or external
• Security policy forbid users to uninstall their programs:
• Setup questions...
• How to create a setup for app (Windows Forms)
• ClickOnce Won't Update a Application if it's passed command line arguments. Bug?
• Memory leak in ClickOnce deployment in 3.5
• Windows Installer Issue
• Client Profile Designer Bootstrapper + Clickonce app big problem