|
本帖最后由 batche 于 2023-6-25 17:29 编辑
我又改了一下
- @echo off
- setlocal enabledelayedexpansion
- set "regq=REG QUERY "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render" /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,default audio device:%%j
- )
- set "str=%%i"
- )
- echo,>>#.txt
- pause
复制代码 |
评分
-
查看全部评分
|