简体   繁体   中英

Wix installer - Always replace SWF file

I'm running into a problem where we had to give a customer a hotfix that was an updated SWF file. Because swf files are not versioned, during the next release it does not get overwritten (the installer thinks it is a user modified file and will not overwrite it).

I have had some suggestions of running a custom action to replace the file, but this would not properly handle a rollback situation. I'm just curious on what others would suggest for this case.

Windows Installer supports this through the use of what it calls "Companion Files". You can set this through File/@CompanionFile in WiX. It works by using the referenced file's version comparison in place of its own, so if the referenced file gets installed, so will this one. Typically this would be another versioned file in your installer, so you can easily control this. Sometimes that file exists solely to contain a version resource and doesn't provide any real benefit once installed.

You can find more information with searches for "companion files", or "version lie".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM