I am working to fetch mail from Outlook programmatically. When I was running the program from console it was running fine. But I tried to automate it through a task scheduler by giving option to "run whether user is logged on or not" and got an error saying:
Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed.
I have searched the web for it and found someone telling to add permission to the key and then I started to play around with the registry key and unchecked one checkbox by going to the Permission property and it automatically removed all the permission and now the key is not accessible to anyone. Now my console application is also giving the same error. The following are the some screen shots:
As you can see, on clicking the key it gives an error saying "Access is denied" and when I try to add permission it gives another warning. If I click OK it opens the permission popup but does not allow to add any user. How can I fix this registry key issue? Is there any way to re-register the key by removing the damaged one?
I have solved it. On the permission popup click on the advance move to Owner tab and added current login user as owner. Then it allows to modify.