1

InstallShield-2009 Premier:基本的 msi 项目:

当我希望在卸载期间用户单击取消按钮时运行自定义操作时该怎么办?

我放置了一个自定义操作(一个仅显示消息框的 C# exe)

动作类型:

Type: Launch an executable

Location: Stored in the Binary table

动作参数:

Source: exe path

Target: a b c (doesn't matter, I don't need it)

附加选项:

Return Processing: Synchronous (Check exit code)

Run Only During Path Uninstall: unchecked

响应选项:

In-Script Execution: Rollback Execution in System Context

Executing Scheduling: disabled

插入序列:

Install UI-Sequence: <Absent from sequence>

Install Execute Sequence: After InstallServices (what should I set here?)

Install Execute Condition: (do I need to set? I left it blank)

但是当我取消卸载时它没有触发消息框。如何?

4

2 回答 2

1

您可能想尝试将事件绑定到对话框的“取消”按钮。在 Installation Designer 中,转到 User Interface>Dialog,找到 SetupProgress 并在行为中将事件添加到 Cancel PushButton。我没试过,但值得一试。

于 2011-05-12T16:37:33.910 回答
0

回滚自定义操作应在它们回滚的操作之前安排。由于您要处理任何回滚,您可以在 InstallExecuteSequence 中的 InstallInitialize 之后安排操作。

这样,当用户在实际开始安装后取消安装时,它将始终运行。

请注意,在进程实际开始之前取消安装时,不能使用回滚自定义操作(显示进度条)。为此,您需要在该特定取消按钮上设置一个控制事件。

于 2011-05-13T06:05:39.930 回答