简体   繁体   中英

Unresolved reference to CustomAction:Cleanup in WiX

When processing an MSI file from Installshield with dark.exe it generates a file with multiple instances of the error when built from Visual Studio 2013:

Unresolved reference to symbol 'CustomAction:CleanUp'

Part of the wxs file is:

          <Dialog Id="SetupCompleteSuccess" X="50" Y="50" Width="374" Height="266" Title="[ProductName] - InstallShield Wizard" NoMinimize="yes">
            <Control Id="OK" Type="PushButton" X="230" Y="243" Width="66" Height="17" Text="&amp;Finish" TabSkip="no" Default="yes" Cancel="yes">
                <Publish Event="DoAction" Value="CleanUp">ISSCRIPTRUNNING="1"</Publish>
                <Publish Event="DoAction" Value="LaunchProgramFileFromSetupCompleteSuccess">LAUNCHPROGRAM And PROGRAMFILETOLAUNCHATEND &lt;&gt; "" And NOT Installed</Publish>
                <Publish Event="EndDialog" Value="Exit">1</Publish>
                <Publish Event="DoAction" Value="ShowMsiLog">MsiLogFileLocation And (ISSHOWMSILOG="1") And NOT ISENABLEDWUSFINISHDIALOG</Publish>
            </Control>

Looking at the MSI file with ORCA, in table CustomAction contains an entry for LaunchProgramFileFromSetupCompleteSuccess (which does not throw an error) and no entry for Cleanup, so dark.exe is behaving consistently as it creates a set of CustomActions as follows:

       <CustomAction Id="ISPreventDowngrade" Error="[IS_PREVENT_DOWNGRADE_EXIT]" />
    <CustomAction Id="ISRunSetupTypeAddLocalEvent" BinaryKey="ISExpHlp.dll" DllEntry="RunSetupTypeAddLocalEvent" />
    <CustomAction Id="ISSelfRegisterCosting" BinaryKey="ISSELFREG.DLL" DllEntry="ISSelfRegisterCosting" />
    <CustomAction Id="ISSelfRegisterFiles" BinaryKey="ISSELFREG.DLL" DllEntry="ISSelfRegisterFiles" Execute="deferred" Impersonate="no" />
    <CustomAction Id="ISSelfRegisterFinalize" BinaryKey="ISSELFREG.DLL" DllEntry="ISSelfRegisterFinalize" />
    <CustomAction Id="ISUnSelfRegisterFiles" BinaryKey="ISSELFREG.DLL" DllEntry="ISUnSelfRegisterFiles" Execute="deferred" Impersonate="no" />
    <CustomAction Id="SetARPINSTALLLOCATION" Property="ARPINSTALLLOCATION" Value="[INSTALLDIR]" />
    <CustomAction Id="SetAllUsersProfileNT" Property="ALLUSERSPROFILE" Value="[%SystemRoot]\Profiles\All Users" />
    <CustomAction Id="setAllUsersProfile2K" Property="ALLUSERSPROFILE" Value="[%ALLUSERSPROFILE]" />
    <CustomAction Id="setUserProfileNT" Property="USERPROFILE" Value="[%USERPROFILE]" />
    <CustomAction Id="ShowMsiLog" Directory="SystemFolder" ExeCommand="[SystemFolder]notepad.exe &quot;[MsiLogFileLocation]&quot;" Return="asyncNoWait" />
    <CustomAction Id="LaunchProgramFileFromSetupCompleteSuccess" BinaryKey="NewBinary19" DllEntry="LaunchProgram" />
    <CustomAction Id="ISPrint" BinaryKey="SetAllUsers.dll" DllEntry="PrintScrollableText" />

How should I deal with this problem?

Find in which dll ' Cleanup ' custom action is present and add a reference

<Binary Id="CleanupBinary" SourceFile="Your location of the CleanUp Dll" />
<CustomAction Id="CleanUp" BinaryKey="CleanupBinary" DllEntry="Your cleanup custom action name" />

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM