.NET安装项目:如何通过多个CustomActionData领域 [英] .net Setup Project: How to pass multiple CustomActionData fields

查看:278
本文介绍了.NET安装项目:如何通过多个CustomActionData领域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在一个.NET安装项目,就可以在安装向导中添加一个或多个自定义屏幕,用字段(如文本框),用户可以输入其他安装参数。

In a .net "Setup Project", it is possible to add one or more custom screens in the setup wizard, with fields (e.g. text boxes) where the user can enter additional installation parameters.

自定义字段可以被传递到自定义操作类库项目,来处理用户领域。下图显示了如何将财产服务器名称被映射到EDITB1文本字段:

A custom field can then be passed to a "Custom Action" class library project, to handle the user field. The image below shows how the property "ServerName" gets mapped to the EDITB1 text field:

在自定义操作类,访问该属性如下:

Within the Custom Action class, the property is accessed as follows:

string serverName = Context.Parameters["ServerName"];

问:一个人如何可以指定多个属性(多个文本框)的自定义操作

Question: how can one specify multiple properties (for multiple text boxes) to the Custom Action?

推荐答案

根据该的文档 CustomActionData 关于传递多个值:

As per the documentation for CustomActionData regarding passing multiple values:

多个值必须用一个空格隔开。如果值中有空格,它必须用引号括起来:/名称=值

Multiple values must be separated by a single space: /name1=value1 /name2=value2. If the value has a space in it, it must be surrounded by quotation marks: /name="a value"

这篇关于.NET安装项目:如何通过多个CustomActionData领域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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