0

I would like to copy file that placed near the msi to the program file folder.

I have the next code in my project:

<DirectoryRef Id="Global.txt">
  <Component Id="Global.txt" Guid="263B6F39-BE6B-4b51-8AE4-4D152436F0AE" DiskId="2" NeverOverwrite="yes" Permanent="yes">
    <File Name="Global.txt" Source="./Global.txt" Compressed="no" DiskId="2"/>
  </Component>
</DirectoryRef>

The problem is – that an empty file named Global.txt need to be placed at the development machine in order to build the msi.

Is there an elegant solution for my problem?

Hila
  • 291
  • 1
  • 2
  • 9

1 Answers1

0

The filesize and modification date is hashed and embedded in the MSI, you will need to update the MSI post-build if you're looking to have your customers edit the Global.txt after the MSI has been created.

See Simplest solution to replace a tiny file inside an MSI? for one solution.

Community
  • 1
  • 1
saschabeaumont
  • 22,080
  • 4
  • 63
  • 85