How to add customized dialog boxes to the setup project?

Answered How to add customized dialog boxes to the setup project?

  • Sunday, August 05, 2012 5:53 PM
     
     

    Hi,

    I'm trying to deploy a Windows Forms application that I just created. For the program to run, I need to configure some basic information during setup.

    I need to prompt the user for the information I need, and then pass that information to an .exe as command-line arguments. The .exe will run and do whatever needs to be done.

    The Visual Studio have some predefined dialog boxes that you could use to prompt the user for input. But here's the problem: I need to have a customized dialog box. Most of the predefined dialog boxes are either comprised of all Text boxes or all Check boxes, etc.

    What I need is to have a dialog box that consists of four text boxes, a combo box, a check box, and finally, two radio buttons.

    Can anyone tell me how can I do that? Please explain the process from A-Z. And please don't refer to this link: http://www.codeproject.com/Articles/18834/Create-custom-dialogs-for-use-in-your-Visual-Studi. I have seen it already, and I couldn't understand it. I need a simple solution.. Please!!!

    Regards

    Abdul

All Replies

  • Monday, August 06, 2012 10:06 AM
    Moderator
     
     

    Hi Abdul,

    Welcome to the MSDN Forum.

    I have moved this thread to ClickOnce forum for better support.

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Monday, August 06, 2012 6:34 PM
    Moderator
     
     Answered

    There is no simple solution because it's not simple in VS. There are a bunch of other tools that build MSI files that will let you build a custom dialog to add into the normal sequence up front, but Visual Studio isn't one of them. Even if you added the dialogs, there's no functionality that will let you run code when the user clicks the Next button, so you can't verify the input. 

    Whether your MSI tool will let you do it or not, my usual recommendation is to take this out of the setup and put in the actual app. I've seen developers throw this over the fence to setup builders because they don't want to do configuration work. I've seen setups that do this, but then the user wants to change the configuration, so you ask them to uninstall the app and reinstall so that they can change a port or server or database name? Sheesh. Another point is that doing this during a setup is not the same - for example, custom actions run with the local system account and can't connect to remote servers or databases with Windows Authentication.  Plus testing and debugging this as something in the app will be a whole bunch easier than during the setup.


    Phil Wilson

    • Marked As Answer by Abdul A. Ali Wednesday, August 08, 2012 6:50 AM
    •  
  • Wednesday, August 08, 2012 6:49 AM
     
     
    Hi Phill,

    Thanks for responding. Your solution seems to be the easiest. Now, I have managed to go around the custom dialogs by embedding some of the functionality into the actual application.

    Thanks again!

    Abdul