Try the following suggestions:
1) delete any files under %Temp%
2) Check if there have 3rd party anti-virus software enabled or enterprise group policy in place that is restricting you or not.
3) type Administrative Tools
in Windows search box - Open Local Security Settings
-- Software Restriction Policies
( Note: If no software restrictions are defined, right click the Software Restriction Policies
node and select New Software Restriction Policy
) - Double click Enforcement - Select All users except Local Administrators
- Click OK - Restart the computer for the changes to take effect.
4) enter Manage User Certificates under Search Box-->Untrusted Certificates-->remove any info about Microsoft.
enter
C:\ProgramData\Microsoft\VisualStudio\Packages\Microsoft.VisualStudio.MinShell.Msi.Resources,version=16.0.xxx.xxx
and right-click on the folder-->Security--> make sure your current user account has the right to modify the folder.
Then, run VS_Installer
as Administrator
5) Besides, if it does not help, please run C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\layout\InstallCleanup.exe
to reinstall the whole VS(all versions of VS2017
and VS2019
), vs data, related registry information(do a deep uninstallation), then run vs_installer
as Administrator to try again.
==============================================
Solution
Use the ccleaner tool to clean the os environment and disk and install the program without any errors.