Microsoft KB Archive/246054

= INFO: DCOMCNFG and AppID\.exe Mapping and Implications =

Article ID: 246054

Article Last Modified on 12/1/2003

-

APPLIES TO

 Microsoft COM+ 2.0 Standard Edition, when used with:  Microsoft Windows 2000 Standard Edition

 Microsoft Windows NT 4.0

 Microsoft Windows 98 Standard Edition

 Microsoft Windows 95</li></ul> </li></ul>

-

<div class="notice_section">

This article was previously published under Q246054

<div class="summary_section">

SUMMARY
This article explains entries that are made for AppID\.exe mapping under the HKEY_CLASSES_ROOT key in the registry by using the DCOMCNFG utility, and the implications of it.

<div class="moreinformation_section">

MORE INFORMATION
Component Object Model (COM) applications are identified by a Globally Unique Identifier (GUID) that is called AppID and represent a server process for one or more classes. The remote activation, security, and other application-specific settings are stored in the local registry under the following key:

HKEY_CLASSES_ROOT\AppID

All AppID settings can be manipulated by using the DCOMCNFG utility (Dcomcnfg.exe). The DCOMCNFG utility provides users with an easy-to-use interface for controlling these application-specific settings.

However, a few issues must be noted when you use DCOMCNFG to make entries under the AppID key in the registry:  AppID\.exe Mapping:  DCOMCNFG adds AppID\.exe mapping under HKEY_CLASSES_ROOT in the registry only if none of the following keys is present:

 HKCR\CLSID\<Guid> (AppID key, named value)</li> HKCR\APPID\<Guid></li> HKCR\APPID\Exename.exe</li></ul>

In this case, DCOMCNFG automatically synthesizes an AppID by using the first CLSID it encounters in that server (as done for legacy servers that were implemented before Windows NT 4.0), and adds it in the registry.</li> If any of these AppID keys is present, DCOMCNFG does not add the HKCR\APPID\Exename.exe key and or its value if it is not already present.

This AppID-to-.exe mapping is used by COM to get some of the application-specific settings. If this mapping missing, such settings as Custom Access Permission, static endpoint, Authentication level, and so on are not used by COM, because COM has no way to map the .exe file name to the AppID.</li></ul> </li> Setting Custom Access Permission:

When you set Custom Access permission by using DCOMCNFG, DCOMCNFG does not make the entry under AppID\{GUID} in the registry unless you click Edit, and then click OK. To do this: <ol style="list-style-type: lower-alpha;"> Start DCOMCNFG, and then select your application properties.</li> Click the Security tab.</li> Click Custom Access permissions, click Edit, and then click OK. The Custom access permissions are registered.</li></ol> </li> Long File Names for Applications:

DCOM uses the GetModuleFileName function to map the .exe file name to AppID for access permissions.

GetModuleFileName returns long or short file names, based on what was passed to the CreateProcess function. Therefore, if your localServer32 value (under HKEY_CLASSES_ROOT\CLSID\{guid}\LocalServer32) has a long file name, this AppID\.exe mapping needs to be a long file name, or vice versa, for a short file name.</li></ul>

<div class="references_section">