Today we'll be discussing how to avoid the following error:
When does this issue appear?Retrieving the COM class factory for component with CLSID
{4D3B04E6-E766-4A9F-8129-D119FEF08A7F} failed:
80070005 Access is denied. (E_ACCESSDENIED)
The common thread across every report I've seen is Session 0 + non-interactive execution, regardless of which specific automation tool sits on top. In this specific case, it was a GitLab Runner running as a Windows service, and a GitHub Actions runner "operating as a Windows service" under the same account
Basically, when trying to use the COM object (e.g. PowerShell automation support) from under an account that does not have enough rights (e.g. the LocalService account).
In my specific case, I managed to reproduce this using a Scheduled Task that runs interactively under the LocalService account.
Note: Please note that this is for the sake of the example, in most cases, the user differs, but the issue is the same and that is the lack of privileges.
First of all, this is an issue that we can work around starting with version 24.0. Currently, this version is not available as of the writing of this article. For the clients facing this issue, I have provided a RC version. For future clients facing this issue, please make sure to have 24.0 version installed or a higher version.
Here are the steps to fix this:
1. install version 24.0 of Advanced Installer (or higher)
2. open "Component Services" --> "Computers" --> "My Computer" --> "DCOM Config"
3. here, right click on "Advanced Installer COM Server" and then click on "Properties"
4. in the new spawned window, go to the "Security" tab
5. for each of the 3 (Launch and Activation permissions, Access permissions, Configuration permissions) select "Customize"
6. use the "Add" button to add your user there
7. after adding the user, select it and grant it permissions:
8. repeat this for the two that are left
9. click "Apply" and then "Ok"
10. retest this
By following these steps, you should now be able to use the COM object from under an account that runs in session 0 and that previously did not have enough rights.
Hope you'll find this useful!
Best regards,
Catalin
FOLLOW US
Get the latest news in Application Packaging