我一直喜欢用ltsc版,因为功能没有那么花俏,加上没那么多的安装更新,感觉使用起来相对没那么繁琐,Windows 10 LTSC 2021系统推出来很多年了,也没有更新,而这个2021版本,还是有点小问题的,一是用微软拼音输入法时,它不显示选字框,二是wsappx进程会疯狂的利用CPU,造成CPU负载高,迷你主机散热压力大。
这两个现象,都是系统缺一个VCLibs库文件造成的,我们只要安装上这个文件,就可以解决以上2个问题。
下载文件Microsoft.VCLibs.140.00_14.0.30704.0_x64__8wekyb3d8bbwe.Appx
编写一个powershell脚本,两者放在同一个目录下。
这个脚本命名为Install-VCLibs.ps1,内容如下
# 检查是否以管理员权限运行,如果不是则自动请求提升 if (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { # 重新启动脚本并请求管理员权限 $arguments = "-NoProfile -ExecutionPolicy Bypass -File `"{0}`"" -f $MyInvocation.MyCommand.Definition Start-Process -FilePath "pwsh.exe" -ArgumentList $arguments -Verb RunAs exit } # 获取当前脚本所在的目录 $scriptDirectory = Split-Path -Parent $MyInvocation.MyCommand.Definition # 检测系统架构 $osArchitecture = if ([Environment]::Is64BitOperatingSystem) { "x64" } else { "x86" } Write-Host "检测到系统架构: $osArchitecture" -ForegroundColor Cyan # 定义要查找的包名称模式(不包含架构部分) $packageNamePattern = "Microsoft.VCLibs.140.00_14.0.30704.0" # 查找当前目录下所有匹配的.appx文件 $allAppxFiles = Get-ChildItem -Path $scriptDirectory -Filter "*.appx" -File $matchingFiles = $allAppxFiles | Where-Object { $_.Name -like "*$packageNamePattern*" } if ($matchingFiles.Count -eq 0) { Write-Host "错误:在当前目录下未找到匹配的 VCLibs 安装包。" -ForegroundColor Red Write-Host "期望的包名称模式: $packageNamePattern_*架构*_.appx" -ForegroundColor Yellow Write-Host "当前目录: $scriptDirectory" -ForegroundColor Gray pause exit 1 } # 按架构分类文件 $x64Files = $matchingFiles | Where-Object { $_.Name -like "*_x64__*" } $x86Files = $matchingFiles | Where-Object { $_.Name -like "*_x86__*" } $armFiles = $matchingFiles | Where-Object { $_.Name -like "*_arm__*" } Write-Host "`n找到的安装包:" -ForegroundColor Cyan if ($x64Files.Count -gt 0) { Write-Host " x64: $($x64Files.Name)" -ForegroundColor White } if ($x86Files.Count -gt 0) { Write-Host " x86: $($x86Files.Name)" -ForegroundColor White } if ($armFiles.Count -gt 0) { Write-Host " ARM: $($armFiles.Name)" -ForegroundColor White } # 根据系统架构选择最合适的安装包 $selectedFile = $null switch ($osArchitecture) { "x64" { # 优先选择x64版本,如果没有则选择x86版本(x64系统兼容x86) if ($x64Files.Count -gt 0) { $selectedFile = $x64Files[0] Write-Host "`n选择匹配的x64版本安装包" -ForegroundColor Green } elseif ($x86Files.Count -gt 0) { $selectedFile = $x86Files[0] Write-Host "`n未找到x64版本,选择x86版本(x64系统兼容)" -ForegroundColor Yellow } elseif ($armFiles.Count -gt 0) { $selectedFile = $armFiles[0] Write-Host "`n警告:仅找到ARM版本,可能在x64系统上无法正常工作" -ForegroundColor Red } } "x86" { # x86系统只能安装x86版本 if ($x86Files.Count -gt 0) { $selectedFile = $x86Files[0] Write-Host "`n选择x86版本安装包" -ForegroundColor Green } elseif ($x64Files.Count -gt 0) { Write-Host "`n错误:x86系统无法安装x64版本" -ForegroundColor Red } elseif ($armFiles.Count -gt 0) { Write-Host "`n错误:x86系统无法安装ARM版本" -ForegroundColor Red } } default { Write-Host "`n错误:无法识别的系统架构" -ForegroundColor Red } } if ($null -eq $selectedFile) { Write-Host "`n错误:没有找到适合当前系统架构的安装包" -ForegroundColor Red Write-Host "系统架构: $osArchitecture" -ForegroundColor Yellow Write-Host "可用架构: $($matchingFiles.Count)个包" -ForegroundColor Yellow pause exit 1 } # 构建完整的文件路径 $appxPackagePath = $selectedFile.FullName Write-Host "正在安装: $($selectedFile.Name)" -ForegroundColor Green Write-Host "文件路径: $appxPackagePath" -ForegroundColor Gray try { # 执行安装命令 Write-Host "`n开始安装..." -ForegroundColor Cyan $result = Add-AppxPackage -Path $appxPackagePath -ErrorAction Stop Write-Host "`n✅ 安装成功!" -ForegroundColor Green Write-Host "包名称: $($result.Name)" -ForegroundColor White Write-Host "版本: $($result.Version)" -ForegroundColor White Write-Host "架构: $osArchitecture" -ForegroundColor White Write-Host "安装位置: $($result.InstallLocation)" -ForegroundColor White } catch { Write-Host "`n❌ 安装过程中出现错误: " -ForegroundColor Red Write-Host $_.Exception.Message -ForegroundColor Red # 检查常见的错误类型并给出建议 if ($_.Exception.Message -like "*certificate*" -or $_.Exception.Message -like "*签名*") { Write-Host "`n💡 提示: 可能需要安装证书或启用开发人员模式" -ForegroundColor Yellow Write-Host " 1. 设置 -> 更新与安全 -> 开发人员选项 -> 启用开发人员模式" -ForegroundColor Yellow Write-Host " 2. 或者使用 PowerShell: Set-ExecutionPolicy RemoteSigned" -ForegroundColor Yellow } elseif ($_.Exception.Message -like "*already installed*") { Write-Host "`n💡 提示: 该包可能已经安装,尝试更新..." -ForegroundColor Yellow } } # 添加一个暂停,以便在运行时能看到输出结果 Write-Host "`n按任意键退出..." -ForegroundColor Gray $null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
在这个脚本上点右键,以powershell运行,就会自动安装上VCLibs软件,问题就会自动解决。
文件及脚本下载地址
win-10-ltsc-wsappx-CPU高-问题解决 百度网盘: https://pan.baidu.com/s/1PF-jstGY5IJ7t185XWmKhA?pwd=m32y 提取码: m32y
网盘内容:
- Microsoft.VCLibs.140.00_14.0.30704.0_x64__8wekyb3d8bbwe.Appx
- Microsoft.VCLibs.140.00_14.0.30704.0_x86__8wekyb3d8bbwe.Appx
- Install-VCLibs.ps1
也可以手动进行安装
运行PowerShell Add-AppxPackage -Path "E:\Microsoft.VCLibs.140.00_14.0.30704.0_x64__8wekyb3d8bbwe.Appx"
声明:欢迎大家光临本站,学习IT运维技术,转载本站内容,请注明内容出处”来源刘国华教育“。如若本站内容侵犯了原著者的合法权益,请联系我们进行处理。