2

Looked everywhere and it seems like in VS2010 all options have been removed to do this.

I have a Setup Project that has Application Files that get copied over to the Application folder. What I want is to be able to overwrite any existing files there. The end user may edit this files between updates and I need to be able to overwrite their changes as well as send them any updates to these files.

Setting folders to "CreateAlways=True" does NOT mean the folder contents are overwritten as I had hoped/expected. It only allows you to create empty folders.

I've tried this solution. And apparently that doesn't work with 2010.

Easiest thing I can think of is to be able to set version numbers on these files to force the installation rule to overwrite older versions, but I don't think that's possible on text files and the like. (Besides, it's many files and I do updates often)

Community
  • 1
  • 1
VenerableAgents
  • 645
  • 1
  • 8
  • 16

1 Answers1

2

The most used approach (and easiest) is to set a very high version for all rows in File Table. For example you can use:

65535.65535.65535.65535

This could be done through a script or EXE which opens the MSI database, modifies it and saves the changes. You can find the MSI database API here: http://msdn.microsoft.com/en-us/library/aa368250(VS.85).aspx

Please note that some commercial tools have a special options for this.

Cosmin
  • 21,216
  • 5
  • 45
  • 60
  • I was hoping to avoid having to code anything so I'm going to just have the users run a batch file to delete files I want updated before they run an update. – VenerableAgents Apr 20 '11 at 20:41