error while installing visualstudio (error code: 5002)

Hi! i’m trying to install Unity, but it doesn’t let me install VisualStudio, is there anything I can do to fix this?

The latest Unity installer didn’t appear to have the same checkbox as indicated in BlueSpecter’s response, so I couldn’t tell Unity to not install VS, therefore, that solution didn’t work for me. However, what did work was running the installer as an admin (shift+right-click on installer, select Run as Different User, enter admin creds). Before I tried this, Unity actually prompted me to run the installer as another user, which I did elect to do and entered in admin credentials, but it still failed. So instead of starting the installer as my normal user and using Unity’s UI to select a different user to install as, just start the installer as that admin user to begin with and you should be good to go.