Hi,
In order to achieve what you want you should proceed as follows:
- Create a "New file search" (i.e SOURCE_FILE) that searches for your file.
- Create a "New Search" (i.e. DESTINATION_FOLDER) and from its context menu choose "Add Location" -> "Folder" option. Set the "Path" field from "Directory Properties" right pane with your destination folder path:
- Go to "Custom Action" page and add a "Launch File and Open URL" custom action with sequence. Set the "Command" field from "Custom Action Properties" right pane with the following value:
Code: Select all
xcopy [SOURCE_FILE] [DESTINATION_FOLDER]
- From "Execution Options" group choose "Deferred with no impersonation" option.
- From "Execution Stage Condition" group uncheck "Uninstall" and "Maintenance" and in the "Condition" field use the following condition:
Code: Select all
DESTINATION_FOLDER AND SOURCE_FILE
- Build and run your package application.
If you have any questions let me know.
Regards,
Daniel