WIX 自定义操作调用在下一个之后 [英] WIX CUSTOM ACTION CALL AFTER NEXT

查看:29
本文介绍了WIX 自定义操作调用在下一个之后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在单击下一步"按钮时调用我的自定义操作 dll?目前我正在做的事情如下:

How can I make a call to my Custom Action dll when I click on Next button? Currently what I am doing is given below:

<CustomAction Id="TestingAction" BinaryKey="BIN_CustomAction" DllEntry="TestValue" Execute="deferred" Return="check" />
<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="&amp;Next"></Control>
<Custom Action="TestingAction" After="Next"></Custom> 

当我给出 After ="Next" 这是我的下一步按钮时,我在构建我的应用程序后收到错误.

When I given After ="Next" which is my Next button i am getting error after building my application.

未解决对符号WixAction:InstallUISequence/Next"的引用产品:*"部分.

Unresolved reference to symbol 'WixAction:InstallUISequence/Next' in section 'Product:*.

如何解决是问题,任何人都可以帮助我在单击下一步"按钮后如何调用 CustomAction.

How to resolve is issue and can anyone help me how to make a call to CustomAction after i click on Next Button.

推荐答案

你想要做的是将延迟的自定义操作安排到某个序列,并在名为 Next 的自定义操作之后运行它,这显然不存在.您应该采用完全不同的方式在按钮点击时调用自定义操作.

What you are trying to do is to schedule the deferred custom action to a certain sequence and run it after a custom action called Next, which obviously doesn't exist. You should go a totally different way to call custom action on button click.

请按照以下步骤操作:

  • 创建自定义操作.它必须是即时的 (execute='immediate') 并且永远不应该改变目标系统的状态
  • 创建一个 Control 元素 - 您想要触发事件的按钮
  • 最后,编写一个 Publish 元素作为 Control 的子元素,它发布 DoAction 事件
  • create a custom action. It must be immediate (execute='immediate') and should never ever change the state of the target system
  • author a Control element - the button you'd like to trigger the event
  • finally, author a Publish element as a child of the Control, which publishes the DoAction event

以下是来自 WiX 来源的完整示例,如何通过单击按钮打印 EULA:

Here's a full sample from the WiX sources how to print EULA on a button click:

<Control Id="Print" Type="PushButton" X="88" Y="243" Width="56" Height="17" Text="!(loc.WixUIPrint)">
  <Publish Event="DoAction" Value="WixUIPrintEula">1</Publish>
</Control>

显然,Control 元素应该是 Dialog 元素的子元素.自定义操作是这样定义的:

Obviously, the Control element should be a child of Dialog element. And the custom action is defined like this:

<CustomAction Id="WixUIPrintEula" BinaryKey="WixUIWixca" DllEntry="PrintEula" Return="ignore" Execute="immediate" />

希望这会有所帮助.

这篇关于WIX 自定义操作调用在下一个之后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