0

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"/>

1 Answer 1

1

Just use the File elements to install the file instead. The Windows Installer is good at installing files, way better than you will be with a CustomAction.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.