nircmd.exe 可以改变系统音量:- changesysvolume [volume change] {Component} {Device Index}
- Increases or decreases the system volume.
复制代码 系统(xp)音量可以这样读取:- @echo off&SetLocal EnableDelayEdexpansion&cd /d "%~dp0"
-
- for /f "tokens=1-4" %%a in ('reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceClasses\{6994AD04-93EF
-
- -11D0-A3CC-00A0C9223196}\##?#HDAUDIO#FUNC_01&VEN_10EC&DEV_0269&SUBSYS_144DC552&REV_1000#4&178BC531&0&0001#{6994ad04-93ef
-
- -11d0-a3cc-00a0c9223196}\#RearLineOutWave3\Device Parameters\Mixer\ 0\Controls\ 0"') do (
- set "xnum=%%d"
- )
- set /a "per=!xnum!*100/65535"
- echo !per!
-
- pause
复制代码
|