Windows uses various kinds of COM servers and type libraries. Tarma Installer has built-in support for all of them as far as installation and registration is concerned (this includes unregistration and safe removal). In particular, it knows about:
There are two ways of dealing with these types of files:
Using the built-in self-registration is the easiest from a development and maintenance point of view; it allows the file to control its own registration entries in the Windows registry. However, it does not allow the same amount of rollback protection as the explicit registration method.
Explicit registration requires you to specify, for each COM server or type library, exactly what needs to be registered for the file. This is more error prone, but it allows a degree of flexibility and control that is not available with self-registration.
Unless there is a good reason otherwise, we recommend that you use self-registration for the files.
Here is how Tarma Installer deals with files that have built-in self-registration.
Type libraries are sometimes contained in DLL files (often as part of an in-process COM server), sometimes in EXE files (presumably as part of an out-of-process COM server), and sometimes in a special type library file, usually with a .tlb file name extension. Tarma Installer's treatment of a type library depends on the situation, as follows:
Once again, the actual file name extensions are immaterial; Tarma Installer analyzes each installation file to determine its type and other characteristics.
COM servers and type libraries are typically installed as shared files in the Windows System folder. Within Tarma Installer, this folder is represented by the Windows Volume\Windows\System32 folder. Unless you know what you are doing and have a very good reason to do otherwise, we recommend that you follow this convention.
This method requires that you add the files to the project, but set their Registration attribute to No self-registration. You must then configure the required registration option on the following project pages, where applicable:
To add a COM server or type library to your Tarma Installer project, act as follows.
Select the newly added COM server or type library file in the file list to display its File attributes pane, then make sure that the following options are set:
Registration - Set to No self-registration if you want to use explicit COM server or Type Library registration (below), else choose one of the following (the option should be preset to the correct one):
If you followed the procedure above, Tarma Installer will have set these options for you and you don't have to change anything, with the exception of out-of-process COM servers (EXE files), which cannot be recognized automatically.
The net result is that the server or type library will be installed and registered when your application is installed, and unregistered and removed when your application is uninstalled. All this is subject to the usual rules for file installation; in particular, Tarma Installer will correctly handle updates of existing copies of the file (based on a version check) and will only remove the file if no other applications use it. This remains true even if the SharedDlls reference count of the file is unreliable (as is often the case with third-party servers).