Deploying Managed Smart Tag DLLs [Office 2003 SDK Documentation]

To manually install the managed smart tag DLLs in the registry and set up .NET security policy is not a very viable and practical deployment method. An easier and more reliable way to deploy and install the DLLs on a client's computer is to use application installers.

Building An Installer Package.

You can build an installer using the Visual Studio .NET setup and deployment wizard or any other installer software of your choice. The installer can be set up to write the appropriate registry keys and set up .NET security policy when run. For walkthroughs on how to build an installer package using Visual Studio .NET, see the Deploying Applications Web site on MSDN. From there, you will find links to related topics and walkthroughs on how to build a setup package.

Registration

You will need to write the appropriate registry keys to register the managed smart tags to make them known to other Windows applications (namely all smart tag supporting applications). The setup package that you build can be configured to write the appropriate keys in the registry. See the Registering and Enabling the Managed Registry Key and Register the Visual C# Smart Tag DLL topics for details on what keys you will need to write.

Deploying .NET Security Policies

You will also need to deploy .NET security policies. See the Deploying .NET Security Policies topic for guidelines on how to do this.

Don't Re-distribute the Office 2003 Primary Interop Assemblies (PIAs)

It cannot be emphasized enough that you should not re-distribute the Office 2003 PIAs. No solution setup package should try to re-distribute the Office 2003 PIAs in any way. Office 2003 should be the only Office 2003 PIAs delivery mechanism.

Make sure you don't accidentally include the PIAs in your setup. Including the Office 2003 PIAs in your setup project will potentially break Office 2003 ownership and registration of the PIA components on end-user machines. This would cause them to inadvertently be removed on an end-user machine during an uninstall.

For example, when users install the setup package, the Office 2003 PIAs that are packaged into the setup will overwrite the registration of already installed components. And when users uninstall their solution, those PIA registrations could be broken, thus leaving the users' machines without .NET programmability support for those components.

Note  Visual Studio .NET and Visual Studio 2003 setup project usually automatically include some of the PIAs in the setup package. So developers need to be sure to exclude the Office 2003 PIAs from their setup package.

For guidelines on getting, using and troubleshooting the Office 2003 PIAs, see the Office 2003 Primary Interop Assemblies (PIAs) topic for details.

Run SmartTagInstall.exe

The SmartTagInstall.exe is a tool that you can run post smart tag installation on the client machine. When run, it will force the new smart tag (and also all other installed smart tags on the computer) to load/reload even if the smart tag supporting applications are opened. You can run SmartTagInstall.exe as part of your setup by using shell execution command or custom action that runs the SmartTagInstall.exe during the install.

You can find more information on using SmartTagInstall.exe and known issues in the Smart Tag Reloading Without Restarting the Application topic.

Important  Note that Office runs a cached copy of the .NET security policy. Therefore, even if you run SmartTagInstall.exe that forces the new smart tag to be loaded\reloaded (even when the smart tag supporting applications are opened), you will still need your users to shut down all smart tag supporting applications and restart them again to activate the .NET security policy modifications. However, there are scenarios where you might not need to set .NET security policy as part of your installation package. For example the smart tag assembly is granted full trust based on the strong name key or software publisher and that key or publisher have previously been trusted using customized .NET security policy and therefore do not require them to be trusted again. In this scenario, you won't need your users to shut down and restart their applications (except for PowerPoint -- see the Smart Tag Reloading Without Restarting the Application topic for more details).