I am trying to add MAUI environment to my existing installation of Visual studio 2022, however the installation using visual studio installer fails. This is the error I get in the logs:

Package 'Microsoft.VisualStudio.Community.Shared.Msi,version=17.6.33606.225' failed to install.
    Search URL
        https://aka.ms/VSSetupErrorReports?q=PackageId=Microsoft.VisualStudio.Community.Shared.Msi;PackageAction=Install;ReturnCode=1407
    Details
        MSI: C:\ProgramData\Microsoft\VisualStudio\Packages\Microsoft.VisualStudio.Community.Shared.Msi,version=17.6.33606.225\Microsoft.VisualStudio.Community.Shared.Msi.msi, Properties:  REBOOT=ReallySuppress ARPSYSTEMCOMPONENT=1  MSIFASTINSTALL="7"  VSEXTUI="1"  PIDKEY="NGKBDRWKQFTT82MTRMPKRM6XM"  VS7.3643236F_FC70_11D3_A536_0090278A1BB8="C:\Program Files\Microsoft Visual Studio\2022\Community"  FEEDBACKOPTIN="1" 
        Return code: 1603
        Return code details: Fatal error during installation.
        Message Id: 1407

I have tried to install the problematic MSI package manually from the following path that I got from the logs C:\ProgramData\Microsoft\VisualStudio\Packages\Microsoft.VisualStudio.Community.Shared.Msi,version=17.6.33606.225\Microsoft.VisualStudio.Community.Shared.Msi.msi but it keeps failing.

Further searching on the internet, I came across someone proposing a solution that might work , they say I should edit a registry key, but navigating to that key through regedit makes regedit freeze, stop responding and crashing. So I came to the conclusion that the MSI package needs access to that key but is not able to use it for whatever reason and I cannot figure out why..

1

There are 1 best solutions below

1
moe87b On

Found a solution here

Just needed to change something, the owner of the key to edit should be an Administrator account and not SYSTEM because apparently, windows prevents editing permissions for a SYSTEM owned key