
【已解決】求BAT或VBS獲取聲音默認設備名字謝謝成功解決問題:
*****************************************************************************************************************************【求】獲取聲音默認設備名字(bat vbs wcs ahk 第三方 都行)nload="thumbImg(this)" alt="" />nclick="copycode($('code0'));">復制代碼
- @echo off
- setlocal enabledelayedexpansion & set regq=REG QUERY HKLMSOFTWAREMicrosoftWindowsCurrentVersionMMDevicesAudioRender /v DeviceState /s
- for /f delims= %%i in ('%regq% ^| findstr .') do (set /a n+=1,m=n%%2
- if !m! equ 0 (for /f tokens=1,4 %%a in (!str!%%i) do if %%b equ 1 for /f tokens=2* %%i in ('reg query %%a /v {b3f8fa53-0004-438e-9003-51a46e139bfc},6 /s ^|find /i reg_sz') do >#.txt echo,驅動:%%j)
- set str=%%i )
- #.txt
- del #.txt

