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?
I used nircmd.exe along with vbscript to control system volume.
Set objShell = CreateObject("WScript.Shell")
If Not WScript.Arguments.Named.Exists("elevate") Then
CreateObject("Shell.Application").ShellExecute WScript.FullName _
, """" & WScript.ScriptFullName & """ /elevate", "", "runas", 1
WScript.Quit
End If
objShell.Run("nircmd.exe setvolume 0 0 0")
'Set WshShell = WScript.CreateObject("WScript.Shell")
'WshShell.Popup "Success", "5", "MuteSpeaker"
' to successfully run this vbscript during log-off, nircmd.exe during should be present in "C:\Windows\System32"
' [cscript //X scriptfile.vbs MyArg1 MyArg2]