修复蓝牙耳机音频问题

Windows 11更新后,蓝牙连接耳机无法播放声音而只能当话筒,想办法彻底解决这个问题,写了一个脚本出来

# 脚本修复Windows 11蓝牙耳机只能作为话筒但不能播放声音的问题# 以管理员权限运行此脚本# 检查管理员权限if (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {    Write-Warning "请以管理员权限运行此脚本!"    break}Write-Host "正在修复蓝牙耳机音频问题..." -ForegroundColor Cyan# 1. 重启相关的音频服务Write-Host "步骤1: 重启音频服务..." -ForegroundColor Yellow$audioServices = @("Audiosrv", "AudioEndpointBuilder", "BthAvctpSvc")foreach ($service in $audioServices) {    Stop-Service -Name $service -Force -ErrorAction SilentlyContinue    Start-Service -Name $service -ErrorAction SilentlyContinue    $status = Get-Service -Name $service -ErrorAction SilentlyContinue    if ($status.Status -eq "Running") {        Write-Host "  - 服务 $service 已重启" -ForegroundColor Green    } else {        Write-Host "  - 服务 $service 重启失败或不存在" -ForegroundColor Red    }}# 2. 重置蓝牙子系统Write-Host "步骤2: 重置蓝牙子系统..." -ForegroundColor YellowGet-Service bthserv | Stop-Service -ForceStart-Sleep -Seconds 2Get-Service bthserv | Start-ServiceWrite-Host "  - 蓝牙服务已重置" -ForegroundColor Green# 3. 清除并重新注册音频组件Write-Host "步骤3: 重置音频组件..." -ForegroundColor Yellowcmd /c "regsvr32 /s wmnetmgr.dll"cmd /c "regsvr32 /s /u wmnetmgr.dll"cmd /c "regsvr32 /s wmnetmgr.dll"Write-Host "  - 音频组件已重置" -ForegroundColor Green# 4. 重置声音设置Write-Host "步骤4: 重置Windows音频设置..." -ForegroundColor YellowRemove-Item -Path "HKCU:\SOFTWARE\Microsoft\Multimedia\Audio" -Recurse -Force -ErrorAction SilentlyContinueRemove-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio" -Recurse -Force -ErrorAction SilentlyContinueWrite-Host "  - 音频设置已重置" -ForegroundColor Green# 5. 检查蓝牙驱动Write-Host "步骤5: 检查蓝牙驱动更新..." -ForegroundColor Yellow$bluetoothDevices = Get-PnpDevice | Where-Object { $_.Class -eq "Bluetooth" }if ($bluetoothDevices) {    foreach ($device in $bluetoothDevices) {        Write-Host "  - 找到蓝牙设备: $($device.FriendlyName)" -ForegroundColor Green    }    Write-Host "  - 提示: 建议到设备管理器检查驱动是否为最新版本" -ForegroundColor Yellow} else {    Write-Host "  - 未找到蓝牙设备" -ForegroundColor Red}Write-Host "`n修复完成!请按照以下步骤操作:" -ForegroundColor CyanWrite-Host "1. 移除蓝牙耳机连接" -ForegroundColor WhiteWrite-Host "2. 重启电脑" -ForegroundColor WhiteWrite-Host "3. 重新连接蓝牙耳机" -ForegroundColor WhiteWrite-Host "4. 右键点击系统托盘的声音图标,选择'打开声音设置'" -ForegroundColor WhiteWrite-Host "5. 确保蓝牙耳机被设置为默认播放设备" -ForegroundColor WhiteWrite-Host "6. 如果仍有问题,尝试进入蓝牙设备属性,检查'服务'选项卡中的'音频'选项是否启用" -ForegroundColor WhiteRead-Host -Prompt "按回车键退出"

使用说明:

  1. 将上面的代码保存为Fix-BluetoothAudio.ps1文件
  2. Windows+X,以管理员身份运行PowerShell
  3. 然后定位到脚本所在目录,再执行脚本:.\Fix-BluetoothAudio.ps1
  4. 按照脚本结束时的提示进行操作

此脚本会重启音频服务、重置蓝牙堆栈、重新注册音频组件并清除相关注册表项,应该是能解决Windows 11更新后蓝牙耳机无法播放声音的问题。

预览时标签不可点

Close

更多

Name cleared

赞赏二维码微信扫一扫赞赏作者

Like the AuthorOther Amount

赞赏后展示我的头像

作品

暂无作品

Like the Author

Other Amount

¥

最低赞赏 ¥0

OK

Back

Other Amount

更多

赞赏金额

¥

最低赞赏 ¥0

1

2

3

4

5

6

7

8

9

0

.

虚拟化,操作系统,以及一些小工具 · 目录

虚拟化,操作系统,以及一些小工具

下一篇PySInfo:一个 Python 命令行工具,用于显示当前系统的信息

Close

更多

搜索「」网络结果

Close

调整当前正文文字大小

更多

100%