AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / computer / 问题 / 1585391
Accepted
Henke
Henke
Asked: 2020-09-15 07:34:12 +0800 CST2020-09-15 07:34:12 +0800 CST 2020-09-15 07:34:12 +0800 CST

没有声音 - 如何撤消“sc delete AudioEndpointBuilder”?

  • 772

一个多星期前,我犯了 sc delete AudioEndpointBuilder在 Windows 命令行中运行的可怕错误。后果真是灾难性的。
我的电脑再也没有声音了!如何撤消这个明显危险的命令?

天真的尝试只是简单地运行sc create AudioEndpointBuilder 并没有解决问题。

windows audio
  • 1 1 个回答
  • 390 Views

1 个回答

  • Voted
  1. Best Answer
    Henke
    2020-09-15T07:34:12+08:002020-09-15T07:34:12+08:00

    这里有一些建议。

    1. 您可以在以下位置下载并解压缩以下cmd文件:
      https ://user.it.uu.se/%7Ehesc0353/AudiosrvEndpointBuilder.zip

    解压后右击选择Run as administrator.

    如果您遇到问题Overwrite (Yes/No)?,那么我建议您始终键入n(表示否)并点击Enter,因为回答是意味着您将覆盖应该可以撤消注册表中的更改的备份文件——以防万一是你想做的事情。

    脚本内容如下:

    @Echo off
    :: ---------------------------------------------------------------------------------------
    :: https://user.it.uu.se/%7Ehesc0353/AudiosrvEndpointBuilder.zip
    :: ---------------------------------------------------------------------------------------
    :: If you substantially alter this code - or use just small snippets of it -
    :: please make sure to always leave the following 12 lines intact:
     Echo.
     Echo  DISCLAIMER.
     Echo  Read https://stackoverflow.com/legal/terms-of-service/public#warranties !
     Echo  Credit - https://superuser.com/users/1102737/henke
     Echo  This issue has caused me LOTS of frustration and that I have spent many, MANY hours
     Echo  hours on resolving it. So if this cmd file has been helpful, the best way to thank
     Echo  me is to upvote both the question and this answer - if you are allowed to.
     Echo     Link to answer - https://superuser.com/a/1585392
     Echo  (c) Copyright Henke 2022-05-05 - https://superuser.com/users/1102737
     Echo     This answer to How can I undo 'sc delete AudioEndpointBuilder'? is licensed
     Echo  under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
     Echo.
     Echo  = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
     Echo  =  If you DON'T want to run this file, hit CTRL + C, then y, then ENTER!  =
     Echo  = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
     Echo.
     Echo  If you WANT to run it, you need to right-click it and 'Run as administrator'.
     Echo.
    :: ---------------------------------------------------------------------------------------
    pause
    
    :: Save a backup of the existing registry keys for AudioEndpointBuilder:
    %SystemRoot%\System32\reg export^
     HKLM\SYSTEM\CurrentControlSet\services\AudioEndpointBuilder^
     %SystemRoot%\BackupOfAudioEndpointBuilder.reg
    :: Delete the existing registry keys for AudioEndpointBuilder:
    reg delete HKLM\SYSTEM\CurrentControlSet\services\AudioEndpointBuilder /f
    :: Create the registry keys for AudioEndpointBuilder:
    reg add HKLM\SYSTEM\CurrentControlSet\services\AudioEndpointBuilder /v Description /d^
     @^%%SystemRoot^%%\System32\AudioEndpointBuilder.dll,-205 /f
    reg add HKLM\SYSTEM\CurrentControlSet\services\AudioEndpointBuilder /v DisplayName /d^
     @^%%SystemRoot^%%\System32\AudioEndpointBuilder.dll,-204 /f
    reg add HKLM\SYSTEM\CurrentControlSet\services\AudioEndpointBuilder /v ErrorControl /t^
     REG_DWORD /d 1 /f
    reg add HKLM\SYSTEM\CurrentControlSet\services\AudioEndpointBuilder /v^
     FailureActions /t REG_BINARY /d^
     "80510100000000000000000003000000140000000100000060ea000001000000c0d401000000000000000000" /f
    reg add HKLM\SYSTEM\CurrentControlSet\services\AudioEndpointBuilder /v Group /d^
     AudioGroup /f
    reg add HKLM\SYSTEM\CurrentControlSet\services\AudioEndpointBuilder /v ImagePath /t^
     REG_EXPAND_SZ /d "%%SystemRoot%%\System32\svchost.exe -k LocalSystemNetworkRestricted -p" /f
    reg add HKLM\SYSTEM\CurrentControlSet\services\AudioEndpointBuilder /v ObjectName /d^
     LocalSystem /f
    reg add HKLM\SYSTEM\CurrentControlSet\services\AudioEndpointBuilder /v RequiredPrivileges /t^
     REG_MULTI_SZ /d SeChangeNotifyPrivilege /f
    reg add HKLM\SYSTEM\CurrentControlSet\services\AudioEndpointBuilder /v^
     ServiceSidType /t REG_DWORD /d 1 /f
    reg add HKLM\SYSTEM\CurrentControlSet\services\AudioEndpointBuilder /v^
     Start /t REG_DWORD /d 2 /f
    reg add HKLM\SYSTEM\CurrentControlSet\services\AudioEndpointBuilder /v^
     Type /t REG_DWORD /d 32 /f
    reg add HKLM\SYSTEM\CurrentControlSet\services\AudioEndpointBuilder\Parameters /v^
     ServiceDll /t REG_EXPAND_SZ /d ^%%SystemRoot^%%\System32\AudioEndpointBuilder.dll /f
    reg add HKLM\SYSTEM\CurrentControlSet\services\AudioEndpointBuilder\Parameters /v^
     ServiceDllUnloadOnStop /t REG_DWORD /d 1 /f
    
    :: Save a backup of the existing registry keys for Audiosrv:
    %SystemRoot%\System32\reg export^
     HKLM\SYSTEM\CurrentControlSet\services\Audiosrv %SystemRoot%\BackupOfAudiosrv.reg
    :: Delete the existing registry keys for Audiosrv:
    reg delete HKLM\SYSTEM\CurrentControlSet\services\Audiosrv /f
    :: Create the registry keys for Audiosrv:
    reg add HKLM\SYSTEM\CurrentControlSet\services\Audiosrv /v DependOnService /t^
     REG_MULTI_SZ /d "AudioEndpointBuilder\0RpcSs" /f
    reg add HKLM\SYSTEM\CurrentControlSet\services\Audiosrv /v Description /d^
     @^%%SystemRoot^%%\System32\audiosrv.dll,-201 /f
    reg add HKLM\SYSTEM\CurrentControlSet\services\Audiosrv /v DisplayName /d^
     @^%%SystemRoot^%%\System32\audiosrv.dll,-200 /f
    reg add HKLM\SYSTEM\CurrentControlSet\services\Audiosrv /v ErrorControl /t^
     REG_DWORD /d 1 /f
    reg add HKLM\SYSTEM\CurrentControlSet\services\Audiosrv /v^
     FailureActions /t REG_BINARY /d^
     "80510100000000000000000003000000140000000100000060ea000001000000c0d401000100000020bf0200" /f
    reg add HKLM\SYSTEM\CurrentControlSet\services\Audiosrv /v Group /d^
     AudioGroup /f
    reg add HKLM\SYSTEM\CurrentControlSet\services\Audiosrv /v ImagePath /t^
     REG_EXPAND_SZ /d "%%SystemRoot%%\System32\svchost.exe -k LocalServiceNetworkRestricted -p" /f
    reg add HKLM\SYSTEM\CurrentControlSet\services\Audiosrv /v ObjectName /d^
     "NT AUTHORITY\LocalService" /f
    reg add HKLM\SYSTEM\CurrentControlSet\services\Audiosrv /v RequiredPrivileges /t^
     REG_MULTI_SZ /d "SeChangeNotifyPrivilege\0SeImpersonatePrivilege\0SeIncreaseWorkingSetPrivilege" /f
    reg add HKLM\SYSTEM\CurrentControlSet\services\Audiosrv /v^
     ServiceSidType /t REG_DWORD /d 1 /f
    reg add HKLM\SYSTEM\CurrentControlSet\services\Audiosrv /v^
     Start /t REG_DWORD /d 2 /f
    reg add HKLM\SYSTEM\CurrentControlSet\services\Audiosrv /v^
     Type /t REG_DWORD /d 16 /f
    reg add HKLM\SYSTEM\CurrentControlSet\services\Audiosrv\Parameters /v^
     ServiceDll /t REG_EXPAND_SZ /d ^%%SystemRoot^%%\System32\Audiosrv.dll /f
    reg add HKLM\SYSTEM\CurrentControlSet\services\Audiosrv\Parameters /v^
     ServiceDllUnloadOnStop /t REG_DWORD /d 1 /f
    reg add HKLM\SYSTEM\CurrentControlSet\services\Audiosrv\Security /v Security /t REG_BINARY /d^
     "01000480c0000000cc00000000000000140000000200ac000600000000001400fd01020001010000000000051200000000001800ff010f0001020000000000052000000020020000000014008d010200010100000000000504000000000014008d010200010100000000000506000000000018008d000200010200000000000f0200000001000000000038008d000200010a00000000000f0300000000040000abace86417c3b0f1abc5110bd73b6dc89d8a33d21867214545351283ff23a71d010100000000000512000000010100000000000512000000" /f
    
    :: Create the services:
    sc create AudioEndpointBuilder binPath=^
     ^%%SystemRoot^%%"\system32\svchost.exe -k LocalSystemNetworkRestricted" type= share start= auto
    sc create Audiosrv binPath=^
     ^%%SystemRoot^%%"\system32\svchost.exe -k LocalServiceNetworkRestricted" type= share start= auto
    
    :Description
     Echo  Please note!
     Echo  - - - - - -
     Echo  '%0' created the AudioEndpointBuilder Audiosrv services
     Echo  in the registry and in services.msc.
     Echo.
     Echo   = = = = = = = = = = = = = = = = = =
     Echo   =  PLEASE RESTART YOUR COMPUTER!  =   I hope your Audio works now. (It should!)
     Echo   = = = = = = = = = = = = = = = = = =
     Echo.
     Echo  -  *  -  *  -
     Echo.
     Echo  Finished! - Press ENTER when you are ready to close this terminal window.
     Echo.
    :: ---------------------------------------------------------------------------------------
    pause
    

    如果上述脚本无法恢复您计算机中的声音,则可能是文件AudioEndpointBuilder.dll和/或audiosrv.dll. 这两个文件通常位于C:\Windows\System32\. 与您当前的 Windows 10 版本相比,它们可能丢失或版本错误。
    但是,除非您弄乱了这些文件,否则这可能 不是问题。

    脚本无法恢复声音的另一个原因可能是您的声音驱动程序有问题。但我认为这也不太可能。在Device Manager寻找Sound, video and game controllers。安装最新可用驱动程序的最简单方法可能是让 Windows Update 为您完成。

    1. 您可以尝试升级到更高版本的 Windows 10。这与全新安装 Windows 10 的效果类似。在我的带有 HDD 驱动器的笔记本电脑上,这大约需要 7 个小时。例如,请参阅:
      自动升级到新的 Windows 10 功能更新
      如何强制 Windows 10 安装更新
      或进行在线搜索,例如:
      "Windows 10" "Update & Security" "Update Assistant"。

    2. 点击Win ⊞+ R,键入cmd,按住 Ctrl+Shift并点击Enter。 1
      然后运行:

    DISM /Online /Cleanup-Image /RestoreHealth
    
    1. 全新安装 Windows 10。通过这样做,您将丢失计算机上安装的所有软件,因此这应该被视为最后的手段。

    参考

    • 用于恢复注册表设置以使音频正常工作的 CMD 脚本
    • 自动升级到新的 Windows 10 功能更新
    • 如何强制 Windows 10 安装更新

    1按住Ctrl+以管理员身份Shift打开命令提示符。

    • 2

