China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-12 23:39
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Please use batch processing or other simple methods to cancel the system volume mute View 2,191 Replies 7
Original Poster Posted 2009-11-29 13:05 ·  中国 江苏 徐州 电信
初级用户
Credits 37
Posts 19
Joined 2008-01-04 20:10
18-year member
UID 107681
Gender Male
Status Offline
Please clarify your request. Are you asking for a translation of the Chinese text you provided? If so, here is the translation:

Seek to use batch processing or other simple methods to cancel the volume mute, QQ Player mute, make them not mute, and also adjust the volume? What are the parameters of sndvol32.exe?
Floor 2 Posted 2009-11-29 13:28 ·  中国 重庆 电信
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
rem Set to mute
nircmd.exe mutesysvolume 1
rem Unmute
nircmd.exe mutesysvolume 0
Floor 3 Posted 2009-11-29 19:09 ·  中国 广东 广州 电信
初级用户
★★
l i u s s
Credits 73
Posts 101
Joined 2008-09-17 00:21
17-year member
UID 125825
Gender Male
From GZ
Status Offline
```
Set WshShell = Wscript.CreateObject("Wscript.Shell")
WshShell.Sendkeys "…" 'First mute, cancel it again
```



[ Last edited by newxso on 2009-12-4 at 20:02 ]
Floor 4 Posted 2009-12-04 19:31 ·  中国 江苏 徐州 电信
初级用户
Credits 37
Posts 19
Joined 2008-01-04 20:10
18-year member
UID 107681
Gender Male
Status Offline
Thanks to the two upstairs for helping. By the way, I want to ask, can it be achieved only with bat without using third-party tools and vbs?
Floor 5 Posted 2009-12-04 19:34 ·  中国 江苏 徐州 电信
初级用户
Credits 37
Posts 19
Joined 2008-01-04 20:10
18-year member
UID 107681
Gender Male
Status Offline
```
Originally posted by newxso at 2009-11-29 07:09 PM:
Set WshShell = Wscript.CreateObject("Wscript.Shell")
WshShell.Sendkeys "…" 'First mute, cancel it the second time



What does this not understand? Where does the code end?
```
Floor 6 Posted 2009-12-04 20:37 ·  中国 江苏 徐州 电信
初级用户
Credits 37
Posts 19
Joined 2008-01-04 20:10
18-year member
UID 107681
Gender Male
Status Offline
Originally posted by newxso at 2009-11-29 07:09 PM:

Set WshShell = Wscript.CreateObject("Wscript.Shell")
WshShell.Sendkeys "…" 'First mute, cancel again



How to cancel the mute no matter what, to prevent the situation where it was not muted originally but becomes muted after execution
Floor 7 Posted 2009-12-05 18:33 ·  中国 陕西 西安 电信
铂金会员
★★★★
Credits 5,212
Posts 2,478
Joined 2007-02-08 23:39
19-year member
UID 79003
Gender Male
Status Offline
[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4D36E96C-E325-11CE-BFC1-08002BE10318}\0005\Settings]
"MasterVolume"=hex:00,00
"MasterVolume"=hex:00,80
"HeadphoneVolume"=hex:04,04
"HeadphoneVolume"=hex:04,84
[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\DeviceClasses\{6994AD04-93EF-11D0-A3CC-00A0C9223196}\##?#PCI#VEN_8086&DEV_27DE&SUBSYS_0C82105B&REV_01#3&2411E6FE&0&F2#{6994ad04-93ef-11d0-a3cc-00a0c9223196}\#Wave\Device Parameters\Mixer\ 0\Controls\ 1]
"Channel 0"=dword:00000000
"Channel 0"=dword:00000001
"Channel 1"=dword:00000000
"Channel 1"=dword:00000001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E96C-E325-11CE-BFC1-08002BE10318}\0005\Settings]
"MasterVolume"=hex:00,00
"MasterVolume"=hex:00,80
"HeadphoneVolume"=hex:04,04
"HeadphoneVolume"=hex:04,84
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceClasses\{6994AD04-93EF-11D0-A3CC-00A0C9223196}\##?#PCI#VEN_8086&DEV_27DE&SUBSYS_0C82105B&REV_01#3&2411E6FE&0&F2#{6994ad04-93ef-11d0-a3cc-00a0c9223196}\#Wave\Device Parameters\Mixer\ 0\Controls\ 1]
"Channel 0"=dword:00000000
"Channel 0"=dword:00000001
"Channel 1"=dword:00000000
"Channel 1"=dword:00000001


Muting or not muting will change here. Some keys (such as those under DEVICE) are related to audio devices and may be different.

Focus on
[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4D36E96C-E325-11CE-BFC1-08002BE10318}\0005\Settings]
above.


MasterVolume is 2 bytes
If they are the same, it means no mute. If the latter minus the former = 80 (hexadecimal), it means muted. Specifically, if it is 1f, 9f (the difference is also H80), it means the master volume is adjusted to the lowest. It is unknown whether it is muted or not when it is 1f, 9f.

If the master volume is at the lowest and mute is canceled, there should be nothing wrong.

If you must do it completely, you need to look at those items related to audio devices. This... To get the hardware ID, etc., the processing is cumbersome. It is better to use a small third-party tool
S smile 微笑,L love 爱,O optimism 乐观,R relax 放松,E enthusiasm 热情...Slore
Floor 8 Posted 2009-12-07 16:55 ·  中国 四川 绵阳 电信
高级用户
★★
Credits 587
Posts 282
Joined 2006-04-10 03:40
20-year member
UID 53599
Gender Male
Status Offline
Just use the remote control or keyboard shortcuts.
Forum Jump: