CO_E_WRONG_SERVER_IDENTITY (0x80004015, "The class is configured to run as a security ID different from the caller") returned from a registration function (IRunningObjectTable::Register()) can be the result of the following issues:
- Incorrect service registration settings. Find the key named
HKEY_CLASSES_ROOT\AppID\{<service_app_GUID>}, delete the value namedLocalService(if there is one), and add the value namedRunAs(typeREG_SZ, valueInteractive User). -
Wrong service GUID (if you've changed it, which is a bad idea in general). Ensure that the following data ('@' means the default value)
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AppID\{yourServiceGuid}] @="yourServiceName"matches these data:
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AppID\yourServiceName.exe] @="yourServiceName.Application" "AppId"="{yourServiceGuid}"Sometimes, the default value can be
"(value not set)", but the GUID should match. -
Wrong service executable name. Check the registry entry for your service AppID (search in the
HKEY_CLASSES_ROOThive using part of your service executable name):HKEY_CLASSES_ROOT\AppID\<executable_name>.EXE
Suppose our service executable is named
SomeService100ud.exebut in the registry we see the following entry instead:HKEY_CLASSES_ROOT\AppID\SomeService.EXE
In this case, check the registrar script files
(.rgs)of your service project. Probably the executable name in these scripts is incorrect.
No comments:
Post a Comment