Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
285 views
in Technique[技术] by (71.8m points)

c# - .net Setup Project: How to pass multiple CustomActionData fields

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.

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:

enter image description here

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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"


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...