Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

How to ignore some file, while patching?


3 replies to this topic

Rimantas Varanavicius

Rimantas Varanavicius
  • Members
  • 13 posts

Posted 10 December 2003 - 12:43

Hello,

I need to ignore some particular file (web.config) while patching, that is - no matter what it's version is present - do not update it.
First I've generated regular patch, by defining the target and upgraded images in *.pcp file. I did apply it successfully, reinstalling required files, executing the custom action and so on.
Afterwards I've modified the *.pcp file - added record to UpgradedFilesToIgnore table. The record column's 'Upgraded' value assigned to the table 'UpgradedImages' (from the same *.pcp file) column's 'Upgraded' value. Columns 'FTK' value assigned to the table 'Files' (from the msi file of the upgraded image) column's 'File' value of the record with the file name assigned to "WEB~1.CON|Web.config".
The patch, generated using the updated *.pcp file, did not applied successfully: there were no error messages, however the files were not upgraded and the custom actions were not executed.
Am I doing something wrong? How should I state to ignore some particular file while patching?
Thanks in advance.

Rimantas

Neo

Neo
  • Members
  • 48 posts

Posted 06 January 2004 - 03:57

You can keep the web.config file in a separate component and set its msidbComponentAttributesNeverOverwrite bit. This would make sure that the component is never overwritten. I believe that this would be a better solution.

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 06 January 2004 - 18:49

I definitely agree with Neo that his suggestion is the best approach.

However, if you need a "hack" to fix this you may be able to exploit the fact that windows installer will not overwrite unversioned files whose create and modify dates are different. Hence you could open the file and save it using a custom action early in the installation sequence and hence "fool" windows installer into leaving the file alone.
Regards
-Stein Åsmul

Rimantas Varanavicius

Rimantas Varanavicius
  • Members
  • 13 posts

Posted 14 January 2004 - 13:25

Hello,

It does sound as a great idea what New wrote.
However the problem is that web.config comes together with a bunch of other files as primary output of some project from solution. I'm using the VS.NET web setup project to build my msi's. And combining all the mentioned with other "nice" stuff that's bundled with the VS.NET setup projects (for example changing the Condition value for the component, changes it's guid) I came to a conclusion that I need some other solution...
Thanks anyways.

Rimantas