Costanzo Ferraro
Costanzo Ferraro

Reputation: 179

Run wix custom action before installing files

I should need to run a C++ wix custom action before file installation starts. Is it possible? My code is

    <InstallUISequence>
    <Custom Action ="_EE10247D_B1B7_42F9_8BC9_A973E5755689" Before ="InstallFiles"></Custom>
    </InstallUISequence>
    <CustomAction Id="_EE10247D_B1B7_42F9_8BC9_A973E5755689" Execute="deferred" Impersonate="no" FileKey="FileDllId" adx:VSName="GuidAutoGen" DllEntry="GuidAutoGen" />

but the error message is "error LGHT0094: Unresolved reference to symbol 'WixAction:InstallUISequence/InstallFiles' in section 'Product:{C095BA7A-0E1E-4679-AAC0-3C17C82BC5EA}"

What's wrong?

Upvotes: 4

Views: 8365

Answers (2)

Anton Sutarmin
Anton Sutarmin

Reputation: 847

Linker tells you absolutely true. "InstallUISequence" has no step "InstallFiles". This step presented in another sequence, "InstallExecuteSequence". This sequence executes after InstallUISequence. In your case, you should write instead of your code:

<InstallExecuteSequence>
   <Custom Action ="_EE10247D_B1B7_42F9_8BC9_A973E5755689" Before ="InstallFiles"></Custom>
</InstallExecuteSequence>

Upvotes: 5

PhilDW
PhilDW

Reputation: 20780

Well yes, you just sequence it before the InstallFiles action, in deferred mode. You might need to expand your question if you need more detail.

Upvotes: 1

Related Questions