Microsoft KB Archive/832029

= Description of the Windows Installer PublishComponent table for Visio 2007 and for Visio 2003 =

Article ID: 832029

Article Last Modified on 4/17/2007

-

APPLIES TO


 * Microsoft Office Visio Professional 2007
 * Microsoft Office Visio Standard 2007
 * Microsoft Office Visio Professional 2003
 * Microsoft Office Visio Standard 2003

-



SUMMARY
This article discusses the Microsoft Windows Installer PublishComponent table and contains information about how third-party developers can use the PublishComponent table in a Microsoft Installer file (.msi) to publish content (templates, stencils, add-ons, and Help files) to Microsoft Office Visio 2007 and Microsoft Office Visio 2003.

There are two methods that you can use to publish content to Visio. In versions of Microsoft Visio that are earlier than Visio, Visio discovers installed content by searching a specific set of folder paths. In Visio, Visio provides a new method that can be integrated in the Setup programs that install Visio content. Setup programs that are created by third-party developers who use Windows Installer technology can publish descriptions of their Visio content to a special location on a user's computer by using the Windows Installer PublishComponent table in .msi files. This new method is somewhat more complicated. However, it is more powerful. All content that is native to Visio is published by using the published component method.

The path-discovered method that is used by versions of Visio that are earlier than Visio, is supported in Visio. However, because no actual Visio program content is published by using this method, by default, the paths of templates, stencils, add-ons, startup add-ons, and Help files are blank. You can set these paths for your content when you specify a semicolon-delimited list for the content that you want Visio to discover. Make sure that you do not change the file paths to point to content that is native to Visio. .

To view and to edit the PublishComponent table in an .msi file, use a table-editing tool such as the Orca database editor. Orca is included in the Windows Installer Software Development Kit (SDK). To obtain the Orca database editor, you must install the Core Software Development Kit (SDK) and the Windows Installer SDK. For more information about how to do so, visit the following Microsoft Web site:

http://www.microsoft.com/msdownload/platformsdk/sdkupdate/default.htm?p=/msdownload/platformsdk/sdkupdate/SDKInfo.htm

The advantages of using published content by using the PublishedComponent table when compared to content that is path-discovered include the following:
 * Only add-ons that are installed by the PublishComponent table are considered as installed in the Trust Installed check box on the Trusted Sources tab of the Security dialog box (on the Tools menu, point to Macros, and then click Security).
 * A higher degree of integration is available to third-party solutions. You can use add-ons, templates and stencils like “In the box” content and have more control of naming menu items that access your stencils, templates, and add-ons.
 * Increased performance for the discovery of add-ons. Enumerating published component is much faster than discovering content by searching folders on the hard disk, especially over a network.
 * More robust language-switching functionality.
 * Language fall-back support for localized solutions.
 * Support for both run-from-source and installed-locally configurations in content in the same product.
 * A cleaner solution for Web downloads that have to plug-in to the Visio interface.

Notification That Published Content Changed
An .msi file that publishes Visio content must indicate to Visio that the content changed after the third-party program is either installed or removed. By doing so, the Setup program makes sure that the new content appears in the interface when the program is installed and is removed from the interface when the program is removed. For performance reasons, Visio caches PublishComponent data. Visio does not regenerate the cache unless it is instructed to do so, or unless the cache is not present.

To instruct Visio to regenerate its cache, Setup programs must modify the current value of the Visio content update  registry value, , to a random, non-zero value:

Note Each time that the Setup program changes installed Visio content by either installing or removing templates, stencils, add-ons, or Help files, the registry value must be modified to use a different non-zero value.

Localization of Published Components
To publish localized versions of components, the locale ID in the Qualifier field must match the target language. Additionally, any data that is displayed in the Visio interface may also require localization.

In Visio 2003, you do not have to localize file names because all files are displayed in the interface with a name that is extracted from the AppData field.

Windows Installer PublishComponent Table
Note For Visio-specific data in the Qualifier and the AppData columns, the pipe character (&quot;|&quot;) is used to delimit sub-fields. The backslash character (&quot;\&quot;) can be used as a literal escape character. To insert a pipe character into the data as a non-delimiting character, insert a backslash character before the pipe character--for example, use “ \|“. To insert a backslash character, use consecutive backslashes--for example, use “\\”).

Publish Visio Templates and Stencils
Published templates (.vst and .vtx files) appear in the following locations in Visio:
 * On the submenu menu that appears when you point to New on the File menu.
 * On the Choose Drawing Type task pane
 * In automation. Use references to published templates to install-by-demand or repair templates as necessary. Documents.Add(“Basic Shapes.vst”) is an example of a reference to a published template.

Published stencils (.vss and .vsx files) appear in the following locations in Visio:
 * On the submenu that appears when you point to Shapes on the File menu.
 * In automation. Use references to published stencils to install-by-demand or repair stencils as necessary. Documents.Add(“Backgrounds.vss”) is an example of a reference to a published stencil.

Publish Add-ons
Published add-ons that are implemented in .vsl and .exe files appear in the following locations in Visio:
 * On the submenu that menu that appears when you point to Add-Ons on the Tools menu, and then click Run Add-On, or when you click the add-on from the Add-ons submenu.
 * On the Double-Click tab of the Behavior dialog box for a shape (select a shape, and then on the Format menu, click Behavior).


 * In a shape's ShapeSheet.
 * In automation.

Publish Visio Help Files
Published Help files (.chm ) appear in the following locations in Visio:
 * In automation. Use references to published Help files to install-by demand or repair Help files as necessary. Application.InvokeHelp(“myhelp.chm”, 15, 0) is an example of a reference to a published Help file.
 * In Shape Help. The Help file that is specified when you click Special on the Format menu, and then click Help is installed-by-demand and repaired as necessary.

Description of Values in the PublishComponent Table




List of Common Enable-Conditions Values Of Statically-Enabled Add-ons
The following is a list of some common enable-conditions values of statically-enabled add-ons:

Needs document         1 Needs window           3 Needs drawing window       7 Needs page window      135 Needs master window    263 Needs stencil window       11 Needs ShapeSheet window    19 Needs icon window      35 Needs target           65 Needs page target      193 Needs master target    321 Needs selection target     577

Additional query words: kbnoOfficeAlertID vso12 vso11 vso2007 vso2003

Keywords: kbtemplate kbinfo KB832029

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.