@echo off cd /d %~dp0 set ERRORCODE=0 "%CD%\More\certmgr.exe" -add -c "%CD%\Installer\certificates\manifestRootCertificate.cer" -n "Microsoft Root Certificate Authority 2011" -s -r LocalMachine root if "%ERRORLEVEL%" NEQ "0" set ERRORCODE=1 "%CD%\More\certmgr.exe" -add -c "%CD%\Installer\certificates\manifestCounterSignRootCertificate.cer" -n "Microsoft Root Certificate Authority 2010" -s -r LocalMachine root if "%ERRORLEVEL%" NEQ "0" set ERRORCODE=2 "%CD%\More\certmgr.exe" -add -c "%CD%\Installer\certificates\vs_installer_opc.RootCertificate.cer" -n "Microsoft Root Certificate Authority" -s -r LocalMachine root if "%ERRORLEVEL%" NEQ "0" set ERRORCODE=3 "%CD%\More\certmgr.exe" -add -c "%CD%\More\MicCodSigPCA_2010-07-06.crt" -n "Microsoft Code Signing PCA 2010" -s -r LocalMachine CA if "%ERRORLEVEL%" NEQ "0" set ERRORCODE=4 if "%ERRORCODE%" == "0" goto done echo Ошибка установки одного из сертификатов Visual Studio 2022 echo Error of installing of one of Visual Studio 2022 certificates openfiles >nul 2>&1 if "%ERRORLEVEL%" == "0" goto done echo Возможно ошибка связана с недостатком прав доступа. Попробуйте перезапуситить установку сертификатов "от имени Aдминистратора" echo Probably error happened because of limited access rights. Please try to restart certificates installer again with Administrative privileges :done pause