How to create a custom action for a text box validation in InstallShield 2013 using managed code?

时间:2015-07-08 15:51:42

标签: c# validation installshield managed installshield-2013

I have some C# code for validating a setting in my application. I would like to add a wizard page to change this setting. The earlier the user sees the setting the better their life will be. Is it possible to write a custom action in C# that will validate a textbox? If so, how?

The solution needs to be part of a Suite Project.

I did review the "Managed Custom Actions" sample project (and the other samples) but didn't see anything that applied to my situation. The textbox's Validation property has a drop down which includes a "browse for DLL Action." Selecting the DLL from this Managed Custom Action results in stating there are no exported actions.

I keep finding hints on the internet, InstallShield's help and the user guide. Unfortunately, most of what I'm finding are for building custom actions for events in Basic MSI projects.

1 个答案:

答案 0 :(得分:0)

目前在UI中可以完成的工作与Suite项目中的Actions视图可以完成的工作之间存在分歧。在这种情况下,UI可以调用验证操作,这些操作可以来自C ++ DLL,但它不直接支持托管代码。 “操作”视图支持处理托管代码,但没有任何与验证相关的事件。

因此,总而言之,目前不支持您请求的内容。您可以通过在C ++中编写主机来调用托管代码,但此时您最好只用C ++编写验证本身。