简体   繁体   中英

Validate User Input during installation using VS Installer

I am creating an msi using VS installer but I've run into a problem. What I need to do is take input from the user, a server name/port and username/passsword. Once I have this I need to verify that they are correct then continue with the installation r return to the input page. I've tried using Windows Forms Project as a Custom Action but I have to use static linking for this msi so that is not possible. I have the code written (c++) to validate all the credentials I just need a way to revert back to the input screen if they are incorrect. Does anyone have any suggestions?

Greetings, KB

First you need to make sure that your custom action can receive the installation handle: http://www.codeproject.com/KB/install/msicustomaction.aspx

After that, configure your custom action to set an installer property based on the validation result. This property can then be used to control the dialog. Perhaps this will help: http://setupanddeployment.com/installation-user-interface/validate-user-input-installation/

What you need to do requires access to control events , so it's not really doable in a Visual Studio setup project. You can try using a different setup authoring tool which offers more control over the installation UI: http://en.wikipedia.org/wiki/List_of_installation_software

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM