How to control Windows system volume using JScript or VBScript?

前端 未结 7 632
说谎
说谎 2020-12-03 06:10

I want to control the volume of my Windows system from a JScript or VBScript script. Any ideas?

Also, can I unmute the system volume if it is muted?

7条回答
  •  温柔的废话
    2020-12-03 06:33

    http://www.nilpo.com/2008/11/windows-xp/mute-sound-volume-in-wsh/ He uses a keystroke of a Multimedia Keyboard mute key. Clever ;-)

    Set WshShell = CreateObject("WScript.Shell")
    WshShell.SendKeys(chr(&hAD))
    

提交回复
热议问题