How to add additional custom window to VS setup projects UI flow

戏子无情 提交于 2019-12-18 09:25:44

问题


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?


回答1:


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.

  • Orac.exe
  • How to use the Orca database editor to edit Windows Installer files

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)

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"];


来源:https://stackoverflow.com/questions/18913901/how-to-add-additional-custom-window-to-vs-setup-projects-ui-flow

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!