首页»版块 › 智慧生活 › 笔记本 ›荣耀互联的适配太慢了

荣耀互联的适配太慢了

[复制帖子标题和链接]

4760

睦夜黎  LV4  发表于 5 天前 福建 来自:荣耀WIN 超神旗舰
荣耀magicbook16pro hunter 2025
电脑管家20.0.0.60
超级工作站5.5.1.69
升个26h2功能用不了我还得找肥鱼修
直接把修复的程序搬过来了,自己丢cmd吧,只在不行自己花2毛叫肥鱼修
# ============================================================
#  修复 ”荣耀互联” 不可用:Microsoft Wi-Fi Direct 虚拟适配器 Code 56
#  诊断结论(2026-11-02):
#    11-01 17:12:48  最后一次 SoftAP 启动成功(互联本来能用)
#    11-01 17:41:29  Windows 11 26H2 更新刷新了 netvwifimp.inf
#    11-01 17:45:50  虚拟适配器被重建,卡在 Code 56 (CM_PROB_NEED_CLASS_CONFIG)
#    之后            HnTrustCircleService 每次都报 ”SoftAP start failed, err:-6”
# ============================================================
#Requires -RunAsAdministrator

$ErrorActionPreference = ´Continue´
$inst = ´{5D624F94-8850-40C3-A3FA-A4FD2080BAF3}\VWIFIMP_WFD\4&29AAEE0A&0&11´

function Show-State($tag) {
    Write-Host ””
    Write-Host ”----- 设备状态:$tag -----” -ForegroundColor Cyan
    $d = Get-PnpDevice -Class Net -ErrorAction SilentlyContinue |
         Where-Object { $_.InstanceId -like ´*VWIFIMP_WFD*´ }
    if (-not $d) { Write-Host ”  未找到 Wi-Fi Direct 虚拟适配器” -ForegroundColor Yellow; return }
    foreach ($x in $d) {
        Write-Host (”  {0}`n    Status={1}  Problem={2}  ({3})” -f $x.InstanceId, $x.Status, $x.Problem, $x.ProblemDescription)
    }
    $if = Get-NetAdapter -IncludeHidden -ErrorAction SilentlyContinue |
          Where-Object InterfaceDescription -like ´*Wi-Fi Direct*´
    foreach ($i in $if) {
        Write-Host (”  网卡: {0}  [{1}]  ifIndex={2}” -f $i.Name, $i.Status, $i.ifIndex)
    }
}

Write-Host ”==========================================” -ForegroundColor Green
Write-Host ”  荣耀互联 / Wi-Fi Direct 适配器修复工具” -ForegroundColor Green
Write-Host ”==========================================” -ForegroundColor Green

Show-State ”修复前”

# ---- 步骤 1:停掉占用 P2P 的互联服务(PCManager 会自动重新拉起) ----
Write-Host ”`n[1/4] 停止 HnTrustCircleService / HnExScreen(解除对 WFD 的占用)” -ForegroundColor Yellow
foreach ($p in ´HnExScreen´,´HnTrustCircleService´) {
    Get-Process -Name $p -ErrorAction SilentlyContinue | ForEach-Object {
        Write-Host ”  结束进程 $($_.ProcessName) (PID $($_.Id))”
        Stop-Process -Id $_.Id -Force -ErrorAction SilentlyContinue
    }
}
Start-Sleep -Seconds 3

# ---- 步骤 2:移除出问题的虚拟适配器 ----
Write-Host ”`n[2/4] 移除 Wi-Fi Direct 虚拟适配器” -ForegroundColor Yellow
Write-Host ”  pnputil /remove-device `”$inst`””
& pnputil.exe /remove-device ”$inst”
if ($LASTEXITCODE -ne 0) {
    Write-Host ”  pnputil 移除失败(返回码 $LASTEXITCODE),改用 /force 重试…” -ForegroundColor Yellow
    & pnputil.exe /remove-device ”$inst” /force
}
Start-Sleep -Seconds 3

# ---- 步骤 3:重新扫描硬件,让系统重建适配器 ----
Write-Host ”`n[3/4] 重新扫描硬件,重建虚拟适配器” -ForegroundColor Yellow
& pnputil.exe /scan-devices
Start-Sleep -Seconds 8

$d = Get-PnpDevice -Class Net -ErrorAction SilentlyContinue |
     Where-Object { $_.InstanceId -like ´*VWIFIMP_WFD*´ -and $_.Status -eq ´Error´ }

if ($d) {
    Write-Host ”`n  重建后仍是错误状态,重启 WLAN 服务后再试一次…” -ForegroundColor Yellow
    Restart-Service WlanSvc -Force -ErrorAction SilentlyContinue
    Start-Sleep -Seconds 6
    & pnputil.exe /scan-devices | Out-Null
    Start-Sleep -Seconds 6
}

# ---- 步骤 4:校验 ----
Write-Host ”`n[4/4] 校验结果” -ForegroundColor Yellow
Show-State ”修复后”

Write-Host ”`n----- 无线能力检查(关键一行:Soft AP 应为 Supported)-----” -ForegroundColor Cyan
& netsh.exe wlan show wirelesscapabilities | Select-String -Pattern ´Soft AP|Wi-Fi Direct|P2P´

Write-Host ”`n==========================================” -ForegroundColor Green
$bad = Get-PnpDevice -Class Net -ErrorAction SilentlyContinue |
       Where-Object { $_.InstanceId -like ´*VWIFIMP_WFD*´ -and $_.Status -eq ´Error´ }
if ($bad) {
    Write-Host ”  仍未修复。” -ForegroundColor Red
    Write-Host ”  下一步请二选一:” -ForegroundColor Yellow
    Write-Host ”   A) 重启电脑后再打开手机互联试一次(多数情况重启即恢复)”
    Write-Host ”   B) 设备管理器 → 网络适配器 → 卸载 ´Microsoft Wi-Fi Direct 虚拟适配器´”
    Write-Host ”      → 菜单´操作´ → ´扫描检测硬件改动´”
    Write-Host ”   C) 仍不行:设置 → 网络和 Internet → 高级网络设置 → 网络重置(会清空 Wi-Fi 密码)”
} else {
    Write-Host ”  Wi-Fi Direct 虚拟适配器已恢复正常。” -ForegroundColor Green
    Write-Host ”  请用手机重新发起´互联´(多屏协同/文件互传),若仍失败请重启电脑一次。” -ForegroundColor Green
}
Write-Host ”==========================================” -ForegroundColor Green
Write-Host ”`n按任意键关闭…”
$null = $Host.UI.RawUI.ReadKey(´NoEcho,IncludeKeyDown´)
荣耀互联的适配太慢了
建议投票
5 人已参与
支持
反对
您需要登录后才可以评论 登录 | 立即注册
简体中文 - China
快速回复 返回顶部 返回列表