2
votes

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?

2

2 Answers

4
votes

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>
1
votes

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.