title: Outlook and Registry key permission issue
body: <p>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:</p>
  
  <blockquote>
    <p>Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed.</p>
  </blockquote>
  
  <p>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:</p>
  
  <p><img src="https://i.stack.imgur.com/R3HD8.jpg" alt="enter image description here">  </p>
  
  <p><img src="https://i.stack.imgur.com/s2n9Y.jpg" alt="enter image description here"></p>
  
  <p>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?</p>