how to create custom dialog and integrate into my setup

Answered how to create custom dialog and integrate into my setup

  • Tuesday, January 06, 2009 2:27 PM
     
     
    Hi,

    Can any1 tell me how to create custom dialog item i.e WID File and tht to my setup project.

    Actually requirement ,I need to add FolderBrowse Dialog during installation.I could able to accomplish ,But it is coming up as a popup and another problem is folder browse dialog is not focused,it will be background or behind screen.where
    user is unable to identify folder broswe dialog item..

    Can any 1 Give me small sample application of creating WID file.......


    With regards,
    mahender

    Mahender

All Replies

  • Wednesday, January 07, 2009 4:06 AM
    Moderator
     
     

    Hi Mahender,

    You need to use the tool Orca to get what you want. The following is a sample to do this:

    "Create custom dialogs for use in your Visual Studio Setup projects"
    https://secure.codeproject.com/KB/install/vsSetupCustomDialogs.aspx?display=PrintAll&fid=419622&df=90&mpp=25&noise=3&sort=Position&view=Quick&select=2817377&fr=1

    Hope this helps.

    Sincerely,
    Linda Liu

  • Wednesday, January 07, 2009 6:21 AM
     
     
    Hi Linda,

    Thnx for reply...welll i gone thru tht site prev ,but i could find proper steps in tht...any other site u come across

    With Regards,
    Mahender

    Mahender
  • Wednesday, January 07, 2009 2:07 PM
     
     
    When i try to edit vsdfolderdlg.wid,when look into preview im getting message box with following text 
    "1:2810 2: FolderForm 3: Browse Button 4: Folder Edit 5: Folder Label"

    Not sure is it error or it shows like tht

    With Regards,
    Mahender


    Mahender
  • Wednesday, January 07, 2009 8:36 PM
    Moderator
     
     

    Could you describe the problem you're trying to solve?

    I think nearly every install I've ever seen has a single browse for the primary application install folder. Other files go to sensible common locations (such as common files folder, application data etc) and don't need the user to specify.


    Phil Wilson
  • Sunday, January 11, 2009 7:48 AM
    Moderator
     
     

    Hi Mahender,

    I open the %ProgramFiles%\Microsoft Visual Studio 8\Common7\Tools\Deployment\VsdDialogs\VsdFolderDlg.wid in Orca and select menu Tools | Dialog Preview. The content of the FolderForm is displayed in a tree structure in the Dialog Preview dialog. You mentioned that you got a message box when you preview the dialog and it seems that something is wrong in the dialog.

    > Actually requirement ,I need to add FolderBrowse Dialog during installation.

    Visual Studio has provided a standard dialog called "SelectFolderDialog" for the user to select a folder during installation. You can use this dialog directly in your MSI package. You may refer to the way the FolderForm uses the SelectFolderDialog to get started.

    Hope this helps.

    Sincerely,
    Linda Liu

  • Monday, January 12, 2009 11:19 AM
     
     
    thnx for reply,

    but i cud not find any control with SelectFolderDialog.wid in VSDFolderDlg. Im developing windows Application.Can u please tell me location of WID file.

    Mahender
  • Tuesday, January 13, 2009 6:08 AM
    Moderator
     
     

    Hi Mahender,

    > but i cud not find any control with SelectFolderDialog.wid in VSDFolderDlg

    I don't mean there's a SelectFolderDialog.wid file. Open VsdFolderDlg.wid in Orca and navigate to the ControlEvent table. You can find a row for the BrowseButton's SpawnDialog event and the value under the Argument column is SelectFolderDialog.

    VS doesn't expose the SelectFolderDialog as VsdFolderDlg, but we can use this dialog directly in our MSI package by specifying its name as the VsdFolderDlg does.

    Hope this helps.

    Sincerely,
    Linda Liu

  • Friday, January 16, 2009 7:27 AM
    Moderator
     
     Answered
    Hi Mahender,

    I perform a test on this issue and succeed in customizing the VsdFolderDlg.wid. Now I'm able to specify two installation directory when installing a product.

    The following is the walkthrough of my test.
    1. Open %Visual Studio folder%\Common7\Tools\Deployment\VsdDialogs\1033\VsdFolderDlg.wid with Orca.

    2. Since we'd like to add a editbox and a button in the folder dialog, we need to add two rows for these two controls in the Control table. I name the new editbox "FolderEdit2" and new browse button "BrowseButton2".

    3. In the row for the FolderEdit2, specify a property under the Property column. I name it "DATAFILEDIR".

    4. Because the FolderEdit2 is now the next control of the BrowseButton, change the ControlNext property of the BrowseButton to FolderEdit2.

    5. In the ControlEvent table, add two rows for the "SpawnDialog" and "[SelectFolderDialog_Property]" events of BrowseButton2.

    6. Since "DATAFILEDIR" is used as a directory, we need to add a row for it in the Directory table.

    7. Change the display name of the custom dialog. To do this, navigate to the ModuleDialog table and change the value under the DisplayName column. I change the value to "Custom Installation Folder".

    8. Save as VsdCustomFolderDlg.wid(this file is saved in the same path as VsdFolderDlg.wid file).

    9. Open a setup project in Visual Studio.

    10. In the User Interface editor, right click on the Install | Start node and choose "Add Dialog". "Add Dialog" window opens with the "Custom Installation Folder" dialog in it. Add this custom dialog just after the Welcome dialog in the User Interface editor.

    11. In the File System editor, add a custom folder in it. Change the "Property" of this custom folder to "DATAFILEDIR". Add a file to this custom folder, e.g. test.txt.

    12. Build the setup project and install the resulting MSI package. In the "Select Installation Folder" dialog, two editbox and two browse buttons show. Specify a path in the second editbox, e.g. d:\myfolder, and then the test.txt file is installed in the path "d:\myfolder".

    If you want the VsdCustomFolderDlg.wid file, I can send it to you.

    Hope this helps.
    If you have any question, please feel free to let me know.

    Sincerely,
    Linda Liu
  • Friday, July 24, 2009 9:55 AM
     
     
    Hi,

    Basically, what I am trying to achieve is to create a custom dialog that allows a user to specify the location of an ini file on the client machine. This ini file then has to be modified as part of the install. I am not sure as to the best way to go about this. From what I can gather, the above example is more to do with creating a directory on the client machine, and copying files to it. All I want to do is to allow the user to specify a file location, and then get hold of this value to perform a custom action. Any ideas would be greatly appreciated.

    Thanks.
  • Wednesday, December 02, 2009 5:20 AM
     
     
    Hi linda


    I want to create sql custom dialog using orca....

    once  will you please send me the VsdCustomFolderDlg.wid file so that i can start working on it...

    Can you help me.....

    I have opened new thread for my question...you can find in the following location
    http://social.msdn.microsoft.com/Forums/en-US/vssetup/thread/157fc328-2eb1-4436-8a14-748e90599a29


    Thanks
    Madhu

    Madhu Sandeep
  • Saturday, March 27, 2010 2:31 AM
     
     

    Thanks a lot for your help but it didn't work for me. i have the 2704 error in install.

    Can you sent me the VsdCustomFolderDlg.wid file because it's urgent.

    Thank you

  • Thursday, February 03, 2011 11:47 AM
     
     
    Hi Linda,

    I created a custom dialog using "VsdCustomText2Dlg.wid" and named it "TimeOutWorkingPath.wid".

    This has a a browse button with two textboxes. The other two are set as invisible

    I changed the width of of EDIT2 and added a browse button in the control table as

    TimeOutWorkingPath BrowseButton2 PushButton 276 156 90 18 3 {\VSI_MS_Sans_Serif13.0_0_0}Browse... Label3 |

    Modified the entry for Edit2 to have next_control as BrowseButton2

    TimeOutWorkingPath Edit2 Edit 18 156 250 18 7 DATAFILEDIR {\VSI_MS_Sans_Serif13.0_0_0} BrowseButton2 |

    Then I added 3 entries in ControlEvent Table

    TimeOutWorkingPath BrowseButton2 SpawnDialog SelectFolderDialog 1 1
    TimeOutWorkingPath BrowseButton2 [SelectFolderDialog_Property] DATAFILEDIR 1 0
    TimeOutWorkingPath NextButton SetTargetPath DATAFILEDIR 1 0

    The last entry on the NextButton does not seem to make any difference to the outcome even if I remove it

    Since DATAFILEDIR is not present I have added a Directory Table and added the following entries

    TARGETDIR "" SourceDir
    DATAFILEDIR TARGETDIR temp

    The Folder Dialog opens up and I am able to browse to folders but on OK click the value is not set to the EDIT2 box.

    Is there something that i have missed? Any additional entries to be made in the CustomAction Table or any other table?

    Any help is appreciated.

    Thanks in advance,
    Swaroop
  • Thursday, August 02, 2012 5:58 PM
     
     

    Linda

    Please forgive my bluntness, but I fear there is no other way to say this:

    1. You don't seem to be able to speak or write proper English

    2. Your instructions are missing key steps in order to make the WID available when you add a custom dialog to a Visual Studio setup project. You must edit a bitmask on the WID entries so that Visual Studio picks it up. You may also have to make a copy of it in another folder

    3. Accurate instructions are provided by this article: http://www.codeproject.com/Articles/18834/Create-custom-dialogs-for-use-in-your-Visual-Studi but you still have to figure out what to do to get the custom dialog to work. Using VsdFolderDlg.wid is a good start

    4. Thou the documentation is scarce, you will find this helpful when reading through WID files: http://msdn.microsoft.com/en-us/library/aa368259.aspx

    5. The ORCA tool is bundled in with the Windows SDK (so don't expect it to be installed just because you installed visual studio)

    Best regards



    • Edited by ndiazaragon Thursday, August 02, 2012 6:02 PM
    • Edited by ndiazaragon Thursday, August 02, 2012 6:08 PM
    •  
  • Thursday, November 29, 2012 10:47 AM
     
     

    Dear Linda.

    I have tried all steps but no luck. Can you please send me the VsdCustomFolderDlg.wid file. I will be really thankful to you.

    With best wishes,

    Waheed