Search code examples
visual-studiovisual-studio-2015windows-installerinstallationvisual-studio-setup-proje

Microsoft Visual Studio 2015 Installer custom button


I need to create an installer for a web project in VS with Microsoft Visual Studio 2015 Installer Projects where the user who performs the installation the installer asked for the data of connection to the database with two textbox, in these 2 textBox i need the user through a "Test Connection" button to verify this connection before the user continues to the next step of the installation.

enter image description here

How can I do this button in the installer and apply the logic to validate if the connections that the user entered in the installer are correct?

looks like

enter image description here

thank you very much I am new in this

am using Visual Studio 2015 Proffessional


Solution

  • There's no support in Visual Studio setup projects for validating user input in that UI sequence. In other words VS setup projects don't support custom action calls from the UI sequence (although other tools do).

    It's common for this type of thing to be delegated to the setup, but in practice it often works better to just let the app install and then have the app do the configuration and any testing of IP addresses. After all I doubt that the install needs that IP to be up and running, it's the app that needs it.

    Also, there may be a need for the IP to change, or the user and password. And if you actually entered a user name and password into that dialog there is no support in VS setups for securing that data, therefore the password is exposed.