【发布时间】:2017-06-23 07:39:30
【问题描述】:
当使用 dark.exe 从 Installshield 处理 MSI 文件时,它会在从 Visual Studio 2013 构建时生成一个包含多个错误实例的文件:
Unresolved reference to symbol 'CustomAction:CleanUp'
部分wxs文件为:
<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="&Finish" TabSkip="no" Default="yes" Cancel="yes">
<Publish Event="DoAction" Value="CleanUp">ISSCRIPTRUNNING="1"</Publish>
<Publish Event="DoAction" Value="LaunchProgramFileFromSetupCompleteSuccess">LAUNCHPROGRAM And PROGRAMFILETOLAUNCHATEND <> "" 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>
查看带有 ORCA 的 MSI 文件,在表 CustomAction 中包含 LaunchProgramFileFromSetupCompleteSuccess 条目(不会引发错误)并且没有 Cleanup 条目,因此 dark.exe 在创建一组 CustomAction 时表现一致,如下所示:
<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 "[MsiLogFileLocation]"" Return="asyncNoWait" />
<CustomAction Id="LaunchProgramFileFromSetupCompleteSuccess" BinaryKey="NewBinary19" DllEntry="LaunchProgram" />
<CustomAction Id="ISPrint" BinaryKey="SetAllUsers.dll" DllEntry="PrintScrollableText" />
我应该如何处理这个问题?
【问题讨论】: