Jar*_*Par 89 windows powershell cmd.exe
有没有办法基本上使 Windows 命令外壳的 Beeping 功能静音?
我现在正在编写一个 PowerShell 脚本,它最终会在屏幕上打印几行文本。我正在解决编码逻辑中的错误。但是每次我错了,我的脚本都会在屏幕上喷出一堆随机的二进制字符,并最终导致许多烦人的哔哔声。
没有哔哔声,失败很明显:)
小智 74
Windows 命令行命令net stop beep将关闭蜂鸣声,net start beep并将打开蜂鸣声。
来源
应该注意的是,该指令在 windows 上全局停止哔哔声,而不仅仅是在 windows 命令外壳内停止。此外,当您重新启动计算机时,该服务将再次运行。
@Ady's answer will suffice. But if you want to just disable it per instance, you can always put this method into a batch file (but it's so short you can just type it) and run it.
小智 46
To control the Beep service startup from the command line, disable the service across reboots with:
C:\Windows\system32>sc config beep start= disabled
[SC] ChangeServiceConfig SUCCESS
Run Code Online (Sandbox Code Playgroud)
Re-enable with
C:\Windows\system32>sc config beep start= auto
[SC] ChangeServiceConfig SUCCESS
Run Code Online (Sandbox Code Playgroud)
Note the spacing on the sc config in the above examples, as it has specific requirements.
To do this from Powershell:
PS C:\Windows\System32> set-service beep -startuptype automatic
PS C:\Windows\System32> set-service beep -startuptype disabled
Run Code Online (Sandbox Code Playgroud)
小智 31
执行以下步骤以禁用机器的系统蜂鸣声:
参考:http : //windowsitpro.com/article/articleid/15508/how-do-i-stop-windows-2000-from-beeping.html
小智 7
您可以从 Windows 10 的声音设置中调整两种声音:
我把两者都设置为无,我很幸运能保持沉默
小智 7
在我看来,您无需在新系统上禁用电脑的系统蜂鸣声即可实现此目的。
我已经为 Windows 10 的 WSL 完成了此操作,效果很好。
| 归档时间: |
|
| 查看次数: |
61179 次 |
| 最近记录: |