Install Shield,如何检查退出代码但不显示错误?

时间:2021-07-01 22:38:19

I have a custom action that runs in the very beginning of my Install Shield Project. I check the exit code on this custom action because it is a form that has a next and cancel button, if the user cancels the install should NOT proceed, if they select next it should (thus I check the exit code). However I don't want the user to see an install-Shield error message when they select cancel. Is there anything I can do? I have install shield 2010

我有一个自定义操作,它在我的Install Shield项目的最开始运行。我检查了这个自定义操作的退出代码,因为它是一个具有next和cancel按钮的表单,如果用户取消安装不应该继续,如果他们选择下一个它应该(因此我检查退出代码)。但是,我不希望用户在选择取消时看到install-Shield错误消息。有什么我可以做的吗?我已经安装了盾牌2010

1 个解决方案

#1


4  

EXE custom actions can only succeed or fail (zero or non-zero return code). MSI DLL custom actions can set properties (that future actions can condition on), and return one of several status indicators including success, failure, or user cancelled. If you have to use an EXE (say because it was provided to you), you will likely need to wrap it in a MSI DLL custom action to do what you want. Or, if possible, it may be a lot better to rewrite the EXE as a DLL.

EXE自定义操作只能成功或失败(零或非零返回代码)。 MSI DLL自定义操作可以设置属性(将来的操作可以进行操作),并返回多个状态指示符之一,包括成功,失败或用户取消。如果您必须使用EXE(因为它是提供给您的),您可能需要将其包装在MSI DLL自定义操作中以执行您想要的操作。或者,如果可能的话,将EXE重写为DLL可能要好得多。

#1


4  

EXE custom actions can only succeed or fail (zero or non-zero return code). MSI DLL custom actions can set properties (that future actions can condition on), and return one of several status indicators including success, failure, or user cancelled. If you have to use an EXE (say because it was provided to you), you will likely need to wrap it in a MSI DLL custom action to do what you want. Or, if possible, it may be a lot better to rewrite the EXE as a DLL.

EXE自定义操作只能成功或失败(零或非零返回代码)。 MSI DLL自定义操作可以设置属性(将来的操作可以进行操作),并返回多个状态指示符之一,包括成功,失败或用户取消。如果您必须使用EXE(因为它是提供给您的),您可能需要将其包装在MSI DLL自定义操作中以执行您想要的操作。或者,如果可能的话,将EXE重写为DLL可能要好得多。