0

Is it possible to copy a file that does not exist at the msi creation? It would be used in the following situation: the customer has a directory layout like:

|dir
+-program.msi
+-license.bin

The cutomer would run msiexec /i program.msi, and have the program installed to, say, c:\Program Files\Example\Example\ and the license file copied to c:\Program Files\Example\Example\License\. The license file is different per customer.

Is it possible to achieve this without a dll action, using only the built-in wix functionality?

MorJ
  • 566
  • 4
  • 14
  • You generally need a custom action for something so specific. I would recommend doing this all in your application and not in your setup (easier to test, debug and implement). [Licensing should be done outside the setup](https://stackoverflow.com/a/24360658/129130). Please read that link for details. – Stein Åsmul Sep 27 '19 at 10:00
  • [One more link](https://stackoverflow.com/questions/56506888/installer-setup-project-in-vs-2015/56507479#56507479). Shorter version. – Stein Åsmul Sep 27 '19 at 10:13
  • @SteinÅsmul you're 100% right about the "easier to .." part. It's all just the whim of the customer. So it has to be a custom action? That's incovenient to implement, but thanks. – MorJ Sep 27 '19 at 11:07
  • Typical problems with custom actions running late in a setup is that you sequence it wrongly and it runs during uninstall, modify, repair or self-repair. You forget to flush the errors returned and it triggers rollback of the whole setup. That kind of stuff. Or the rollback happens during a major upgrade. Many pitfalls. Maybe try to convince the customer that this file can be downloaded from an online system? Then you are in application context. Much easier to debug still. – Stein Åsmul Sep 27 '19 at 13:56

0 Answers0