COM Exception While Opening Any Project Upon System Restart

COM exception occurring upon system restart which gets fixed once the packages from user profile are removed. What would be a permanent solution for this issue?

Error: Retrieving the COM class factory for component with CLSID {XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E+CLASSNOTREG)).

Issue Description: This issue occurs if the User Profile in the machine is a non-persistent one due to which every time the machine is restarted, the files are removed and then copied over to the Packages folder due to which the dependencies get corrupted.

Possible Solutions:

  • The temporary fix for this would be to delete the packages folder (default location is %userprofile%\.nuget\packages) after machine restart so that the dependencies get installed again.

  • A more robust approach would be to change the packages installation folder to a persistent drive such as a folder in system drive(C:).The below steps can be followed in order to do that.

    1. Open and edit C:\Program Files (x86)\UiPath\Studio\UiPath.config to include the following lines:<packageSettings><add key="packageInstallationFolder" value="desired installation folder" /></packageSettings> The modified file should look like as shown below.

    2. Restart the Robot Service and UiPath Studio in order to ensure that the changes are reflected.

image.png