tags:

views:

23

answers:

1

Hi!

(I'm newbe in Installer world so I'm still not sure what is right what is wrong. Anyway.)

I make a installer for service which uses desktop database. The database file should somehow be copied during first installation, be intact during upgrades and finally removed during uninstall.

As far I know, I can't add the database file as a directory component - 'cause installer will automatically remove it during uninstall. On the other hand, if I set the Persistent attribute, the database file will be NEVER removed by installer (even, if I will create separate component with RemoveFile element). The above leads me to thinking, that I can't add the database file as directory's component. So what are other options? Is it possible to include a file into installer file (msi) and then copy the file with custom action to target folder? Then deletion could be solved with RemoveFile element and condition base on UPGRADINGPRODUCTCODE property.

What do you think, guys?

A: 

If you are going to be using a custom action, why not create a custom action the will remove the file on uninstall. I have a custom action like that in a couple of my installers due to updates that happen to the target folder after the program has been running for a while. this just ensures a clean uninstall with no files laying around.

Scott Boettger

related questions