command prompt set sound volume


nircmd https://www.nirsoft.net/utils/sound_volume_view.html


Command line example:

設置 耳機音量 30% 的方式


SoundVolumeView.exe /SetVolume "{0.0.0.00000000}.{eafc99e3-1c45-4027-b923-4ee4c2284cd5}" 30

由於device name 裡面有繁體字 建議最好用 Item ID 來描述. 否則 bat 檔案裡面會有不完整的亂碼

設置某個device as default   可以直接按鼠標右鍵  產生 


也可以做一個捷徑 :

再去看 捷徑裡面的指令 
D:\inst\NirSoft\SoundVolumeView\SoundVolumeView.exe /SetDefault "Realtek(R) Audio\Device\耳機\Render" 1
進去將device name(有中文不好) 改為  Item ID 

Other example:

Here's some examples:

  • SoundVolumeView.exe /GetPercent "Speakers"
  • SoundVolumeView.exe /GetPercentChannel "Speakers" 0
  • SoundVolumeView.exe /GetMute "Speakers"
  • SoundVolumeView.exe /SetVolume "{0.0.0.00000000}.{a77a09b2-1ec6-49c3-860a-68945904a2f1}" 15
  • SoundVolumeView.exe /SetVolume "Speakers" 22.5
  • SoundVolumeView.exe /SetVolume "High Definition Audio Device\Device\Speakers" 50
  • SoundVolumeView.exe /SetVolume "USB*\Device\Speakers\Render" 70 /SetVolume "High Definition Audio Device\Device\Speakers" 35
  • SoundVolumeView.exe /SetVolume AllAppVolume 100
  • SoundVolumeView.exe /SetVolumeDecibel "Speakers" -11
  • SoundVolumeView.exe /ChangeVolume "Front Green In" -10
  • SoundVolumeView.exe /ChangeVolume "{2}.\\?\hdaudio#func_01&ven_10ec&dev_0889&subsys_1458a002&rev_1000#4&3828eb94&0&0201#{6994ad04-93ef-11d0-a3cc-00a0c9223196}\singlelineouttopo/0002000c&" 5
  • SoundVolumeView.exe /ChangeVolumeChannel "vlc.exe" 0 -20
  • SoundVolumeView.exe /Mute "singlelineouttopo/0002000c&"
  • SoundVolumeView.exe /Mute "DefaultRenderDevice"
  • SoundVolumeView.exe /Mute "System Sounds"
  • SoundVolumeView.exe /SetVolumeChannels "Front Pink In" 45 55
  • SoundVolumeView.exe /SetVolumeChannels "Front" * 60 * 40
  • SoundVolumeView.exe /SetVolumeDecibel "Microphone Boost" 20
  • SoundVolumeView.exe /ChangeVolumeDecibel "Microphone Boost" 10
  • SoundVolumeView.exe /Mute "Firefox.exe"
  • SoundVolumeView.exe /Mute "Firefox.exe" /WaitForItem 3600
  • SoundVolumeView.exe /SetVolume "chrome.exe" 75
  • SoundVolumeView.exe /SetVolumeChannels "chrome.exe" 50 100
  • SoundVolumeView.exe /Unmute "VLC media player"
  • SoundVolumeView.exe /Switch "C:\Program Files\Firefox.exe"
  • SoundVolumeView.exe /Switch 3217
  • SoundVolumeView.exe /Switch Focused
  • SoundVolumeView.exe /Switch FocusedName
  • SoundVolumeView.exe /Switch "Realtek High Definition Audio\Device\Speakers"
  • SoundVolumeView.exe /DisableEnable Speakers
  • SoundVolumeView.exe /SetDefault "{0.0.0.00000000}.{a77a09b2-1ec6-49c3-860a-68945904a2f1}" 0
  • SoundVolumeView.exe /SetDefault "{0.0.0.00000000}.{a77a09b2-1ec6-49c3-860a-68945904a2f1}" all
  • SoundVolumeView.exe /SetDefault "DENON-AVAMP" 1
  • SoundVolumeView.exe /SwitchDefault "{0.0.0.00000000}.{a77a09b2-1ec6-49c3-860a-68945904a2f1}" "{0.0.0.00000000}.{7747b192-73b2-47d3-a2c0-168e94af7f9e}" all
  • SoundVolumeView.exe /SetAppDefault "{0.0.0.00000000}.{a77a09b2-1ec6-49c3-860a-68945904a2f1}" all "myapp.exe"
  • SoundVolumeView.exe /SetAppDefault DefaultCaptureDevice 1 1952
  • SoundVolumeView.exe /SaveProfile "C:\Temp\Profile1.spr"
  • SoundVolumeView.exe /LoadProfile "C:\Temp\Profile2.spr"

You can also use the following command-line parameters to export the list of all sound items info a file:

留言