1

I would like to keep some files outside of my MSI in a directory: e.g.

C:\users\foo\msi-folder\
  installer.msi
  stuff\
    files here i want to reference

I can successfully not embed the files with a custom <Media> (not sure if this is necessary) element and setting compressed="no" such that the files get created in my bin directory

but, when i run the installer it tries to look for them in (TARGETDIR) C:\stuff\....
I want to be able to do something like <Directory Name="stuff" SourceName="[SourceDir]stuff"> but that does not seem to work.

CobaltHex
  • 117
  • 1
  • 6
  • Due to the complexity involved I wouldn't recommend this, but you can hack the Media table to include external files I think - I have done it [for external CABs to add extra files as explained here](https://stackoverflow.com/a/48629542/129130) - too long since I did it to remember all particulars. What files are these? Can they be generated or downloaded instead? Are they settings files? [Can you use a transform](https://stackoverflow.com/a/58232330/129130) instead? – Stein Åsmul Feb 07 '20 at 10:42
  • they are drivers. I need them externally because they need to be available when installing windows. (Previously they were duplicated both loose and in the installer, but I was hoping to not have to do that) – CobaltHex Feb 07 '20 at 17:14
  • I am also using DIFx:driver, but previously did it with custom actions. I'm wondering if it makes more sense to mark my drivers as binary (which seem to do what I want, I think) and go back to the custom action? – CobaltHex Feb 07 '20 at 20:55

1 Answers1

0

I ended up removing the files and using a custom action to reference them by path (using <SetProperty Value="[SourceDir]..." /> to reference the paths.

I also ended up switching to using PnPUtil as DIFx is deprecated

CobaltHex
  • 117
  • 1
  • 6