When someone upgrades to the newer version of the software, I want to copy the file (UpgradeScripts.sql) and paste it in the ProgramFiles/Pharm/Database folder on the installed PC. I am using Wix CustomActions to do this. When I try to do so, it's complaining as follows. How can I do this?
The CustomAction/@BinaryKey attribute cannot coexist with a previously specified attribute on this element. The CustomAction element may only have one of the following source attributes specified at a time: BinaryKey, Directory, FileKey, Property, or Script.
This is my code. I want to copy the UpgradeScripts.sql file in the Release folder and after installation I want to put it in the ProgramFiles/Pharm/Database folder of the ProgramFiles.
<CustomAction Id="CopyFileToInstalledProgramFiles" Directory="Database" BinaryKey="CustomActionUpgradeScriptsBinary" DllEntry="CustomAction" Execute="deferred" Impersonate="no" Return="check"/>
<Binary Id="CustomActionUpgradeScriptsBinary" SourceFile="$(var.ReleaseFolder)\Database\UpgradeScripts.sql"/>