Why does COM automation from a console application work on my development machine but not on the other?

For a project I am using COM automation using CorelDRAW. Automation is done through a console application that will eventually be started by the web service, but in order to fix the issue behind this issue, it runs as a scheduled task. This works on my development machine (running Windows Server 2003 32-bit), but with COM error 80080005 on a Windows Server 2003 64-bit machine does not work.

There is no additional information in the Event Viewer logs [see. edit below].

If I log in using an account that launches the scheduled task and launches the console application, it works as expected, so I don't think this is a 32-bit error on the 64-bit version (but I'm happy to have it fixed) ...

The problem is that the scheduled task is not "logging on" in the way that CorelDRAW expects / requires. If this is a problem, why isn't this happening on my development machine? Are there some settings I might have changed on my development machine to do this, but now forget about?

While researching a similar problem here and elsewhere, I tried a number of things, including:

Verify that the startup account logs on as a service and logs on as a batch file installed in secpol.msc.

Verifying that the CorelDRAW object has local launch and local activation set to dcomcnfg.

Checking file access permissions by adding the startup user to the Computer Administrators group and auditing access to the object without access.

Removing permissions from the startup account on my development machine to reproduce the error (which I can't).

What else should I try?


After some additional digging in the Event Viewer logs, more information appears.

There is an audit error with event ID 560 for the ServiceActive object. I can find a hotfix for Windows Server 2003 SP1, but I am running SP2 on both machines. I found http://social.msdn.microsoft.com/forums/en-US/windowstransactionsprogramming/thread/98683298-75da-4952-b2c1-057419c85501/ which suggests using sc sdset ...


If I add the account that runs the scheduled task to the Administrators group, I get

The application, c:\Program Files (x86)\Corel\CorelDRAW Graphics Suite X5\Programs\CorelDRW.exe, generated an application error The error occurred on 03/19/2012 @ 08:20:25.869 The exception generated was c0000005 at address 65F6378B (CrlUtl!CrlUtl::WDictionaryIterator<IBaseBind,ATL::CStringT<wchar_t,StrTraitMFC_DLL<wchar_t,ATL::ChTraitsCRT<wchar_t> > > >::GetNext)


which assumes that he cannot find what he expects to find.


source to share

1 answer

You are getting CO_E_SERVER_EXEC_FAILURE which suggest the COM server (in your case I assume it is the local DCOM CoralDraw server) failed to start.

I am guessing this is a privilege issue. If I understand you correctly, this is not a machine and machine problem, but a problem with interactive login and task scheduling.

It is right? To fix the side issues, do suare. CarolDraw runs interactively with a user account that runs a scheduled task and then launches a console program when run from the command line.

Are you using Windows? I suspect you are missing the "NT AUTHORITY \ INTERACTIVE" or "CONSOLE LOGON" membership. To test this assumption, let the command line reset the group membership and privileges of the current token (GetTokenInformation is an API) and compare what you get when you run as a scheduled task and from the command line.



All Articles