Use Orca to create a custom dialog box in Visual Studio installation project

Source: Internet
Author: User

I. background

Using Visual Studio to install a program is convenient and quick, but the dialog box that can be used during the creation process is limited:

Start nodes: "Start Screen", "welcome", three "single button", three "check boxes", three "text boxes", "installation folder" (or "installation address ") and "Confirm installation ".

Ii. Solutions

You can use the Orca tool to create a custom dialog box. Orca is a Windows Installer database table editor provided by Microsoft. You can edit Windows Installer database files (. msi) file, Merge Module (. msm) files, patches (. msp) file, internal consistency Computing Program (. cub) file and patch creation attributes (.. It is the best auxiliary tool for modifying and localized Windows Installer databases.
The installation project of Visual Studio is in the directory % ProgramFiles % \ Microsoft Visual Studio 8 \ Common7 \ Tools \ Deployment \ VsdDialogs.

The wid file in the open dialog box using Orca is displayed as follows:

There are several tables:

1. Dialog

It mainly defines the dialog box, including the height, width, title, and button order of the dialog box. For more information, see http://msdn.microsoft.com/en-us/library/aa368286 (v = VS.85). aspx

2. Control

Is a list of controls in the dialog box, including the control's identity, the corresponding dialog box (for specific type definition see MSDN: http://msdn.microsoft.com/en-us/library/aa368039 (v = VS.85). aspx), location, size, type, etc. For more information, see http://msdn.microsoft.com/en-us/library/aa368286 (v = VS.85). aspx.

3. ControlCondition

The condition that describes the dialog box. For more descriptions, see http://msdn.microsoft.com/en-us/library/aa368035 (v = VS.85). aspx.

4. ModuleConfiguration

Configuration related to the description dialog box, including name, format, type, value range, default value, text, description, etc.

5. ModuleDialog

Description Dialog Box identifier, display name

6. ModuleSignatue

The ID and language of the description dialog box.

7. ModuleSubstitution

Description table: A ing table of row values.

Iii. Example

A simple description of the process of creating a dialog box with five check boxes.

1. Copy "VsdCustomCheck1Dlg. wid" from the ProgramFiles % \ Microsoft Visual Studio 8 \ Common7 \ Tools \ Deployment \ VsdDialogs \ 0 directory and change it to "VsdCustomCheck4Dlg. wid ".

2. Use the Orca tool to open the "VsdCustomCheck4Dlg. wid" file. In order not to conflict with the original file, change all "CheckboxA" to "CheckboxD" (you can replace Ctrl + Shift + F ).

3. Add "CheckBox5" to the "Control" table ":

4. Add ControlAction:

5. Set ModuleConfiguration. Note that the built-in configuration is set through "# + number". These configurations can also be directly used in text.

6. Set ModuleSubstitution:

7. Set the ModuleId: button to directly generate the Guid:

8. view the preview effect: "Tools"-"dialog box preview"

9. To display it in Visual Studio, copy "VsdCustomCheck4Dlg. wid" to the 1033 directory and set the Language:

10. Restart Visual Studio and you will see the custom dialog box "Checkboxes (D)" in the Add dialog box )":

 

11. Add it to the startup node and view its attributes:

12. test:

Download the custom dialog box

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.