相关问题

  • 如何在 Windows Precision 触摸板上禁用鼠标加速?

  • 批量重命名图像文件集

  • Python 的“pass”参数的批处理等价物是什么?

  • 在 Windows 上与 Docker 守护进程通信

  • 资源管理器侧面板中的桌面外壳快捷方式

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何减少“vmmem”进程的消耗?

    • 11 个回答
  • Marko Smith

    从 Microsoft Stream 下载视频

    • 4 个回答
  • Marko Smith

    Google Chrome DevTools 无法解析 SourceMap:chrome-extension

    • 6 个回答
  • Marko Smith

    Windows 照片查看器因为内存不足而无法运行?

    • 5 个回答
  • Marko Smith

    支持结束后如何激活 WindowsXP?

    • 6 个回答
  • Marko Smith

    远程桌面间歇性冻结

    • 7 个回答
  • Marko Smith

    子网掩码 /32 是什么意思?

    • 6 个回答
  • Marko Smith

    鼠标指针在 Windows 中按下的箭头键上移动?

    • 1 个回答
  • Marko Smith

    VirtualBox 无法以 VERR_NEM_VM_CREATE_FAILED 启动

    • 8 个回答
  • Marko Smith

    应用程序不会出现在 MacBook 的摄像头和麦克风隐私设置中

    • 5 个回答
  • Martin Hope
    CiaranWelsh 如何减少“vmmem”进程的消耗? 2020-06-10 02:06:58 +0800 CST
  • Martin Hope
    Jim Windows 10 搜索未加载,显示空白窗口 2020-02-06 03:28:26 +0800 CST
  • Martin Hope
    v15 为什么通过电缆(同轴电缆)的千兆位/秒 Internet 连接不能像光纤一样提供对称速度? 2020-01-25 08:53:31 +0800 CST
  • Martin Hope
    fixer1234 “HTTPS Everywhere”仍然相关吗? 2019-10-27 18:06:25 +0800 CST
  • Martin Hope
    andre_ss6 远程桌面间歇性冻结 2019-09-11 12:56:40 +0800 CST
  • Martin Hope
    Riley Carney 为什么在 URL 后面加一个点会删除登录信息? 2019-08-06 10:59:24 +0800 CST
  • Martin Hope
    zdimension 鼠标指针在 Windows 中按下的箭头键上移动? 2019-08-04 06:39:57 +0800 CST
  • Martin Hope
    jonsca 我所有的 Firefox 附加组件突然被禁用了,我该如何重新启用它们? 2019-05-04 17:58:52 +0800 CST
  • Martin Hope
    MCK 是否可以使用文本创建二维码? 2019-04-02 06:32:14 +0800 CST
  • Martin Hope
    SoniEx2 更改 git init 默认分支名称 2019-04-01 06:16:56 +0800 CST

热门标签

windows-10 linux windows microsoft-excel networking ubuntu worksheet-function bash command-line hard-drive

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve