想快捷禁用启用音频设备
首先看系统自带命令pnputil
pnputil /disable-device @"HDAUDIO\FUNC_01&VEN_10EC&DEV_0256&SUBSYS_19E53E05&REV_1000\4&3A02F3D3&0&0001"
最后执行没效果,看说明disable-device是后来才出我的window版本可能太老没这参数
msinfo32 和 systeminfo 都能看到自己电脑系统版本
systeminfo | findstr /B /C:"OS" /C:"OS Version"
英文电脑用Version 中文用 版本
systeminfo | findstr /B /C:"OS" /C:"OS 版本"
然后又下载devcon
在另一台电脑实验成功
devcon.exe Disable "HDAUDIO\FUNC_01&VEN_10EC&DEV_0256&SUBSYS_19E53E05"
然后到家庭版的win10找不到设备,用
devcon find *
查询到可能音频相关设备
SWD\MMDEVAPI\{0.0.0.00000000}.{B75D143C-76E5-42B6-87E1-B4582809F31B}: xspeaker (Realtek High Definition Audio)
ROOT\UNNAMED_DEVICE\0000 : NVIDIA Virtual Audio Device (Wave Extensible) (WDM)
SWD\MMDEVAPI\{0.0.1.00000000}.{E16E891A-F715-46EE-9069-BBD4B6CE3AF2}: (Realtek High Definition Audio)
SWD\MMDEVAPI\{0.0.1.00000000}.{E3532DBB-4EDA-47C3-9CC0-72713507509A}
PCI\VEN_8086&DEV_9D71&SUBSYS_3E0519E5&REV_21\3&11583659&0&FB: High Definition Audio
然后尝试如下几种命令不可行,没效果
devcon.exe Disable @"HDAUDIO\FUNC_01&VEN_10EC&DEV_0256&SUBSYS_19E53E05"
devcon.exe Disable @"SWD\MMDEVAPI\{0.0.0.00000000}.*" 执行没效果
devcon.exe Disable @"SWD\MMDEVAPI\{0.0.1.00000000}.*" 执行没效果
devcon.exe Disable "xspeaker" 找不到设备
devcon.exe Disable "Realtek High Definition Audio" 找不到设备
最后又下载
SoundVolumeView v2.43 用如下命令成功
SoundVolumeView.exe /Disable "Realtek High Definition Audio"
SoundVolumeView.exe /enable "Realtek High Definition Audio"
最后输出 restartvoice.vbs,双击自动调用ctrlvoice.bat,然后就重启了本机音频设备
注意如果需要试用 disablevoice.bat 和 enablevoice.bat 这2个批处理里设备名请修改自己机器音频设备名字
Copyright (c) 2013 - 2023 Nir Sofer
Web site: https://www.nirsoft.net
Description
===========
SoundVolumeView is a simple tool for Windows Vista/7/8/2008/10/11 that
displays general information and current volume level for all active
sound components on your system, and allows you to mute and unmute them
instantly.
SoundVolumeView also allows you to save a sound profile into a file,
containing the current volume level and the mute/unmute state of all
sound components, as well as the default sound devices, and then later,
load the same file to restore exactly the same volume levels and settings.
There is also extensive command-line support, which allows you to
save/load profiles, change current volume of every sound component, and
mute/unmute every sound component, without displaying any user interface.
System Requirements
===================
This utility works on Windows Vista, Windows 7, Windows 8, Windows 2008,
Windows 10, and Windows 11. Both 32-bit and 64-bit systems are supported.
Windows XP and older systems are not supported.
Versions History
================
* Version 2.43:
o The 'Device State' column now also displays state information for
application items (Active/Inactive/Expired).
* Version 2.42:
o Added /SaveDeviceFormat and /LoadDeviceFormat command-line
options, which allow you to save the data of the device default
format into a file, and then later load it back into the device.
o You should use these new commands if you have a format that
cannot be set with the /SetDefaultFormat command.
* Version 2.41:
o Added 'Black Background' option (Under the View menu). When it's
turned on, the main table is displayed in black background and white
text, instead of default system colors.
* Version 2.40:
o Added 'Use Mouse Wheel On Tray Icon' option. When it's turned on,
you can increase/decrease the sound volume of the selected item while
the mouse cursor is over the tray icon. The percent of change for
every wheel move is according to the 'Mouse Wheel % Change' option.
* Version 2.38:
o Added 'Sort By' toolbar button.
* Version 2.37:
o The current volume level of the selected item is now displayed in
the tooltip of the tray icon. This feature works only when both 'Put
Icon On Tray' option and 'Auto Refresh' option are turned on.
* Version 2.36:
o Added /SetSpeakersConfig command-line option, which allows you to
set the desired speakers configuration (Stereo, Quadraphonic, 5.1
Surround, 7.1 Surround) from command-line.
o Added 'Speakers Config' column, which displays 3 Hexadecimal
values that represent the current speakers configuration. You can use
these values in the /SetSpeakersConfig command-line option.
* Version 2.35:
o Added 'Show Mute On Tray Icon' option. When it's turned on,
SoundVolumeView displays mute icon on the tray if the selected item
is muted.
o This feature works only when both 'Put Icon On Tray' option and
'Auto Refresh' option are turned on.
* Version 2.31:
o Fixed a few high DPI mode issues.
* Version 2.30:
o Added /Columns command-line option, which allows you to set the
columns to display or the columns to export from command-line, for
example:
SoundVolumeView.exe /scomma "c:\temp\sound-items.csv" /Columns
"Name,Command-Line Friendly ID,Volume Percent"
* Version 2.29:
o You can now use wildcard with the command-line friendly ID, for
example:
SoundVolumeView.exe /Switch "Realtek*\Device\Speakers\Render"
* Version 2.28:
o You can now specify the number of channels in the
/SetDefaultFormat command, for example:
SoundVolumeView.exe /SetDefaultFormat "Speakers" 24 48000 4
* Version 2.27:
o Updated the /SetAppDefault and /SetSpatial commands to work on
Windows 11.
* Version 2.26:
o You can now use any variable inside the .cfg file
(SoundVolumeView.cfg) in order to set the configuration from command
line, for example:
SoundVolumeView.exe /SaveFileEncoding 3 /ShowUnpluggedDevices 1
/ShowDisabledDevices 1
* Version 2.25:
o You can now choose the desired encoding (ANSI, UTF-8, UTF-16) to
save the csv/xml/text/html files. (Under the Options menu)
o Updated the HTML export feature to HTML5.
o Added option to export as JSON file.
o You can now specify 'System Sounds' as the item name from
command-line. For example, this command mutes the system sounds from
command-line:
SoundVolumeView.exe /Mute "System Sounds"
* Version 2.23:
o Added secondary sorting support: You can now get a secondary
sorting, by holding down the shift key while clicking the column
header. Be aware that you only have to hold down the shift key when
clicking the second/third/fourth column. To sort the first column you
should not hold down the Shift key.
o Added option to change the sorting column from the menu (View ->
Sort By). Like the column header click sorting, if you click again
the same sorting menu item, it'll switch between ascending and
descending order. Also, if you hold down the shift key while choosing
the sort menu item, you'll get a secondary sorting.
* Version 2.22:
o Updated to work properly in high DPI mode.
* Version 2.21:
o Added 'all' option to the /SetDefault and /SwitchDefault
command-line options, which allow you to set all 3 default types
(Console, Multimedia, Communications) at once, for example:
SoundVolumeView.exe /SetDefault "High Definition Audio
Device\Device\Speakers\Render" all
o Added 'Set Default Device - All' to the Create Shortcut menu.
* Version 2.20:
o You can now use the /SetListenToThisDevice and
/SetPlaybackThroughDevice command-line options without running
SoundVolumeView as Administrator.
o Added /SetAllowExclusive command-li