Sound Volume SDK ActiveX

Sound Volume SDK ActiveX

Platform : Windows 11, Windows 10, Windows 8, Vista, XP

For Windows Developers who need to control speaker volume or microphone volume on Windows 11 /10 for VB.Net, C#, VC++, VB6 , Delphi, VFP, MS Access.

Popular Solution Go   Back

VBScript - How to use vb script to adjust speaker volume in Window 7, Vista

Step 1: Download trial version of Sound Volume ActiveX and installed it.

Step 2: Create text file and add following code and save to test.vbs

Set obj=CreateObject("SOUNDVOLUME.SoundVolumeCtrl.1")

if obj.IsVistaWindows7 then
    
    obj.W7SetCurrentDevice obj.W7GetSpeakersName(0)
    obj.W7SetDeviceVolume 0
        MsgBox "set the master volume of first speaker " obj.W7GetSpeakersName(0) " to 0"

End If

Step 3: double click test.vbs, It will set the first speaker volume to 0. Some system have two speakers, so you need select correct speaker , the following code select second speaker.
    obj.W7SetCurrentDevice obj.W7GetSpeakersName(1)