MSI Factory

Copy Files

Note: Copied files are also removed during uninstall.

Source

File being installed

Select this option if you want to make a copy of a file that you are installing (a file that is in your project). This will cause the file copy to happen after the file is installed.

File ID:

The identifier of the file in your project that should be copied. Use the Browse button to browse for a file ID.

External file

Select this option if you want to copy one or more files that you are not installing. That is, files that are already on the system. When you use this option, the file copying happens before your files are installed.

Folder:

The location of the source folder to copy files from. Select the "Folder ID" option to indicate that the value is a folder identifier from your project. Select the "Property" option to indicate that the value you are entering is a property that holds the folder location rather than a folder reference or path.

Filename:

The name of the source file that you want to copy. It can either be a literal single filename, or you can use wildcard specifiers ("*", and "?") for multiple files. Examples:

myfile.txt
myfile.*
*.txt
file???.*

Remove source after copying

If checked, the source file will be deleted once the copy is complete. This effectively makes the operation a move instead of a copy.

Destination

Folder:

The location of the destination folder to copy files to. Select the "Folder ID" option to indicate that the value is a folder identifier from your project. Select the "Property" option to indicate that the value you are entering is a property that holds the folder location rather than a folder reference or path.

Filename:

The name of the destination file. You can leave this field empty to keep the same filename as the source. Always leave this empty if you used wildcards in your source filename. If you want to specify a short filename, use the syntax: "shortname|long name." For example, "myfile.exe|My Program File.exe." If you do not use this syntax, the filename you specify will be assumed to be the long name and a short name will be auto-generated at build-time.

More Information

MSDN Online: DuplicateFile Table

MSDN Online: MoveFile Table

WiX Help File: CopyFile Element