Hi,
Can any1 tell me how to create custom dialog item i.eWID 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 | | Mahender Tuesday, January 06, 2009 2:27 PM | Hi Mahender,
I perform a test on this issue and succeed in customizing the VsdFolderDlg.wid. Now I'm able to specify two installationdirectorywhen 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. Iname the new editbox "FolderEdit2" and new browse button "BrowseButton2".
3. In the row for the FolderEdit2, specify a propertyunder 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 toadd 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 pathas 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. Addthiscustom dialog justafter 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 - Marked As Answer byLinda LiuMSFT, ModeratorWednesday, January 21, 2009 6:32 AM
-
| | Linda Liu Friday, January 16, 2009 7:27 AM | 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 | | Linda Liu Wednesday, January 07, 2009 4:06 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 | | Mahender Wednesday, January 07, 2009 6:21 AM | 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 | | Mahender Wednesday, January 07, 2009 2:07 PM | 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 | | PhilWilson Wednesday, January 07, 2009 8:36 PM | 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 | | Linda Liu Sunday, January 11, 2009 7:48 AM | thnx for reply,
but i cud not find any control withSelectFolderDialog.wid in VSDFolderDlg. Im developing windows Application.Can u please tell me location of WID file.
Mahender | | Mahender Monday, January 12, 2009 11:19 AM | Hi Mahender,
> but i cud not find any control withSelectFolderDialog.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
| | Linda Liu Tuesday, January 13, 2009 6:08 AM | Hi Mahender,
I perform a test on this issue and succeed in customizing the VsdFolderDlg.wid. Now I'm able to specify two installationdirectorywhen 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. Iname the new editbox "FolderEdit2" and new browse button "BrowseButton2".
3. In the row for the FolderEdit2, specify a propertyunder 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 toadd 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 pathas 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. Addthiscustom dialog justafter 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 - Marked As Answer byLinda LiuMSFT, ModeratorWednesday, January 21, 2009 6:32 AM
-
| | Linda Liu Friday, January 16, 2009 7:27 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. | | DaveyP Friday, July 24, 2009 9:55 AM |
|