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
.
Once you create the UI file, you have to place the file under C:Program Files (x86)Microsoft Visual Studio 10.0Common7ToolsDeploymentVsdDialogs1033
(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"];
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…