1
votes

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.

1
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 - 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 instead?Stein Åsmul
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
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

1 Answers

0
votes

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