Sound Volume SDK ActiveX

Sound Volume SDK ActiveX

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

For Windows Developers who need to control sound volume in, c++ , c#, vb6 , delphi, vfp, 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)