厂崽学编程 2025-06-13 17:41 采纳率: 33.3%
浏览 27

VS 2022 安装失败,查了很多文章也没用

img


首先问题是这个,可以搜索到相关帖子,依处理方法

img


打开后这个地址有

img


之后点VC,进入后勾选同意协议,然后安装。
正常来说到这里就结束了,但是我这边出了这个问题

img


点了确定后,系统会反复尝试,最后报错

img


日志是:
[4570:1134][2025-06-13T17:34:03]i001: Burn v3.14.1.8722, Windows v10.0 (Build 26100: Service Pack 0), path: C:\Users\Gong_\AppData\Local\Temp{937C3C8E-651E-4BA2-834B-7F14FEC34E39}.cr\VC_redist.x86.exe
[4570:1134][2025-06-13T17:34:03]i009: Command Line: '"-burn.clean.room=C:\Program Files\Visual Studio\下载缓存\Microsoft.VisualCpp.Redist.14,version=14.44.35208,chip=x86\VC_redist.x86.exe" -burn.filehandle.attached=592 -burn.filehandle.self=600'
[4570:1134][2025-06-13T17:34:03]i000: Setting string variable 'WixBundleOriginalSource' to value 'C:\Program Files\Visual Studio\下载缓存\Microsoft.VisualCpp.Redist.14,version=14.44.35208,chip=x86\VC_redist.x86.exe'
[4570:1134][2025-06-13T17:34:03]i000: Setting string variable 'WixBundleOriginalSourceFolder' to value 'C:\Program Files\Visual Studio\下载缓存\Microsoft.VisualCpp.Redist.14,version=14.44.35208,chip=x86'
[4570:1134][2025-06-13T17:34:03]i000: Setting string variable 'WixBundleLog' to value 'C:\Users\Gong_\AppData\Local\Temp\dd_vcredist_x86_20250613173403.log'
[4570:1134][2025-06-13T17:34:03]i000: Setting string variable 'WixBundleName' to value 'Microsoft Visual C++ 2015-2022 Redistributable (x86) - 14.44.35208'
[4570:1134][2025-06-13T17:34:03]i000: Setting string variable 'WixBundleManufacturer' to value 'Microsoft Corporation'
[4570:58F8][2025-06-13T17:34:03]i000: Setting version variable 'WixBundleFileVersion' to value '14.44.35208.0'
[4570:1134][2025-06-13T17:34:03]i100: Detect begin, 10 packages
[4570:1134][2025-06-13T17:34:03]i000: Setting version variable 'windows_uCRT_DetectKey' to value '10.0.26100.4202'
[4570:1134][2025-06-13T17:34:03]i000: Setting numeric variable 'windows_uCRT_DetectKeyExists' to value 1
[4570:1134][2025-06-13T17:34:03]i102: Detected related bundle: {5bfc1380-fd35-4b85-9715-7351535d077e}, type: Upgrade, scope: PerMachine, version: 14.22.27821.0, operation: MajorUpgrade
[4570:1134][2025-06-13T17:34:03]i052: Condition '(VersionNT = v6.3 AND NOT VersionNT64) AND (windows_uCRT_DetectKeyExists AND windows_uCRT_DetectKey >= v10.0.10240.0)' evaluates to false.
[4570:1134][2025-06-13T17:34:03]i052: Condition '(VersionNT = v6.3 AND VersionNT64) AND (windows_uCRT_DetectKeyExists AND windows_uCRT_DetectKey >= v10.0.10240.0)' evaluates to false.
[4570:1134][2025-06-13T17:34:03]i052: Condition '(VersionNT = v6.2 AND NOT VersionNT64) AND (windows_uCRT_DetectKeyExists AND windows_uCRT_DetectKey >= v10.0.10240.0)' evaluates to false.
[4570:1134][2025-06-13T17:34:03]i052: Condition '(VersionNT = v6.2 AND VersionNT64) AND (windows_uCRT_DetectKeyExists AND windows_uCRT_DetectKey >= v10.0.10240.0)' evaluates to false.
[4570:1134][2025-06-13T17:34:03]i052: Condition '(VersionNT = v6.1 AND NOT VersionNT64) AND (windows_uCRT_DetectKeyExists AND windows_uCRT_DetectKey >= v10.0.10240.0)' evaluates to false.
[4570:1134][2025-06-13T17:34:03]i052: Condition '(VersionNT = v6.1 AND VersionNT64) AND (windows_uCRT_DetectKeyExists AND windows_uCRT_DetectKey >= v10.0.10240.0)' evaluates to false.
[4570:1134][2025-06-13T17:34:03]i052: Condition '(VersionNT = v6.0 AND NOT VersionNT64) AND (windows_uCRT_DetectKeyExists AND windows_uCRT_DetectKey >= v10.0.10240.0)' evaluates to false.
[4570:1134][2025-06-13T17:34:03]i052: Condition '(VersionNT = v6.0 AND VersionNT64) AND (windows_uCRT_DetectKeyExists AND windows_uCRT_DetectKey >= v10.0.10240.0)' evaluates to false.
[4570:1134][2025-06-13T17:34:03]i103: Detected related package: {1E6FC929-567E-4D22-9206-C5B83F0A21B9}, scope: PerMachine, version: 14.22.27821.0, language: 0 operation: MajorUpgrade
[4570:1134][2025-06-13T17:34:03]i103: Detected related package: {3BDE80F7-7EC9-448E-8160-4ADA0CDA8879}, scope: PerMachine, version: 14.22.27821.0, language: 0 operation: MajorUpgrade
[4570:1134][2025-06-13T17:34:03]i101: Detected package: Windows81_x86, state: Absent, cached: None
[4570:1134][2025-06-13T17:34:03]i101: Detected package: Windows81_x64, state: Absent, cached: None
[4570:1134][2025-06-13T17:34:03]i101: Detected package: Windows8_x86, state: Absent, cached: None
[4570:1134][2025-06-13T17:34:03]i101: Detected package: Windows8_x64, state: Absent, cached: None
[4570:1134][2025-06-13T17:34:03]i101: Detected package: Windows7_MSU_x86, state: Absent, cached: None
[4570:1134][2025-06-13T17:34:03]i101: Detected package: Windows7_MSU_x64, state: Absent, cached: None
[4570:1134][2025-06-13T17:34:03]i101: Detected package: WindowsVista_MSU_x86, state: Absent, cached: None
[4570:1134][2025-06-13T17:34:03]i101: Detected package: WindowsVista_MSU_x64, state: Absent, cached: None
[4570:1134][2025-06-13T17:34:03]i101: Detected package: vcRuntimeMinimum_x86, state: Absent, cached: Complete
[4570:1134][2025-06-13T17:34:03]i101: Detected package: vcRuntimeAdditional_x86, state: Absent, cached: Complete
[4570:1134][2025-06-13T17:34:03]i052: Condition 'VersionNT >= v6.1' evaluates to true.
[4570:1134][2025-06-13T17:34:03]i199: Detect complete, result: 0x0
[4570:58F8][2025-06-13T17:34:06]i000: Setting numeric variable 'EulaAcceptCheckbox' to value 1
[4570:1134][2025-06-13T17:34:06]i200: Plan begin, 10 packages, action: Install
[4570:1134][2025-06-13T17:34:06]i052: Condition 'VersionNT = v6.3 AND NOT VersionNT64' evaluates to false.
[4570:1134][2025-06-13T17:34:06]w321: Skipping dependency registration on package with no dependency providers: Windows81_x86
[4570:1134][2025-06-13T17:34:06]i052: Condition 'VersionNT = v6.3 AND VersionNT64' evaluates to false.
[4570:1134][2025-06-13T17:34:06]w321: Skipping dependency registration on package with no dependency providers: Windows81_x64
[4570:1134][2025-06-13T17:34:06]i052: Condition 'VersionNT = v6.2 AND NOT VersionNT64' evaluates to false.
[4570:1134][2025-06-13T17:34:06]w321: Skipping dependency registration on package with no dependency providers: Windows8_x86
[4570:1134][2025-06-13T17:34:06]i052: Condition 'VersionNT = v6.2 AND VersionNT64' evaluates to false.
[4570:1134][2025-06-13T17:34:06]w321: Skipping dependency registration on package with no dependency providers: Windows8_x64
[4570:1134][2025-06-13T17:34:06]i052: Condition 'VersionNT = v6.1 AND NOT VersionNT64' evaluates to false.
[4570:1134][2025-06-13T17:34:06]w321: Skipping dependency registration on package with no dependency providers: Windows7_MSU_x86
[4570:1134][2025-06-13T17:34:06]i052: Condition 'VersionNT = v6.1 AND VersionNT64' evaluates to false.
[4570:1134][2025-06-13T17:34:06]w321: Skipping dependency registration on package with no dependency providers: Windows7_MSU_x64
[4570:1134][2025-06-13T17:34:06]i052: Condition 'VersionNT = v6.0 AND NOT VersionNT64' evaluates to false.
[4570:1134][2025-06-13T17:34:06]w321: Skipping dependency registration on package with no dependency providers: WindowsVista_MSU_x86
[4570:1134][2025-06-13T17:34:06]i052: Condition 'VersionNT = v6.0 AND VersionNT64' evaluates to false.
[4570:1134][2025-06-13T17:34:06]w321: Skipping dependency registration on package with no dependency providers: WindowsVista_MSU_x64
[4570:1134][2025-06-13T17:34:06]i000: Setting string variable 'WixBundleRollbackLog_vcRuntimeMinimum_x86' to value 'C:\Users\Gong_\AppData\Local\Temp\dd_vcredist_x86_20250613173403_000_vcRuntimeMinimum_x86_rollback.log'
[4570:1134][2025-06-13T17:34:06]i000: Setting string variable 'WixBundleLog_vcRuntimeMinimum_x86' to value 'C:\Users\Gong_\AppData\Local\Temp\dd_vcredist_x86_20250613173403_000_vcRuntimeMinimum_x86.log'
[4570:1134][2025-06-13T17:34:06]i000: Setting string variable 'WixBundleRollbackLog_vcRuntimeAdditional_x86' to value 'C:\Users\Gong_\AppData\Local\Temp\dd_vcredist_x86_20250613173403_001_vcRuntimeAdditional_x86_rollback.log'
[4570:1134][2025-06-13T17:34:06]i000: Setting string variable 'WixBundleLog_vcRuntimeAdditional_x86' to value 'C:\Users\Gong_\AppData\Local\Temp\dd_vcredist_x86_20250613173403_001_vcRuntimeAdditional_x86.log'
[4570:1134][2025-06-13T17:34:06]i201: Planned package: Windows81_x86, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[4570:1134][2025-06-13T17:34:06]i201: Planned package: Windows81_x64, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[4570:1134][2025-06-13T17:34:06]i201: Planned package: Windows8_x86, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[4570:1134][2025-06-13T17:34:06]i201: Planned package: Windows8_x64, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[4570:1134][2025-06-13T17:34:06]i201: Planned package: Windows7_MSU_x86, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[4570:1134][2025-06-13T17:34:06]i201: Planned package: Windows7_MSU_x64, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[4570:1134][2025-06-13T17:34:06]i201: Planned package: WindowsVista_MSU_x86, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[4570:1134][2025-06-13T17:34:06]i201: Planned package: WindowsVista_MSU_x64, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[4570:1134][2025-06-13T17:34:06]i201: Planned package: vcRuntimeMinimum_x86, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, cache: No, uncache: No, dependency: Register
[4570:1134][2025-06-13T17:34:06]i201: Planned package: vcRuntimeAdditional_x86, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, cache: No, uncache: No, dependency: Register
[4570:1134][2025-06-13T17:34:06]i207: Planned related bundle: {5bfc1380-fd35-4b85-9715-7351535d077e}, type: Upgrade, default requested: Absent, ba requested: Absent, execute: Uninstall, rollback: Install, dependency: None
[4570:1134][2025-06-13T17:34:06]i299: Plan complete, result: 0x0
[4570:1134][2025-06-13T17:34:06]i300: Apply begin
[4570:1134][2025-06-13T17:34:06]i010: Launching elevated engine process.
[4570:1134][2025-06-13T17:34:08]i011: Launched elevated engine process.
[4570:1134][2025-06-13T17:34:08]i012: Connected to elevated engine.
[0AA8:05B0][2025-06-13T17:34:08]i358: Pausing automatic updates.
[0AA8:05B0][2025-06-13T17:34:08]i359: Paused automatic updates.
[0AA8:05B0][2025-06-13T17:34:08]i360: Creating a system restore point.
[0AA8:05B0][2025-06-13T17:34:08]w363: Could not create system restore point, error: 0x80070422. Continuing...
[0AA8:05B0][2025-06-13T17:34:08]i370: Session begin, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{e90abaf0-d749-437b-ba99-cda1c84b6754}, options: 0x7, disable resume: No
[0AA8:05B0][2025-06-13T17:34:08]i000: Caching bundle from: 'C:\Users\Gong_\AppData\Local\Temp{D48A0781-854C-4F01-9A64-83DA8886B873}.be\VC_redist.x86.exe' to: 'C:\ProgramData\Package Cache{e90abaf0-d749-437b-ba99-cda1c84b6754}\VC_redist.x86.exe'
[0AA8:05B0][2025-06-13T17:34:08]i320: Registering bundle dependency provider: VC,redist.x86,x86,14.44,bundle, version: 14.44.35208.0
[0AA8:05B0][2025-06-13T17:34:08]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{e90abaf0-d749-437b-ba99-cda1c84b6754}, resume: Active, restart initiated: No, disable resume: No
[0AA8:3AE4][2025-06-13T17:34:08]i304: Verified existing payload: vcRuntimeMinimum_x86 at path: C:\ProgramData\Package Cache{491C67BA-2F2F-4A90-B9DD-4C76BFDBEA02}v14.44.35208\packages\vcRuntimeMinimum_x86\vc_runtimeMinimum_x86.msi.
[0AA8:3AE4][2025-06-13T17:34:08]i304: Verified existing payload: cab54A5CABBE7274D8A22EB58060AAB7623 at path: C:\ProgramData\Package Cache{491C67BA-2F2F-4A90-B9DD-4C76BFDBEA02}v14.44.35208\packages\vcRuntimeMinimum_x86\cab1.cab.
[0AA8:3AE4][2025-06-13T17:34:09]i304: Verified existing payload: vcRuntimeAdditional_x86 at path: C:\ProgramData\Package Cache{5A76FFAE-36C5-4648-80BD-4BB5B6E971F0}v14.44.35208\packages\vcRuntimeAdditional_x86\vc_runtimeAdditional_x86.msi.
[0AA8:3AE4][2025-06-13T17:34:09]i304: Verified existing payload: cabB3E1576D1FEFBB979E13B1A5379E0B16 at path: C:\ProgramData\Package Cache{5A76FFAE-36C5-4648-80BD-4BB5B6E971F0}v14.44.35208\packages\vcRuntimeAdditional_x86\cab1.cab.
[0AA8:05B0][2025-06-13T17:34:09]i301: Applying execute package: vcRuntimeMinimum_x86, action: Install, path: C:\ProgramData\Package Cache{491C67BA-2F2F-4A90-B9DD-4C76BFDBEA02}v14.44.35208\packages\vcRuntimeMinimum_x86\vc_runtimeMinimum_x86.msi, arguments: ' MSIFASTINSTALL="7" NOVSUI="1"'
[0AA8:05B0][2025-06-13T17:39:09]e000: Error 0x80070643: Failed to install MSI package.
[0AA8:05B0][2025-06-13T17:39:09]e000: Error 0x80070643: Failed to execute MSI package.
[4570:1134][2025-06-13T17:39:09]e000: Error 0x80070643: Failed to configure per-machine MSI package.
[4570:1134][2025-06-13T17:39:09]w348: Application requested retry of package: vcRuntimeMinimum_x86, encountered error: 0x80070643. Retrying...
[0AA8:05B0][2025-06-13T17:39:12]i301: Applying execute package: vcRuntimeMinimum_x86, action: Install, path: C:\ProgramData\Package Cache{491C67BA-2F2F-4A90-B9DD-4C76BFDBEA02}v14.44.35208\packages\vcRuntimeMinimum_x86\vc_runtimeMinimum_x86.msi, arguments: ' MSIFASTINSTALL="7" NOVSUI="1"'
[0AA8:05B0][2025-06-13T17:39:16]e000: Error 0x80070643: Failed to install MSI package.
[0AA8:05B0][2025-06-13T17:39:16]e000: Error 0x80070643: Failed to execute MSI package.
[4570:1134][2025-06-13T17:39:16]e000: Error 0x80070643: Failed to configure per-machine MSI package.
[4570:1134][2025-06-13T17:39:16]w348: Application requested retry of package: vcRuntimeMinimum_x86, encountered error: 0x80070643. Retrying...
[0AA8:05B0][2025-06-13T17:39:19]i301: Applying execute package: vcRuntimeMinimum_x86, action: Install, path: C:\ProgramData\Package Cache{491C67BA-2F2F-4A90-B9DD-4C76BFDBEA02}v14.44.35208\packages\vcRuntimeMinimum_x86\vc_runtimeMinimum_x86.msi, arguments: ' MSIFASTINSTALL="7" NOVSUI="1"'
[0AA8:05B0][2025-06-13T17:39:23]e000: Error 0x80070643: Failed to install MSI package.
[0AA8:05B0][2025-06-13T17:39:23]e000: Error 0x80070643: Failed to execute MSI package.
[4570:1134][2025-06-13T17:39:23]e000: Error 0x80070643: Failed to configure per-machine MSI package.
[4570:1134][2025-06-13T17:39:23]w348: Application requested retry of package: vcRuntimeMinimum_x86, encountered error: 0x80070643. Retrying...
[0AA8:05B0][2025-06-13T17:39:26]i301: Applying execute package: vcRuntimeMinimum_x86, action: Install, path: C:\ProgramData\Package Cache{491C67BA-2F2F-4A90-B9DD-4C76BFDBEA02}v14.44.35208\packages\vcRuntimeMinimum_x86\vc_runtimeMinimum_x86.msi, arguments: ' MSIFASTINSTALL="7" NOVSUI="1"'
[0AA8:05B0][2025-06-13T17:39:31]e000: Error 0x80070643: Failed to install MSI package.
[0AA8:05B0][2025-06-13T17:39:31]e000: Error 0x80070643: Failed to execute MSI package.
[4570:1134][2025-06-13T17:39:31]e000: Error 0x80070643: Failed to configure per-machine MSI package.
[4570:1134][2025-06-13T17:39:31]i319: Applied execute package: vcRuntimeMinimum_x86, result: 0x80070643, restart: None
[4570:1134][2025-06-13T17:39:31]e000: Error 0x80070643: Failed to execute MSI package.
[0AA8:05B0][2025-06-13T17:39:31]i372: Session end, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{e90abaf0-d749-437b-ba99-cda1c84b6754}, resume: None, restart: None, disable resume: No
[0AA8:05B0][2025-06-13T17:39:31]i330: Removed bundle dependency provider: VC,redist.x86,x86,14.44,bundle
[0AA8:05B0][2025-06-13T17:39:31]i352: Removing cached bundle: {e90abaf0-d749-437b-ba99-cda1c84b6754}, from path: C:\ProgramData\Package Cache{e90abaf0-d749-437b-ba99-cda1c84b6754}
[0AA8:05B0][2025-06-13T17:39:31]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{e90abaf0-d749-437b-ba99-cda1c84b6754}, resume: None, restart initiated: No, disable resume: No
[4570:1134][2025-06-13T17:39:31]i399: Apply complete, result: 0x80070643, restart: None, ba requested restart: No

  • 写回答

