Cannot detect installed version set up will now exit

Unable to Install or Update UiPath Studio in machine.

While installing/updating Studio we may face below errors:

Popup with "Cannot detect installed version set up will now exit" error.
"An instance of UiPath Platform Installer is already running."
Log error shows "Could not find Registry key SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{6095A623-D2D5-4DE5-852B-4****}
   at UiPath.StudioCAs.Extensions.RegistryToolsExtensions.GetDisplayVersionByProductCode(String productCode)
   at UiPath.StudioCAs.SessionManager.ValidateVersionUpgrade(String& errorMessage)
" error.

This issue comes if the old studio is not properly removed from the machine which is not allowing the new Studio to install/update. 

Please follow below approaches:
Approach 1:

  1. Open the MSI log and look for the UiPath Product ID.
  2. Open Registry Editor (regedit.exe) and go to the following registry key:
  3. Search the UiPath Product ID (e.i. "{CA94574A-9591-4278-9269-0F5FB01F***}") found in step 1.
  4. Expand the Product Folder Key and go to the SourceList Sub-key.
  5. PackageName key can be missing or it's value wouldn't be same as per the present msi name (like StudioUipath.msi).
  6. Add a new key if missing and write the msi exact name like UiPathStudio.msi as the value.
  7. Restarted the machine.
Approach 2:
  1. Install the old studio version with same exe or msi installer as it was installed before.
  2. Once done, updated it using the new exe/msi version of installer.