一旦出现第一个对话框(欢迎),是否有任何方法可以在WIX中执行自定义操作?
要求是检查先决条件,其中一些需要自定义操作。
自定义操作可以在我们点击下一个对话框时执行,但是标准的WIX prereqs是由我们自定义的prereq决定的。
(我们需要的自定义操作是检查IIS 6元数据库兼容性是否已打开,而registrysearch在装有32位安装程序的x64计算机上无效)
我使用这样的东西…
<InstallExecuteSequence> <Custom Action="CA_DoSomething" After="FindRelatedProducts"> <![CDATA[1]]> </Custom> </InstallExecuteSequence> <InstallUISequence> <Custom Action="CA_DoSomething" After="FindRelatedProducts"> <![CDATA[1]]> </Custom> </InstallUISequence> <CustomAction Id="CA_DoSomething" Error="Error message goes here" />
添加如下内容:
<Custom Action="MyCustomAction" Before="FindRelatedProducts">1</Custom>