Windows Installer Registration
How It Works
When you allow the Windows Installer to register your application, the file’s registration data is stored in the Windows Installer COM tables. When using this method, the file’s DLLRegisterServer and DLLUnregisterServer functions are not called at run time, instead the Windows Installer takes the data specified in the COM tables and registers the file itself. For some advantages and disadvantages to letting Windows Installer register your file, read InstallShield Help Library topic Registering COM Servers.
The Windows Installer tables used to store the file’s registration data are as follows:
-
The TypeLib table provides information that the installer places in the registry for the registration of type libraries. Type library entries are not written at the time of advertisement. The installer writes the type library entries at the time the components associated with the library are installed.
- The Class table is used to register Class IDs and other information for COM objects. This table contains COM server-related information that must be generated as a part of the product advertisement.
- The ProgId table associates program IDs with class IDs.
For more information on the data registered for COM Servers, see Microsoft Help Library topic COM Registry Keys.
How to Implement
To use the Windows Installer to register your file, you can use any of the following methods. For more information, see InstallShield Help Library topic COM Registration Overview.
A. Set the component’s Extract at build option to Yes by following these steps:
- Select the Components view.
- Select the component that contains the file with the COM Data.
- Set the component’s COM Extract at Build property to Yes.
- Expand the component node and select the Files view of the component.
- Right-click the file with the COM Data and select Set Key File.
B. Right-click the file to Extract COM data by following these steps:
- Select the Components view.
- Select the component that contains the file with the COM Data.
- Expand the component node and select the Files view of the component.
-
Right-click the file with the COM Data and select Extract COM Data for Key File.
c. Add the data from the COM Registration view under Advances Settings by following these steps:
- Select the Components view.
- Select the component that contains the file with the COM Data.
- Expand the component node and select the Advanced Settings > COM Registration view.
- Manually add the appropriate COM data in this view.
Self-Registration
It is recommended that you use the Windows Installer registration method instead of the self-registration method. For a list of advantages to using Windows Installer Registration, see the Windows Installer Help Library topic SelfReg Table.
How It Works
Self-registering files have a DLLRegisterServer and a DLLUnRegisterServer function. Each function contains custom code that registers and unregisters the file. The developer of the file is responsible for writing the code to register and unregister the file in each of the functions. At run time, the DLLRegisterServer and DLLUnregisterServer are called for the files populated in this table. For more information on the self-registration process, see Microsoft Help Library topic Self-Registration.
If a file is selected to be self-registered in the InstallShield project, the SelfReg or IsSelfReg Table is populated. For more information on the advantages and disadvantages of each table, see InstallShield Help Library topic Self Registration Methods. By default, the InstallShield project uses the IsSelfReg Table. However, this option can be changed by using the following steps:
- Select Tools > Options.
- Select the Preferences tab.
- Under the Self-Registration section, select the SelfReg Table option from the drop-down box.
How To Implement
To mark a file as self-registering, follow these steps:
- Select the Files and Folders view and find the file you wish to self-register.
- Right-click the file and choose Properties.
- Select the Self-Register check box and click OK.
To specify the order in which files should be registered, follow these steps:
- Select the Direct Editor view.
- Select the IsSelfReg Table.
- Select the Order column and add a value. The entry with value 1 will be registered first, then 2, and so on.
Additional Information
Troubleshooting
If Using COM Extraction
- Verify that data can be extracted from the file using RegSpyUI.exe and verify that the data extracted is correct. RegSpyUI.exe can be found in the InstallShield Support folder <ProductPath>Support.
- If using Com Extract At Build, verify that you have marked the file that should have data extracted from it as a key file for the component.
- Verify that you are extracting data with a clean registry. See COM Registration Overview for other reasons for COM extraction failure
If Using Self-Registration
- If the file fails to register, try registering it with regsvr32.exe found in the system32 folder. At the command prompt, run regsvr32 <Path to File> and make sure this works.
- Verify that files are being registered in the correct order. This can be done by running regsvr32 on each file and verifying that each file is registered correctly. Once this is done, you can specify the correct order that the files should be registered in the IsSelfReg Table.
- Verify that all dependencies are on the machine and registered. For more information, see InstallShield Knowledge Base article Determining Your Application’s File Dependencies.
- Verify that files are ordered correctly in ISSelfReg Table.
For more information, see InstallShield Help Library topic Registering COM Servers.
Source: http://kb.flexerasoftware.com/selfservice/viewContent.do?externalID=Q111120