Deploying Smart Tag DLLs by Using the Visual Studio Installer

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

 

Paul Cornell
Microsoft Corporation

April 2001

Summary: This article describes how to deploy smart tag dynamic-link library (DLL) files to Microsoft Office XP users by using the Microsoft Visual Studio Installer. (3 printed pages)

Contents

Introduction
Deploying a Smart Tag DLL by Using the Visual Studio Installer
Conclusion

Introduction

Smart tags are a new feature introduced with Microsoft® Office XP that allows Office developers to link text in Office XP-based documents to external resources, or to use text in Office XP-based documents in conjunction with other custom solutions. By leveraging the Microsoft Smart Tags 1.0 Type Library that ships with Office XP, developers can create dynamic-link libraries (DLLs) that take advantage of smart tag technology.

To deploy a smart tag DLL, an Office developer could require an end user to copy the smart tag DLL to their local hard disk and manually alter their computer's registry, but this approach introduces opportunities for error and could cause maintenance headaches later.

A better approach is to use a deployment tool such as the Microsoft Visual Studio® Installer. The Visual Studio Installer is available for download at the Visual Studio Web site for licensed users of any Visual Studio 6.0 Professional or Enterprise edition tool. As of the date of this article, the current version of the Visual Studio Installer is 1.1; see the Visual Studio Web site for more information on how to download and install the Visual Studio Installer.

Creating custom smart tag DLLs is beyond the scope of this article. For more information on how to create smart tag DLLs, see the article Developing Smart Tag DLLs or the Microsoft Office XP Smart Tag Software Development Kit (SDK).

Deploying a Smart Tag DLL by Using the Visual Studio Installer

To deploy a smart tag DLL by using the Visual Studio Installer:

  1. On the Start menu, point to Programs, point to Microsoft Visual Studio 6.0, point to Microsoft Visual Studio 6.0 Enterprise Tools, and then click Visual Studio Installer.

  2. On the New tab of the New Project dialog box, expand the Visual Studio folder and then click the Visual Studio Installer Projects folder.

  3. Click the Empty Installer icon, type a name for your new project in the Name box, type a path in the Location box that indicates where you want to build the new project, and then click Open.

  4. In the Project Explorer window, double-click Registry.

  5. Expand the Registry on Target Machine folder, and then expand the HKEY_CURRENT_USER folder.

  6. Right-click the SOFTWARE folder, point to New, and then click Key. Rename the New Key #1 folder to Microsoft.

  7. Right-click the newly created Microsoft folder, point to New, and then click Key. Rename the New Key #1 folder to Office.

  8. Right-click the newly created Office folder, point to New, and then click Key. Rename the New Key #1 folder to Common.

  9. Right-click the newly created Common folder, point to New, and then click Key. Rename the New Key #1 folder to Smart Tag.

  10. Right-click the newly created Smart Tag folder, point to New, and then click Key. Rename the New Key #1 folder to Actions.

  11. Right-click the newly created Actions folder, point to New, and then click Key. Rename the New Key #1 folder to the name of your smart tag DLL, followed by a period, followed by the name of your smart tag action class file, minus any file extensions. For example, if the name of your smart tag DLL is "MyFirstSmartTag" and the name of your smart tag action class file is "SmartTagAction", then the name of the key would be MyFirstSmartTag.SmartTagAction.

  12. Right-click the Smart Tag folder you created in step 9 above, point to New, and then click Key. Rename the New Key #1 folder to Recognizers.

  13. Right-click the newly created Recognizers folder, point to New, and then click Key. Rename the New Key #1 folder to the name of your smart tag DLL, followed by a period, followed by the name of your smart tag recognizer class file, minus any file extensions. For example, if you’re the name of your smart tag DLL is "MyFirstSmartTag" and the name of your smart tag action class file is "SmartTagRecognizer", then the name of the key would be MyFirstSmartTag.SmartTagRecognizer.

  14. In the Project Explorer window, right-click Files, point to Add, and then click File(s). Browse to the smart tag DLL you want to install on the end user's computer, and then click Open.

    Note

       

    Installing the smart tag DLL on the end user's computer modifies the computer's registry. Modifying the Microsoft Windows registry in any manner, whether through the Registry Editor or programmatically, always carries some degree of risk. Incorrect modification can cause serious problems that may require you to reinstall your operating system. It is a good practice to always back up a computer's registry first before modifying it. If you are running Microsoft Windows NT or Microsoft Windows 2000, you should also update your Emergency Repair Disk (ERD). For information about how to edit the registry, view the "Changing Keys and Values" Help topic in the Registry Editor (Regedit.exe) or the "Add and Delete Information in the Registry" and "Edit Registry Information" topics in the Registry Editor (Regedt32.exe).

  15. From the Build menu, click Build.

    **Warning   **If you get errors such as "The install dialog Welcome is invalid" when you click Build in step 15 above, you may have a mismatched version of a file that ships with Visual Studio Installer named MergeMod.dll. For more information on how to resolve this issue, see Knowledge Base article Q281650: BUG: Cannot Compile VSI Project – "Install Dialog" Errors.

  16. Using Windows® Explorer, browse to the path you created in step 3 above. In that path you will find a subfolder named Output. Open the Output folder, and then open the subfolder named DISK_1. In this folder you will find a file with the extension .msi. This is the Visual Studio Installer file you will distribute to end users. To install and register your smart tag DLL, end users must simply double-click the .msi file and accept the defaults that the Setup Wizard suggests.

Conclusion

The Microsoft Visual Studio Installer is an ideal solution for deploying smart tag DLLs, especially when you need to manipulate an end user's registry settings. The Visual Studio Installer has an intuitive, graphical user interface that allows you to create self-extracting packages with a minimum of effort. Visual Studio Installer provides a rich set of installation dialogs and inserts an entry into the end user's Add/Remove Programs applet for uninstall or repair actions. All of this can be done without the Office developer having to write a single line of code.