INFO: How to Author MSI Packages That Register ATL Services That Do Not Contain COM Objects (320671)



The information in this article applies to:

  • Microsoft Windows Installer 1.0
  • Microsoft Windows Installer 1.1
  • Microsoft Windows Installer 1.2
  • Microsoft Windows Installer 2.0

This article was previously published under Q320671

SUMMARY

When you register ATL services that do not contain COM objects, you must use the Registry table in the Microsoft Windows Installer package. You cannot use the AppID table because it requires that corresponding entries in the Class table work properly. An ATL service that does not contain COM objects will not have entries in the Class Table because there is no CLSID.

back to the top

Sample Registry Table Entries

The following is an example of Registry table entries for an ATL service.

RegistryRootKeyNameValueComponent_
REG00AppID\{0F759B21-393A-47E1-BD7E-C2B921F45626}*(null)C__4EE7908E3FA945FC87F3AE633A994B9D
REG10AppID\{0F759B21-393A-47E1-BD7E-C2B921F45626}ServiceParameters-serviceC__4EE7908E3FA945FC87F3AE633A994B9D
REG20AppID\{0F759B21-393A-47E1-BD7E-C2B921F45626}LocalServiceservicetestC__4EE7908E3FA945FC87F3AE633A994B9D


In this example, C__4EE7908E3FA945FC87F3AE633A994B9D is an external key into the first column of the Component table referencing the component that contains the service. You must include the LocalService key value for the ATL service in the Name column. The name of the service goes in the Value column. In this example, the name of the service is servicetest. As in this example, your registry entries must contain the ServiceParameters string in the Name column. The corresponding Value must be -service.

Note that the AppID is a sample AppID. It will not be the same as the AppID for your service. To find the AppID for your service, check the registration information that is located in the CServiceModule::RegisterServer() method of the ATL source code.

After you author these entries in the Registry table, you must also author the ServiceControl table and the ServiceInstall table to install and control the service.

back to the top

MORE INFORMATION

For more information about populating the ServiceControl Table and the ServiceInstall Table, see the Help topics in the Platform SDK.

back to the top

REFERENCES

For more information about modifying a Microsoft Windows Installer package, see the Windows Installer SDK on the MSDN website.

back to the top

Modification Type:MajorLast Reviewed:10/2/2003
Keywords:kbHOWTOmaster kbinfo KB320671