I have a Windows Installer which has a complex interface in WPF 4.5. It uses several other MSI Installer files created for several other components using WIX which are present inside the sub directories like:
- InstallerRootDirectory
- WPF_Executable_File[The main installer]
- File_A
- File_B
- Directory_A
- Directory_B
- Directory_c
- MSI Installer 1
- MSI Installer 2
I need the MSI Installer 2 created from WIX to be able to copy File_B
to the installation direcotory for this component on the target machine.
The File_B
is created at runtime from WPF_Executable_File
and is not available at MSI build time.
Can I do this directly through WIX, or do I need to use a Custom Action?
I tried the following code, but it gives error:
<Component Id="cmpA9616EB16BF74D7E90C6CD0D590A18ED" Directory="dir39B22699688E51DCD8DCBB99A47E835B" Guid="{DAD3EA2B-830F-482C-8F2F-EEB3C49E6373}">
<CopyFile SourceDirectory="../../[SourceDir]" SourceName="abc.xml" DestinationProperty="dir39B22699688E51DCD8DCBB99A47E835B" Id="copyfile1" />
</Component>
Error: SourceDirectory attribute's value is not a legal identifier
Using SourceProperty also gives the same error.
<CopyFile>
element is the right way to go in this situation. It will help if you specify the error you get. - Yan Sklyarenko