如何额外的自定义窗口添加到VS安装项目UI流 [英] How to add additional custom window to VS setup projects UI flow

查看:872
本文介绍了如何额外的自定义窗口添加到VS安装项目UI流的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用VS 2008的安装项目部署我的应用程序的客户端计算机。
现在我需要添加自定义UI窗口以获取建立过程中的一些信息表用户。
为例,应该有目标文件夹搜索窗口中单击下一步按钮后,输入用户信息的表格。

I'm using a VS 2008 setup project to deploy my application to client computer. Now I need to add custom UI Window to get some information form user for set up process. As example, there should be a form to enter user information after click next button of the destination folder search window.

我怎样才能做到这一点?

How can I do this?

推荐答案

如果你想在MSI部署过程中使用自定义用户界面,以获取用户输入的最好的方法是创建。 WID 扩展名的文件。这是您在MSI安装过程中看到的UI文件类型(的您选择安装路径等的)。尽管视觉工作室不具备的功能来创建这些有微软工具,你可以用它来创建这些文件的UI文件。一个最好的工具是 ORAC

If you want to get user input using custom UI during the MSI deployment best approach is to create the .wid extension files. this is the type of UI files that you see during the MSI installation(where you select the installation path etc). Even though visual studio doesn't have features to create these UI files there are Microsoft tools you can use to create these files. One of the best tool is Orac.

一旦你创建UI文件,你必须把在 C:\Program文件(x86 )\Microsoft的Visual Studio 10.0\Common7\Tools\Deployment\VsdDialogs\1033 (这是其中MSI从挑选默认的UI文件)

Once you create the UI file, you have to place the file under C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\Deployment\VsdDialogs\1033 (it's where MSI picks the default UI files from)

之后,你应该能够选择自定义用户界面,并在安装周期的任何阶段注入它(beforeinstall,安装afterinstall等)。然后,你可以传递值的用户已进入文本字段作为安装程序类的说法。然后你可以通过阅读上下文参数安装程序类中的值

After that you should be able to select your custom UI and inject it during any phase of installation cycle(beforeinstall, install, afterinstall etc). Then you can pass the value user has entered into the text field as a argument for installer class. Then you can read the value within the installer class using context parameter.

string value = Context.Parameters["ParameterName"];

这篇关于如何额外的自定义窗口添加到VS安装项目UI流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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