Search code examples
wixwix3wix3.8wix3.9

WiX Toolset: Copy installation file to new directory


How can I get an actual path reference to the installation (.msi) file currently being executed?

I want to copy this file to a new location on disk. I understand that I must use CopyFile for this:

<Component Id="InstallationFileCopyId">
    <CopyFile Id="InstallationFileCopyId" FileId="{installation file}" DestinationDirectory="NewLocationDirectory" />
</Component>

I am using WiX Toolset 3.9 in Visual Studio 2013.


Solution

  • Wix has an OriginalDatabase property which shows the exact location of the msi being executed