1

I am new with Wix and I'm stuck with very basic tasks.

I wish to create some files which don't exist in any component. I plan to use CustomAction with ExeCommand but I was wondering if there was any other way to proceed. I checked the forum a lot but I didn't find anything.

Any idea?

  • 1
    Can't you just use the application to create them on launch? Other than that you can create shim files that are 1kb and install them? – Stein Åsmul Mar 21 '19 at 19:58
  • You can actually create a zero byte file and author them into the MSI. This does sound like an application first run issue. The only way to do this in an MSI is to use a custom action. – Christopher Painter Mar 21 '19 at 22:49
  • Might be able to copy NUL, via the [MoveFile](https://learn.microsoft.com/en-us/windows/desktop/msi/movefile-table) table ([CopyFile](http://wixtoolset.org/documentation/manual/v3/xsd/wix/copyfile.html) element), but agreed I'd rather just include the empty file. – Michael Urman Mar 24 '19 at 02:08
  • Sorry for my late reply! I did as you said @SteinÅsmul . Custom actions are very useful but it is not worth for this situation. Thank you for your help :) – The friendly stranger Apr 02 '19 at 14:25
  • Custom actions must only be used when absolutely necessary for reliability reasons. [Some propaganda against them here](https://stackoverflow.com/questions/46179778/why-is-it-a-good-idea-to-limit-the-use-of-custom-actions-in-my-wix-msi-setups/46179779#46179779) :-) - and for them too, when needed. – Stein Åsmul Apr 02 '19 at 14:28
  • Indeed! I really like this sentence: "This can save weeks of work". It perfectly describe custom actions when something doesn't go well. ^^ – The friendly stranger Apr 02 '19 at 15:21

0 Answers0