7条回答 默认 最新

  • 檀越@新空间 2025-06-13 17:42
    关注

    下午好🌅🌅🌅
    本答案参考通义千问

    根据你的问题描述和日志信息,安装失败的主要原因是某些条件未满足,导致安装程序无法继续执行。以下是一些可能的解决方案:

    解决方案

    1. 检查操作系统版本

      • 确保你的操作系统版本符合要求。根据日志中的条件 (VersionNT = v6.3 AND NOT VersionNT64) 等,你的系统可能是 Windows 10 或更高版本。
      • 解决方法
        • 确认你的操作系统版本。可以通过 winver 命令查看。
        • 如果系统版本低于要求,考虑升级操作系统。
    2. 清理旧版本的 Visual C++ Redistributable

      • 可能存在旧版本的 Visual C++ Redistributable,导致安装冲突。
      • 解决方法
        • 打开控制面板 -> 程序和功能。
        • 找到所有与 Microsoft Visual C++ Redistributable 相关的条目,卸载它们。
        • 重启计算机后重新安装。
    3. 手动安装 Visual C++ Redistributable

      • 尝试手动下载并安装 Visual C++ Redistributable。
      • 解决方法
    4. 清理安装缓存

      • 可能安装缓存中存在损坏的文件。
      • 解决方法
        • 删除 C:\Program Files\Visual Studio\下载缓存 文件夹中的所有内容。
        • 重新启动 Visual Studio 安装程序。
    5. 以管理员身份运行安装程序

      • 确保安装程序有足够的权限。
      • 解决方法
        • 右键点击安装程序,选择“以管理员身份运行”。
    6. 检查系统更新

      • 确保你的系统已经安装了最新的更新。
      • 解决方法
        • 打开设置 -> 更新和安全 -> 检查更新。
        • 安装所有可用的更新。
    7. 使用命令行安装

      • 使用命令行参数安装可能会绕过某些界面问题。
      • 解决方法
        • 打开命令提示符(管理员)。
        • 导航到安装程序所在目录。
        • 运行以下命令:
          vs_community.exe --layout C:\vs2022layout --lang zh-CN
          

          替换 vs_community.exe 为实际的安装程序名称。

    修改后的代码

    如果你需要通过脚本自动化上述步骤,可以参考以下 PowerShell 脚本:

    # 卸载旧版本的 Visual C++ Redistributable
    Get-WmiObject -Query "SELECT * FROM Win32_Product WHERE Name LIKE '%Microsoft Visual C++%'" | ForEach-Object {
        Write-Output "Uninstalling $($_.Name)"
        $_.Uninstall()
    }
    
    # 清理安装缓存
    $cachePath = "C:\Program Files\Visual Studio\下载缓存"
    if (Test-Path $cachePath) {
        Remove-Item -Recurse -Force $cachePath
        Write-Output "Cache cleaned at $cachePath"
    }
    
    # 检查操作系统版本
    $osVersion = [System.Environment]::OSVersion.Version
    Write-Output "Current OS Version: $osVersion"
    
    # 检查是否需要更新操作系统
    if ($osVersion.Major -lt 10) {
        Write-Output "Your OS version is too low. Please update your OS."
    } else {
        Write-Output "OS version is compatible."
    }
    
    # 以管理员身份运行安装程序
    Start-Process -FilePath "vs_community.exe" -ArgumentList "--layout C:\vs2022layout --lang zh-CN" -Verb RunAs
    

    总结

    按照上述步骤逐一排查问题,通常可以解决安装失败的问题。如果问题仍然存在,建议联系 Microsoft 支持或查阅更详细的日志文件以获取更多信息。

    评论

报告相同问题?

问题事件

  • 创建了问题 6月13日