tags:

views:

29

answers:

1

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?

A: 

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 http://stackoverflow.com/questions/319894/simplest-solution-to-replace-a-tiny-file-inside-an-msi for one solution.

sascha

related questions