简体   繁体   English

如果对话框文本框无效/无值,如何禁用MSI中的下一个按钮?

[英]How to disable next button in msi if Dialog textbox has invalid/no value?

I have a Text Box in MSI Project and I want to validate whether it is Filled or Empty 我在MSI Project中有一个文本框,我想验证它是否已填充或为空

if empty next button has to be in disable state else it has to continue.how to do this 如果下一个空按钮必须处于禁用状态,则必须继续操作。

在此处输入图片说明

Thanks in Advance 提前致谢

Windows Installer has a table called the ControlCondition table . Windows Installer有一个称为ControlCondition表的表 Using this table you can create conditions that Enable, Disable, Hide and/or Show a control. 使用此表,您可以创建启用,禁用,隐藏和/或显示控件的条件。 However, the tool you are using doesn't expose this underlying feature of Windows Installer. 但是,您使用的工具没有公开Windows Installer的此基本功能。 This is one of the many, many reasons Visual Studio Deployment Projects were removed from Visual Studio 2010. 这是从Visual Studio 2010中删除Visual Studio部署项目的众多原因之一。

There are hack ways of using postbuild events to run SQL commands against the built MSI to inject the functionality but I don't recommend this. 有一些hack方法可以使用postbuild事件来针对内置的MSI来运行SQL命令以注入该功能,但是我不建议这样做。 It's like tweaking the MSIL of a built assembly because C# didn't support something that CLR could do. 这就像调整已构建程序集的MSIL一样,因为C#不支持CLR可以做的事情。

just google orca table editor and download this tool using this you can view the database that @Christopher is talking about. 只是google orca table editor并使用此工具下载该工具,您可以查看@Christopher在谈论的数据库。 You can do this by right clicking on the MSI that is generated after building your project and open with the Orca editor you will be given access to the entire database and please make sure you change the table mentioned by Christopher care fully as there is little or no validation when you make changes to this table. 您可以通过右键单击在构建项目并open with Orca editor open with后生成的MSI来执行此操作,您将可以访问整个数据库,并且请确保完全更改Christopher care提及的表,因为几乎没有对该表进行更改时不进行验证。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM