In our Company i have developed the application which starts the Outlook and emails to all clients.
As it is manual process to send the same, sometime user might forget to run the application.
To avoid the same we have planned to run the Application using Task Scheduler from Window server.
When user is logged in Application successfully runs from Task Scheduler.
But when logged off after Scheduling its giving the Following error.
Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE))

I am not getting what can be the probable reason for the same.
If anyone knows please help me out.

I imagine this is because there is no instance of your COM server running as you've logged off. The TaskScheduler will attempt to start it, run it and fail.

Check the COM is registered correctly and that the COM Server (RPCSS) is running as a service.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.