How to call custom action after files copied in wix

Rikin Patel picture Rikin Patel · Jul 5, 2012 · Viewed 13k times · Source

I want perform custom action after files are copy in destination folder.

In custom action i run copied script file so give me error file not found.

<CustomAction Id="RunDBScript"
              BinaryKey="CA"
              DllEntry="RunDBScript"
              Execute=" immediate"
              Return="check" />


<Custom Action="RunDBScript" After="InstallFiles">
    <![CDATA[NOT Installed]]>
  </Custom>

this custom action give an error file/directory not found. so this action call before file copy.

so, how to call custom action after file copy?

I am not understand why this custom action call before InstallFiles even though i am specified After="InstallFiles".

Answer

cosmin picture cosmin · Jul 6, 2012

Move your custom action after InstallFinalize. This is the only place in InstallExecuteSequence where Immediate actions can be executed after installing the product files.