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?
On Windows 7 I could do this by controlling the keystrokes using WScript.
set oShell = CreateObject("WScript.Shell")
oShell.run"%SystemRoot%\System32\SndVol.exe"
WScript.Sleep 1500
oShell.SendKeys"{TAB} " ' Tab to the mute and press space
oShell.SendKeys"%{F4}" ' ALT F4 to exit the app.
I saved it in to a file called Mute-Sound.vbs and created a shortcut on the desktop to assign a shortcut key. CTRL+ALT+F12. For some reason the keyboard shortcuts only work if they are on the desktop so I am not sure how reliable keyboard shortcuts are!