C not so Sharp

Hello all,

I have a program that installs 3 compact databases (.sdf) during the install in [TARGETDIR]DB, but when i am installing a newer version of my program I want to leave the databases in tact and just append the changes through the Custom Actions.

I have gone into my File System tab \Application Folder\DB and the properties for each of the files i have set the condition to "Not Installed", "NOT Installed", "!Installed" and a few others, yet I can not stop the install from overwriting the files if they are present.

Many thanks in Advance
Phil




Re: ClickOnce and Setup & Deployment Projects Windows Installer condition :Microsoft Visual Basic 2005

PhilWilson

If you're using RemovePreviousVersions, the key thing to know is that this is not an update, it's an uninstall of the older product followed by an install of the new one.




Re: ClickOnce and Setup & Deployment Projects Windows Installer condition :Microsoft Visual Basic 2005

David Guyer MSFT

Have you tried marking the files as Permanent=True in the setup project Since these are unversioned files, if they are modified by the user from the first install, then I think they'll be left alone with the new install.






Re: ClickOnce and Setup & Deployment Projects Windows Installer condition :Microsoft Visual Basic 2005

C not so Sharp

Hello,

Thanks for the replies, I am indeed using RemovePreviousVersions which would explain the removal then reinstalling of the DBs. What I should point out is that the first version of this application went out with no conditions (lets call it Version1.0.0); on the DB files and this build I am installing is an update (lets call this Version 1.0.1).

If I install 1.0.1 over 1.0.0 the DB modifications are lost from the first install, am I right in assuming this is because when installed, 1.0.0 had no condition flags set on the DBs

If I build a 1.0.2 and install that over 1.0.1 then the databases are left in tact, Im assuming this is because both versions in this case have the "Not Installed" condition set.

And finally, for the elite guru I have a last note:
Using 5 separate PCs in a test environment, different Dell models but same build; Windows XP SP2, .Net 2.0 (including my machine that I build the project on).
My machine and another will leave the DBs intact installing from 1.0.0 to 1.0.1 yet all the rest will uninstall the DBs and then install the blank ones.

Again any help would be appreciated
Phil